作者 yangfu

模式查询列表修改

@@ -29,6 +29,8 @@ type SearchCooperationModeQuery struct { @@ -29,6 +29,8 @@ type SearchCooperationModeQuery struct {
29 UserId int64 `cname:"用户ID" json:"userId"` 29 UserId int64 `cname:"用户ID" json:"userId"`
30 // 用户基础数据id 30 // 用户基础数据id
31 UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"` 31 UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
  32 + // 共创模式状态,1启用,2禁用
  33 + Status int32 `json:"status"`
32 } 34 }
33 35
34 func (searchCooperationModeQuery *SearchCooperationModeQuery) Valid(validation *validation.Validation) { 36 func (searchCooperationModeQuery *SearchCooperationModeQuery) Valid(validation *validation.Validation) {
@@ -188,6 +188,9 @@ func (repository *CooperationModeRepository) Find(queryOptions map[string]interf @@ -188,6 +188,9 @@ func (repository *CooperationModeRepository) Find(queryOptions map[string]interf
188 if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 { 188 if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
189 query.Where("org->>'orgId' = '?'", orgId) 189 query.Where("org->>'orgId' = '?'", orgId)
190 } 190 }
  191 + if status, ok := queryOptions["status"]; ok && status.(int32) > 0 {
  192 + query.Where("status = ?", status)
  193 + }
191 if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 { 194 if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
192 newOrgIds := utils.SliceItoa(orgIds.([]int64)) 195 newOrgIds := utils.SliceItoa(orgIds.([]int64))
193 query.Where("org->>'orgId' in (?)", pg.In(newOrgIds)) 196 query.Where("org->>'orgId' in (?)", pg.In(newOrgIds))