2 Commits 1f6bd9e1a8 ... 8bd7bb6a61

Author SHA1 Message Date
  Yi 8bd7bb6a61 system: userDepth update 6 days ago
  Yi 1f6bd9e1a8 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

@@ -146,7 +146,7 @@ func (s *StoreEntry) CowTransferPenReasonOptions(ctx context.Context) (*pastureP
 	}, nil
 	}, nil
 }
 }
 
 
-// SystemUserOptions 系统用户下拉框   todo 待优化
+// SystemUserOptions 系统用户下拉框  todo 待优化
 func (s *StoreEntry) SystemUserOptions(ctx context.Context, depId int) (*pasturePb.ConfigOptionsListResponse, error) {
 func (s *StoreEntry) SystemUserOptions(ctx context.Context, depId int) (*pasturePb.ConfigOptionsListResponse, error) {
 	userModel, err := s.GetUserModel(ctx)
 	userModel, err := s.GetUserModel(ctx)
 	if err != nil {
 	if err != nil {
@@ -155,7 +155,7 @@ func (s *StoreEntry) SystemUserOptions(ctx context.Context, depId int) (*pasture
 
 
 	systemUserList := make([]*model.SystemUser, 0)
 	systemUserList := make([]*model.SystemUser, 0)
 	pref := s.DB.Table(new(model.SystemUser).TableName()).
 	pref := s.DB.Table(new(model.SystemUser).TableName()).
-		Where("pasture_id = ?", userModel.AppPasture.Id).
+		Where("FIND_IN_SET('?',pasture_ids) > ?", userModel.AppPasture.Id).
 		Where("is_delete = ?", pasturePb.IsShow_Ok).
 		Where("is_delete = ?", pasturePb.IsShow_Ok).
 		Where("is_show =? ", pasturePb.IsShow_Ok)
 		Where("is_show =? ", pasturePb.IsShow_Ok)
 	if depId != -1 && depId > 0 {
 	if depId != -1 && depId > 0 {