| @@ -730,34 +730,34 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| public PageInfo<WxMerchant> listVoAsPage(WxMerchant record, Integer pageIndex, Integer pageSize) { | public PageInfo<WxMerchant> listVoAsPage(WxMerchant record, Integer pageIndex, Integer pageSize) { | ||||
| PageHelper.startPage(pageIndex, pageSize); | PageHelper.startPage(pageIndex, pageSize); | ||||
| List<WxMerchant> merchants = wxMerchantMapper.findListVo(record); | List<WxMerchant> merchants = wxMerchantMapper.findListVo(record); | ||||
| for (WxMerchant merchant : merchants) { | |||||
| if (record.getRentShopType() != null) { | |||||
| List<Map<String, Object>> shops = new ArrayList<>(); | |||||
| WxMerchantShop wxMerchantShop = new WxMerchantShop(); | |||||
| wxMerchantShop.setMerchantId(merchant.getId()); | |||||
| wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||||
| List<WxMerchantShop> wxMerchantShopList = wxMerchantShopMapper.findList(wxMerchantShop); | |||||
| for (WxMerchantShop merchantShop : wxMerchantShopList) { | |||||
| WxShop shop = new WxShop(); | |||||
| shop.setId(merchantShop.getShopId()); | |||||
| List<Map<String, Object>> shoplist = wxShopMapper.findListMap(shop); | |||||
| if (shoplist.size() > 0) { | |||||
| shops.add(shoplist.get(0)); | |||||
| } | |||||
| } | |||||
| merchant.setShoplist(shops); | |||||
| } | |||||
| WxRentContract rc = new WxRentContract(); | |||||
| rc.setMerchantId(merchant.getId()); | |||||
| rc.setTenantId(merchant.getTenantId()); | |||||
| List<WxRentContract> rentContractList = wxRentContractMapper.findList(rc); | |||||
| if(CollectionUtils.isEmpty(rentContractList)){ | |||||
| merchant.setHasContract(EnumHasContract.NO.getCode()); | |||||
| }else{ | |||||
| merchant.setHasContract(EnumHasContract.HAS.getCode()); | |||||
| } | |||||
| } | |||||
| // for (WxMerchant merchant : merchants) { | |||||
| // if (record.getRentShopType() != null) { | |||||
| // List<Map<String, Object>> shops = new ArrayList<>(); | |||||
| // WxMerchantShop wxMerchantShop = new WxMerchantShop(); | |||||
| // wxMerchantShop.setMerchantId(merchant.getId()); | |||||
| // wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||||
| // List<WxMerchantShop> wxMerchantShopList = wxMerchantShopMapper.findList(wxMerchantShop); | |||||
| // for (WxMerchantShop merchantShop : wxMerchantShopList) { | |||||
| // WxShop shop = new WxShop(); | |||||
| // shop.setId(merchantShop.getShopId()); | |||||
| // List<Map<String, Object>> shoplist = wxShopMapper.findListMap(shop); | |||||
| // if (shoplist.size() > 0) { | |||||
| // shops.add(shoplist.get(0)); | |||||
| // } | |||||
| // } | |||||
| // merchant.setShoplist(shops); | |||||
| // } | |||||
| // | |||||
| // WxRentContract rc = new WxRentContract(); | |||||
| // rc.setMerchantId(merchant.getId()); | |||||
| // rc.setTenantId(merchant.getTenantId()); | |||||
| // List<WxRentContract> rentContractList = wxRentContractMapper.findList(rc); | |||||
| // if(CollectionUtils.isEmpty(rentContractList)){ | |||||
| // merchant.setHasContract(EnumHasContract.NO.getCode()); | |||||
| // }else{ | |||||
| // merchant.setHasContract(EnumHasContract.HAS.getCode()); | |||||
| // } | |||||
| // } | |||||
| PageInfo<WxMerchant> pageInfo = new PageInfo<>(merchants); | PageInfo<WxMerchant> pageInfo = new PageInfo<>(merchants); | ||||
| return pageInfo; | return pageInfo; | ||||
| } | } | ||||