|
|
@@ -84,9 +84,9 @@ func (userDb *UserDb) UpdateUser(m *model.User, columns ...string) (int64, error |
|
|
|
|
|
|
|
func (userDb *UserDb) DeleteUser(id interface{}) (int64, error) { |
|
|
|
if reflect.TypeOf(id).Kind() == reflect.Slice { |
|
|
|
return userDb.Db.In("enterprise_id", id).Delete(model.User{}) |
|
|
|
return userDb.Db.In("id", id).Delete(model.User{}) |
|
|
|
} else { |
|
|
|
return userDb.Db.Where("enterprise_id = ?", id).Delete(model.User{}) |
|
|
|
return userDb.Db.Where("id = ?", id).Delete(model.User{}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|