|
@@ -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 {
|