|
|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.iformall.service.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
@@ -31,6 +32,7 @@ import org.joda.time.format.DateTimeFormat; |
|
|
|
import org.joda.time.format.DateTimeFormatter; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
@@ -2492,6 +2494,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
@Override |
|
|
|
public Map<Long, WxRentContract> selectRentContractByShopIds(Collection<Long> shopIds, String shopIdsRegexp) { |
|
|
|
List<WxRentContract> list = wxRentContractMapper.selectRentContractByShopIds(shopIds, shopIdsRegexp); |
|
|
|
List<String> shopIdArr = Arrays.asList(StringUtils.split(shopIdsRegexp,"|")) ; |
|
|
|
Map<Long, WxRentContract> allShopContract = new HashMap<>(); |
|
|
|
for (WxRentContract wxRentContract : list) { |
|
|
|
if (wxRentContract.getRentShopType().equals(EnumRentShopType.SHOP.getCode())) { |
|
|
|
@@ -2501,13 +2504,14 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
//查询rent_info 包括 shopId |
|
|
|
for (int i = 0; i < size; i++) { |
|
|
|
JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); |
|
|
|
WxRentContract rentContract = new WxRentContract(); |
|
|
|
rentContract.setRentalStartDate(wxRentContract.getRentalStartDate()); |
|
|
|
rentContract.setRentalEndDate(wxRentContract.getRentalEndDate()); |
|
|
|
Long shopId = rentInfoObject.getLong("shopId"); |
|
|
|
if (Objects.isNull(shopId) || !shopIdsRegexp.contains(String.valueOf(shopId))) { |
|
|
|
if (!shopIdArr.contains(String.valueOf(shopId))) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
WxRentContract rentContract = new WxRentContract(); |
|
|
|
BeanUtils.copyProperties(wxRentContract,rentContract); |
|
|
|
rentContract.setRentalStartDate(wxRentContract.getRentalStartDate()); |
|
|
|
rentContract.setRentalEndDate(wxRentContract.getRentalEndDate()); |
|
|
|
rentContract.setShopId(shopId); |
|
|
|
allShopContract.put(shopId, rentContract); |
|
|
|
} |
|
|
|
|