作者 唐旭辉

bug 修复

@@ -176,8 +176,14 @@ func (repository PartnerInfoRepository) CountAll(queryOption domain.PartnerFindQ @@ -176,8 +176,14 @@ func (repository PartnerInfoRepository) CountAll(queryOption domain.PartnerFindQ
176 if queryOption.RegionInfo != nil { 176 if queryOption.RegionInfo != nil {
177 query = query.Where("region_info::jsonb->>'regionName' like ?", "%"+queryOption.RegionInfo.RegionName+"%") 177 query = query.Where("region_info::jsonb->>'regionName' like ?", "%"+queryOption.RegionInfo.RegionName+"%")
178 } 178 }
  179 + //合伙人类型
179 if len(queryOption.PartnerCategory) > 0 { 180 if len(queryOption.PartnerCategory) > 0 {
180 - query = query.WhereIn("partner_category in(?)", queryOption.PartnerCategory) 181 + query = query.WhereGroup(func(q *orm.Query) (*orm.Query, error) {
  182 + for _, value := range queryOption.PartnerCategory {
  183 + q = q.WhereOr(`partner_category_infos@> '[{"id":?}]'`, value)
  184 + }
  185 + return q, nil
  186 + })
181 } 187 }
182 if queryOption.CompanyId > 0 { 188 if queryOption.CompanyId > 0 {
183 query = query.Where("company_id=?", queryOption.CompanyId) 189 query = query.Where("company_id=?", queryOption.CompanyId)