|
@@ -208,9 +208,10 @@ type SysuserEditEnabledReq struct {
|
|
|
// 变更状态
|
|
|
func EditAdminEnabled(item *Admin) (err error) {
|
|
|
o := global.DbMap[utils.DbNameMaster]
|
|
|
- sql := `UPDATE "admin"
|
|
|
+ sql := `UPDATE admin
|
|
|
SET
|
|
|
last_updated_time = NOW(),enabled=? WHERE admin_id = ? `
|
|
|
+ sql = utils.ReplaceDriverKeywords("", sql)
|
|
|
err = o.Exec(sql, item.Enabled, item.AdminId).Error
|
|
|
return
|
|
|
}
|
|
@@ -218,9 +219,10 @@ func EditAdminEnabled(item *Admin) (err error) {
|
|
|
// DisableAdmin 禁用用户
|
|
|
func DisableAdmin(adminId int) (err error) {
|
|
|
o := global.DbMap[utils.DbNameMaster]
|
|
|
- sql := `UPDATE "admin"
|
|
|
+ sql := `UPDATE admin
|
|
|
SET
|
|
|
last_updated_time = NOW(),disable_time=now(),enabled=0 WHERE admin_id = ? `
|
|
|
+ sql = utils.ReplaceDriverKeywords("", sql)
|
|
|
err = o.Exec(sql, adminId).Error
|
|
|
return
|
|
|
}
|