|
|
|
@@ -81,12 +81,9 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<WxMerchant> listAsPage(WxMerchant record, Integer pageIndex, Integer pageSize) { |
|
|
|
|
|
|
|
|
|
|
|
WxRentContract wxRentContract = new WxRentContract(); |
|
|
|
wxRentContract.setTenantId(record.getTenantId()); |
|
|
|
List<WxRentContract> list = wxRentContractMapper.findList(wxRentContract); |
|
|
|
|
|
|
|
PageHelper.startPage(pageIndex, pageSize); |
|
|
|
List<WxMerchant> merchants = wxMerchantMapper.findList(record); |
|
|
|
for (WxMerchant merchant : merchants) { |
|
|
|
@@ -99,14 +96,14 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
merchant.setRentalEndDate(collect.get(0).getRentalEndDate()); |
|
|
|
} |
|
|
|
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<Map<String, Object>> shops = new ArrayList<>(); |
|
|
|
List<WxMerchantShop> wxMerchantShopList = wxMerchantShopMapper.findList(wxMerchantShop); |
|
|
|
for (WxMerchantShop merchantShop : wxMerchantShopList) { |
|
|
|
WxShop shop = new WxShop(); |
|
|
|
record.setId(merchantShop.getShopId()); |
|
|
|
shop.setId(merchantShop.getShopId()); |
|
|
|
List<Map<String, Object>> shoplist = wxShopMapper.findListMap(shop); |
|
|
|
if (shoplist.size() > 0) { |
|
|
|
shops.add(shoplist.get(0)); |
|
|
|
@@ -115,7 +112,6 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
merchant.setShoplist(shops); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
PageInfo<WxMerchant> pageInfo = new PageInfo<>(merchants); |
|
|
|
return pageInfo; |
|
|
|
} |
|
|
|
|