fix(god):修复并调整SQL语句。
This commit is contained in:
parent
ab92f22c85
commit
466d21e8b4
|
@ -553,6 +553,7 @@ func (g _GodModeService) DeleteUser(userId string) (bool, error) {
|
||||||
Table(new(model.Park)).
|
Table(new(model.Park)).
|
||||||
Where(builder.Eq{"user_id": userId}).
|
Where(builder.Eq{"user_id": userId}).
|
||||||
NoAutoCondition().
|
NoAutoCondition().
|
||||||
|
Unscoped().
|
||||||
Select("id").
|
Select("id").
|
||||||
Find(&parkIds)
|
Find(&parkIds)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -594,7 +595,7 @@ func (g _GodModeService) DeleteUser(userId string) (bool, error) {
|
||||||
result = result && (rows >= 0)
|
result = result && (rows >= 0)
|
||||||
}
|
}
|
||||||
// 删除用户基本索引数据
|
// 删除用户基本索引数据
|
||||||
res, err = tx.Exec("delete from user where id=?", userId)
|
res, err = tx.Exec("delete from `user` where id=?", userId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
tx.Rollback()
|
tx.Rollback()
|
||||||
return false, err
|
return false, err
|
||||||
|
|
Loading…
Reference in New Issue
Block a user