Browse Source

[集团版][修改]:集团版预处理

release_toaliyun_real
Stormeye Wu 6 years ago
parent
commit
8232c8a20c
4 changed files with 16 additions and 7 deletions
  1. +2
    -1
      mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java
  2. +2
    -1
      mallinkService/src/main/java/com/iformall/service/WxRentContractService.java
  3. +3
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  4. +9
    -3
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java

+ 2
- 1
mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java View File

@@ -61,7 +61,8 @@ public interface WxRentContractMapper extends CommonMapper<WxRentContract, Long>
List<WxRentContract> selectRentContractByShopId(WxRentContract record); List<WxRentContract> selectRentContractByShopId(WxRentContract record);


List<WxRentContract> selectRentContractByShopIds(@Param("shopIds") Collection<Long> shopIds, List<WxRentContract> selectRentContractByShopIds(@Param("shopIds") Collection<Long> shopIds,
@Param("shopIdsRegexp") String shopIdsRegexp);
@Param("shopIdsRegexp") String shopIdsRegexp,
@Param("tenantId") String tenantId);


int hasContractNumber(WxRentContract wxRentContract); int hasContractNumber(WxRentContract wxRentContract);




+ 2
- 1
mallinkService/src/main/java/com/iformall/service/WxRentContractService.java View File

@@ -2,6 +2,7 @@ package com.iformall.service;


import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.domain.po.*; import com.iformall.domain.po.*;
import com.iformall.domain.po.base.TenantEntity;


import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@@ -94,7 +95,7 @@ public interface WxRentContractService {


WxRentContract getByBill(WxBillRent billRent); WxRentContract getByBill(WxBillRent billRent);


Map<Long,WxRentContract> selectRentContractByShopIds(Collection<Long> shopIds, String shopIdsRegexp);
Map<Long,WxRentContract> selectRentContractByShopIds(Collection<Long> shopIds, String shopIdsRegexp, TenantEntity tenantEntity);


int selectContractCountByShopId(WxRentContract wxRentContract); int selectContractCountByShopId(WxRentContract wxRentContract);




+ 3
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java View File

@@ -11,6 +11,7 @@ import com.iformall.common.Result;
import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.domain.po.*; import com.iformall.domain.po.*;
import com.iformall.domain.po.base.BaseEntity; import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.BillTimeVo; import com.iformall.domain.vo.BillTimeVo;
import com.iformall.domain.vo.RatioVo; import com.iformall.domain.vo.RatioVo;
import com.iformall.enums.*; import com.iformall.enums.*;
@@ -2497,8 +2498,8 @@ public class WxRentContractServiceImpl implements WxRentContractService {
} }


@Override @Override
public Map<Long, WxRentContract> selectRentContractByShopIds(Collection<Long> shopIds, String shopIdsRegexp) {
List<WxRentContract> list = wxRentContractMapper.selectRentContractByShopIds(shopIds, shopIdsRegexp);
public Map<Long, WxRentContract> selectRentContractByShopIds(Collection<Long> shopIds, String shopIdsRegexp, TenantEntity tenantEntity) {
List<WxRentContract> list = wxRentContractMapper.selectRentContractByShopIds(shopIds, shopIdsRegexp, tenantEntity.getTenantId());
List<String> shopIdArr = Arrays.asList(StringUtils.split(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) {


+ 9
- 3
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java View File

@@ -553,7 +553,9 @@ public class InvestBizServiceImpl implements InvestBizService {
if (CollectionUtils.isNotEmpty(shops)) { if (CollectionUtils.isNotEmpty(shops)) {
Collection<Long> shopPointIds = buildShopContractQuery(shops, EnumRentShopType.POINT); Collection<Long> shopPointIds = buildShopContractQuery(shops, EnumRentShopType.POINT);
Collection<Long> shopIds = buildShopContractQuery(shops, EnumRentShopType.SHOP); Collection<Long> shopIds = buildShopContractQuery(shops, EnumRentShopType.SHOP);
shopContractMap = rentContractService.selectRentContractByShopIds(shopPointIds, StringUtils.join(shopIds, "|"));
shopContractMap = rentContractService.selectRentContractByShopIds(shopPointIds,
StringUtils.join(shopIds, "|"),
InvestUserContext.getUser());
} }
for (WxShop shop : shops) { for (WxShop shop : shops) {
WxRentContract contract = shopContractMap.get(shop.getId()); WxRentContract contract = shopContractMap.get(shop.getId());
@@ -766,7 +768,9 @@ public class InvestBizServiceImpl implements InvestBizService {
WxShop shop = shopService.getById(shopId); WxShop shop = shopService.getById(shopId);
InvestHelper.notNull(shop, "shop 不存在"); InvestHelper.notNull(shop, "shop 不存在");
//3、商品合同信息 //3、商品合同信息
Map<Long, WxRentContract> shopContractMap = rentContractService.selectRentContractByShopIds(Arrays.asList(shop.getId()), StringUtils.join(shop.getId()));
Map<Long, WxRentContract> shopContractMap = rentContractService.selectRentContractByShopIds(Arrays.asList(shop.getId()),
StringUtils.join(shop.getId()),
InvestUserContext.getUser());
WxRentContract contract = shopContractMap.get(shop.getId()); WxRentContract contract = shopContractMap.get(shop.getId());
InvestHelper.notNull(contract, "合同信息不存在"); InvestHelper.notNull(contract, "合同信息不存在");
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
@@ -917,7 +921,9 @@ public class InvestBizServiceImpl implements InvestBizService {
if (Objects.isNull(shop)) { if (Objects.isNull(shop)) {
return new HashMap<>(); return new HashMap<>();
} }
return rentContractService.selectRentContractByShopIds(Arrays.asList(shop.getId()), StringUtils.join(shop.getId(), ""));
return rentContractService.selectRentContractByShopIds(Arrays.asList(shop.getId()),
StringUtils.join(shop.getId(), ""),
InvestUserContext.getUser());
} }


@Override @Override


Loading…
Cancel
Save