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)).
|
||||
Where(builder.Eq{"user_id": userId}).
|
||||
NoAutoCondition().
|
||||
Unscoped().
|
||||
Select("id").
|
||||
Find(&parkIds)
|
||||
if err != nil {
|
||||
|
@ -594,7 +595,7 @@ func (g _GodModeService) DeleteUser(userId string) (bool, error) {
|
|||
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 {
|
||||
tx.Rollback()
|
||||
return false, err
|
||||
|
|
Loading…
Reference in New Issue
Block a user