| @@ -202,13 +202,22 @@ public class WxMerchantController extends BaseController { | |||||
| List<Long> ids = wxMerchantService.getShopMerchantIds(sq); | List<Long> ids = wxMerchantService.getShopMerchantIds(sq); | ||||
| if (null != ids && ids.size() > 0 ) { | if (null != ids && ids.size() > 0 ) { | ||||
| wxMerchant.setIds(ids); | wxMerchant.setIds(ids); | ||||
| wxMerchant.setQueryCondition("m.id in ("+StringUtils.join(ids,",")+") or m.name like '%"+wxMerchant.getSearchKey()+"%' "); | |||||
| }else { | |||||
| wxMerchant.setName(wxMerchant.getSearchKey()); | |||||
| } | |||||
| //或者根据商户名称查询 | |||||
| WxMerchant mq = new WxMerchant(); | |||||
| mq.updateTenantInfo(wxMerchant); | |||||
| mq.setName(wxMerchant.getSearchKey()); | |||||
| List<Long> mids = wxMerchantService.findIdList(mq); | |||||
| if (null != mids && mids.size() > 0 ) { | |||||
| if (null != wxMerchant.getIds()) { | |||||
| wxMerchant.getIds().addAll(mids); | |||||
| }else { | |||||
| wxMerchant.setIds(mids); | |||||
| } | |||||
| } | } | ||||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | ||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| //wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | WxUserDataRule dataRule = this.getCurrentDataFloors(); | ||||
| if (null != dataRule) { | if (null != dataRule) { | ||||
| wxMerchant.setFloorForRule(dataRule.getFloorIds()); | wxMerchant.setFloorForRule(dataRule.getFloorIds()); | ||||
| @@ -506,6 +506,4 @@ public class WxMerchant extends TenantEntity { | |||||
| private List<Integer> privateRentShopTypeList; | private List<Integer> privateRentShopTypeList; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<String> createShopNumberList; | private List<String> createShopNumberList; | ||||
| @TableField(exist = false) | |||||
| public String queryCondition; | |||||
| } | } | ||||
| @@ -178,7 +178,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| Map<Long,WxRentContract> merchantRentMap = new HashMap<Long,WxRentContract>(); | Map<Long,WxRentContract> merchantRentMap = new HashMap<Long,WxRentContract>(); | ||||
| initQueryParam(record,false, merchantRentMap); | initQueryParam(record,false, merchantRentMap); | ||||
| PageInfo<WxMerchant> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findList(record)); | PageInfo<WxMerchant> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findList(record)); | ||||
| if (null != page && null != page.getList()){ | |||||
| if (null != page && null != page.getList() && page.getList().size() > 0 ) { | |||||
| List<Long> merchantIds = new ArrayList<Long>(); | List<Long> merchantIds = new ArrayList<Long>(); | ||||
| for (int i = 0 ; i < page.getList().size(); i++) { | for (int i = 0 ; i < page.getList().size(); i++) { | ||||
| WxMerchant m = page.getList().get(i); | WxMerchant m = page.getList().get(i); | ||||
| @@ -187,10 +187,6 @@ | |||||
| and m.`create_shop_type` = #{createShopType} | and m.`create_shop_type` = #{createShopType} | ||||
| </if> | </if> | ||||
| <if test=" null != queryCondition and '' != queryCondition"> | |||||
| and ( #{queryCondition} ) | |||||
| </if> | |||||
| <if test=" null != privateRentShopTypeList and privateRentShopTypeList.size > 0"> | <if test=" null != privateRentShopTypeList and privateRentShopTypeList.size > 0"> | ||||
| and m.`create_shop_type` in | and m.`create_shop_type` in | ||||
| <foreach collection="privateRentShopTypeList" index="index" item="prstItem" open="(" separator="," close=")"> | <foreach collection="privateRentShopTypeList" index="index" item="prstItem" open="(" separator="," close=")"> | ||||