2 Commits 4845f47fdf ... e7b26b109b

Author SHA1 Message Date
  Yi e7b26b109b system: userDepth update 6 days ago
  Yi 4845f47fdf system: userDepth update 6 days ago
1 changed files with 2 additions and 2 deletions
  1. 2 2
      module/backend/enum_options.go

+ 2 - 2
module/backend/enum_options.go

@@ -155,11 +155,11 @@ func (s *StoreEntry) SystemUserOptions(ctx context.Context, depId int) (*pasture
 
 	systemUserList := make([]*model.SystemUser, 0)
 	pref := s.DB.Table(new(model.SystemUser).TableName()).
-		Where("FIND_IN_SET('?',pasture_ids) > ?", userModel.AppPasture.Id, 0).
+		Where("FIND_IN_SET('?',pasture_ids) > 0", userModel.AppPasture.Id).
 		Where("is_delete = ?", pasturePb.IsShow_Ok).
 		Where("is_show =? ", pasturePb.IsShow_Ok)
 	if depId != -1 && depId > 0 {
-		pref = pref.Where("FIND_IN_SET('?',dept_ids) > ?", depId, 0)
+		pref = pref.Where("FIND_IN_SET('?',dept_ids) > 0", depId)
 	}
 
 	if err = pref.Find(&systemUserList).Error; err != nil {