| @@ -67,10 +67,11 @@ public class WxMapController extends BaseController { | |||||
| && EnumShopStatus.RENT.getCode().toString().equals(wxShopObject.get("status").toString())){ | && EnumShopStatus.RENT.getCode().toString().equals(wxShopObject.get("status").toString())){ | ||||
| //已出租 | //已出租 | ||||
| long shopId = Long.parseLong(wxShopObject.get("id").toString()); | long shopId = Long.parseLong(wxShopObject.get("id").toString()); | ||||
| String shopNumber = wxShopObject.get("shopNumber").toString(); | |||||
| wxMerchantObject = wxMerchantService.detailByShopId(getTenantInfo(), shopId); | wxMerchantObject = wxMerchantService.detailByShopId(getTenantInfo(), shopId); | ||||
| if(wxMerchantObject != null && !wxMerchantObject.isEmpty()){ | if(wxMerchantObject != null && !wxMerchantObject.isEmpty()){ | ||||
| long merchantId = Long.parseLong(wxMerchantObject.get("id").toString()); | long merchantId = Long.parseLong(wxMerchantObject.get("id").toString()); | ||||
| wxRentContractObject = wxRentContractService.currentValidByMerchantId(getTenantInfo(),merchantId); | |||||
| wxRentContractObject = wxRentContractService.currentValidByMerchantId(getTenantInfo(),merchantId,shopNumber); | |||||
| } | } | ||||
| } | } | ||||
| resultObject.put("wxShop",wxShopObject); | resultObject.put("wxShop",wxShopObject); | ||||
| @@ -128,5 +128,5 @@ public interface WxRentContractService { | |||||
| @Deprecated | @Deprecated | ||||
| Map<String, Object> findRentByShop(Long shopId); | Map<String, Object> findRentByShop(Long shopId); | ||||
| Map<String, Object> currentValidByMerchantId(TenantEntity tenantInfo, Long merchantId); | |||||
| Map<String, Object> currentValidByMerchantId(TenantEntity tenantInfo, Long merchantId,String shopNumber); | |||||
| } | } | ||||
| @@ -3215,10 +3215,11 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public Map<String, Object> currentValidByMerchantId(TenantEntity tenantInfo, Long merchantId) { | |||||
| public Map<String, Object> currentValidByMerchantId(TenantEntity tenantInfo, Long merchantId,String shopNumber) { | |||||
| WxRentContract rentContract = new WxRentContract(); | WxRentContract rentContract = new WxRentContract(); | ||||
| rentContract.updateTenantInfo(tenantInfo); | rentContract.updateTenantInfo(tenantInfo); | ||||
| rentContract.setMerchantId(merchantId); | rentContract.setMerchantId(merchantId); | ||||
| rentContract.setShopNumber(shopNumber); | |||||
| List<Integer> statuss = new ArrayList<>(); | List<Integer> statuss = new ArrayList<>(); | ||||
| statuss.add(EnumRentContractStatus.READY_FOR_PAING.getCode()); | statuss.add(EnumRentContractStatus.READY_FOR_PAING.getCode()); | ||||
| statuss.add(EnumRentContractStatus.PAING.getCode()); | statuss.add(EnumRentContractStatus.PAING.getCode()); | ||||
| @@ -818,6 +818,9 @@ | |||||
| and rc.`parent_tenant_id` = #{parentTenantId} | and rc.`parent_tenant_id` = #{parentTenantId} | ||||
| </if> | </if> | ||||
| and rc.`merchant_id` = #{merchantId} | and rc.`merchant_id` = #{merchantId} | ||||
| <if test=" null != shopNumber and shopNumber!=''"> | |||||
| and rc.shop_name like concat('%',#{shopNumber},'%') | |||||
| </if> | |||||
| and rc.`rental_start_date` <= now() and rc.rental_end_date >= now() | and rc.`rental_start_date` <= now() and rc.rental_end_date >= now() | ||||
| <if test=" null != statuss "> | <if test=" null != statuss "> | ||||
| and rc.`status` in | and rc.`status` in | ||||