作者 陈志颖

fix:批量删除用户

... ... @@ -352,7 +352,7 @@ func (service SyncEmployeeService) deleteEmployeeData(data DeleteUserData) error
if err = usersRepository.Remove(data.Ids); err != nil {
return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error())
}
// TODO 删除栏目设置
// 删除栏目设置
var columnSettingRepository domain.ColumnSettingRepository
if value, errFac := factory.CreateColumnSettingRepository(map[string]interface{}{
"transactionContext": transactionContext,
... ...
... ... @@ -123,7 +123,7 @@ func (repository *ColumnSettingRepository) Find(queryOptions map[string]interfac
var columnSettingModels []*models.ColumnSetting
columnSettings := make([]*domain.ColumnSetting, 0)
query := tx.Model(&columnSettingModels)
if ids, ok := queryOptions["ids"]; ok {
if ids, ok := queryOptions["ids"]; ok && len(ids.([]int64)) != 0 {
query = query.Where("column_setting.uid IN (?)", pg.In(ids.([]int64)))
}
if uid, ok := queryOptions["uid"]; ok {
... ...