소스 검색

[招商][任务]可出租日期

release_toaliyun_real
Burce 6 년 전
부모
커밋
24833d066f
2개의 변경된 파일9개의 추가작업 그리고 5개의 파일을 삭제
  1. +8
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java

+ 8
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java 파일 보기

@@ -1,5 +1,6 @@
package com.iformall.service.impl; package com.iformall.service.impl;


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


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java 파일 보기

@@ -152,7 +152,7 @@ public class InvestBizServiceImpl implements InvestBizService {
WxRentContract contract = shopContractMap.get(shop.getId()); WxRentContract contract = shopContractMap.get(shop.getId());
if (Objects.nonNull(contract)) { if (Objects.nonNull(contract)) {
shop.setStartdate(contract.getRentalStartDate()); shop.setStartdate(contract.getRentalStartDate());
shop.setEnddate(contract.getEndDate());
shop.setEnddate(contract.getRentalEndDate());
} }
} }




불러오는 중...
취소
저장