| @@ -102,11 +102,12 @@ public class WxShopController extends BaseController { | |||||
| suq.setSearchKey(wxShop.getSearchKey()); | suq.setSearchKey(wxShop.getSearchKey()); | ||||
| List<Long> shopIdList = wxShopService.getUserShopIds(suq); | List<Long> shopIdList = wxShopService.getUserShopIds(suq); | ||||
| if (null != shopIdList && shopIdList.size() <= 0 ) { | if (null != shopIdList && shopIdList.size() <= 0 ) { | ||||
| wxShop.setId(-1L); | |||||
| wxShop.setSearchKeyShopNumber(wxShop.getSearchKey()); | |||||
| }else { | }else { | ||||
| wxShop.setOrShopIds(shopIdList); | |||||
| wxShop.setSearchKeyShopIds(shopIdList); | |||||
| wxShop.setSearchKeyShopNumber(wxShop.getSearchKey()); | |||||
| } | } | ||||
| wxShop.setShopNumber(wxShop.getSearchKey()); | |||||
| } | } | ||||
| final PageInfo<WxShop> page = wxShopService.listAsPage(wxShop, pageNum, pageSize); | final PageInfo<WxShop> page = wxShopService.listAsPage(wxShop, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| @@ -229,7 +229,9 @@ public class WxShop extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String searchKey; | private String searchKey; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<Long> orShopIds; | |||||
| private List<Long> searchKeyShopIds; | |||||
| @TableField(exist = false) | |||||
| private String searchKeyShopNumber; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer shopUserType; | private Integer shopUserType; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @@ -154,13 +154,17 @@ | |||||
| </foreach> | </foreach> | ||||
| </if> | </if> | ||||
| <if test=" null != orShopIds "> | |||||
| and (id in | |||||
| <foreach collection="orShopIds" index="index" item="oridItem" open="(" separator="," close=")"> | |||||
| #{oridItem} | |||||
| </foreach> | |||||
| or `shop_number` like concat('%', #{shopNumber},'%')) | |||||
| </if> | |||||
| <if test=" null != searchKeyShopNumber and '' != searchKeyShopNumber "> | |||||
| and (`shop_number` like concat('%', #{searchKeyShopNumber},'%') | |||||
| <if test=" null != searchKeyShopIds "> | |||||
| or id in | |||||
| <foreach collection="searchKeyShopIds" index="index" item="oridItem" open="(" separator="," close=")"> | |||||
| #{oridItem} | |||||
| </foreach> | |||||
| </if> | |||||
| ) | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||