diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java index c59c25a5b..6d2eac394 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java @@ -61,7 +61,8 @@ public interface WxRentContractMapper extends CommonMapper List selectRentContractByShopId(WxRentContract record); List selectRentContractByShopIds(@Param("shopIds") Collection shopIds, - @Param("shopIdsRegexp") String shopIdsRegexp); + @Param("shopIdsRegexp") String shopIdsRegexp, + @Param("tenantId") String tenantId); int hasContractNumber(WxRentContract wxRentContract); diff --git a/mallinkService/src/main/java/com/iformall/service/WxRentContractService.java b/mallinkService/src/main/java/com/iformall/service/WxRentContractService.java index b54aeace5..72033bade 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxRentContractService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxRentContractService.java @@ -2,6 +2,7 @@ package com.iformall.service; import com.iformall.common.ResultData; import com.iformall.domain.po.*; +import com.iformall.domain.po.base.TenantEntity; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -94,7 +95,7 @@ public interface WxRentContractService { WxRentContract getByBill(WxBillRent billRent); - Map selectRentContractByShopIds(Collection shopIds, String shopIdsRegexp); + Map selectRentContractByShopIds(Collection shopIds, String shopIdsRegexp, TenantEntity tenantEntity); int selectContractCountByShopId(WxRentContract wxRentContract); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index 8a4ea4c6b..cb8faaa35 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -11,6 +11,7 @@ import com.iformall.common.Result; import com.iformall.common.ResultData; import com.iformall.domain.po.*; 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.RatioVo; import com.iformall.enums.*; @@ -2497,8 +2498,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { } @Override - public Map selectRentContractByShopIds(Collection shopIds, String shopIdsRegexp) { - List list = wxRentContractMapper.selectRentContractByShopIds(shopIds, shopIdsRegexp); + public Map selectRentContractByShopIds(Collection shopIds, String shopIdsRegexp, TenantEntity tenantEntity) { + List list = wxRentContractMapper.selectRentContractByShopIds(shopIds, shopIdsRegexp, tenantEntity.getTenantId()); List shopIdArr = Arrays.asList(StringUtils.split(shopIdsRegexp,"|")) ; Map allShopContract = new HashMap<>(); for (WxRentContract wxRentContract : list) { diff --git a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java index 5eb80c65a..476c5c7c3 100644 --- a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java @@ -553,7 +553,9 @@ public class InvestBizServiceImpl implements InvestBizService { if (CollectionUtils.isNotEmpty(shops)) { Collection shopPointIds = buildShopContractQuery(shops, EnumRentShopType.POINT); Collection 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) { WxRentContract contract = shopContractMap.get(shop.getId()); @@ -766,7 +768,9 @@ public class InvestBizServiceImpl implements InvestBizService { WxShop shop = shopService.getById(shopId); InvestHelper.notNull(shop, "shop 不存在"); //3、商品合同信息 - Map shopContractMap = rentContractService.selectRentContractByShopIds(Arrays.asList(shop.getId()), StringUtils.join(shop.getId())); + Map shopContractMap = rentContractService.selectRentContractByShopIds(Arrays.asList(shop.getId()), + StringUtils.join(shop.getId()), + InvestUserContext.getUser()); WxRentContract contract = shopContractMap.get(shop.getId()); InvestHelper.notNull(contract, "合同信息不存在"); Map map = new HashMap<>(); @@ -917,7 +921,9 @@ public class InvestBizServiceImpl implements InvestBizService { if (Objects.isNull(shop)) { 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