diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/device/KwMerchantMeterController.java b/mallinkAdmin/src/main/java/com/iformall/controller/device/KwMerchantMeterController.java index 938a9c393..3c6d4abf9 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/device/KwMerchantMeterController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/device/KwMerchantMeterController.java @@ -106,7 +106,7 @@ public class KwMerchantMeterController extends BaseController { @GetMapping("getMechantMeter") @SystemControllerLog(description = "商户列表") public ResultData getMechantMeter() { - return new ResultData(kwMerchantMeterService.getMerchantMeter(getTenantId())); + return new ResultData(kwMerchantMeterService.getMerchantMeter(getTenantInfo())); } } diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java index 6ed92f61e..c59c25a5b 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java @@ -61,7 +61,7 @@ public interface WxRentContractMapper extends CommonMapper List selectRentContractByShopId(WxRentContract record); List selectRentContractByShopIds(@Param("shopIds") Collection shopIds, - @Param("shopIdsRegexp") String shopIdsRegexp,@Param("tenantId") String tenantId); + @Param("shopIdsRegexp") String shopIdsRegexp); 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 39532b750..b54aeace5 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxRentContractService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxRentContractService.java @@ -94,7 +94,7 @@ public interface WxRentContractService { WxRentContract getByBill(WxBillRent billRent); - Map selectRentContractByShopIds(Collection shopIds, String shopIdsRegexp,String tenantId); + Map selectRentContractByShopIds(Collection shopIds, String shopIdsRegexp); int selectContractCountByShopId(WxRentContract wxRentContract); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java index bd660ed31..942d88525 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java @@ -1396,8 +1396,6 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "订单更新"); } - // TODO B端收银台支付,核销券相关操作 - // B端刷卡支付发券 logger.info("订单刷卡发券 开始"); try { @@ -1520,7 +1518,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) public void handlePayOrderFail(WxPayOrder record, int status) { // 判断支付状态 - if (record.getPayOrderStatus() == EnumPayStatus.PAY_STATUS_WAIT.getCode()) { + if (record.getPayOrderStatus().equals(EnumPayStatus.PAY_STATUS_WAIT.getCode())) { logger.error("pay handle, payOrder " + record.getPayOrderNo() + "is complete, orderId : " + record.getOrderId()); return; 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 79b0b89e9..7d879143c 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -2497,8 +2497,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { } @Override - public Map selectRentContractByShopIds(Collection shopIds, String shopIdsRegexp,String tenantId) { - List list = wxRentContractMapper.selectRentContractByShopIds(shopIds, shopIdsRegexp,tenantId); + public Map selectRentContractByShopIds(Collection shopIds, String shopIdsRegexp) { + List list = wxRentContractMapper.selectRentContractByShopIds(shopIds, shopIdsRegexp); 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/InvestBaseServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBaseServiceImpl.java index c04dbd6cc..e72db34e0 100644 --- a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBaseServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBaseServiceImpl.java @@ -95,9 +95,10 @@ public class InvestBaseServiceImpl, T> extends ServiceIm } void checkUserAndTenant(T input, Consumer consumer) { + MallUserInfo userInfo = InvestUserContext.getUser(); InvestHelper.notNull(input, "参数 " + input); - InvestHelper.notNull(InvestUserContext.getUser(), ErrorCode.USER_IS_EMPTY); - ((InvestBaseEntity) input).setTenantId(InvestUserContext.getUser().getTenantId()); + InvestHelper.notNull(userInfo, ErrorCode.USER_IS_EMPTY); + ((InvestBaseEntity) input).updateTenantInfo(userInfo); if (consumer != null) { consumer.accept(input); } 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 c2572b2f4..5eb80c65a 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,8 +553,7 @@ 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, "|"), - InvestUserContext.getUser().getTenantId()); + shopContractMap = rentContractService.selectRentContractByShopIds(shopPointIds, StringUtils.join(shopIds, "|")); } for (WxShop shop : shops) { WxRentContract contract = shopContractMap.get(shop.getId()); @@ -767,7 +766,7 @@ 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()), InvestUserContext.getUser().getTenantId()); + Map shopContractMap = rentContractService.selectRentContractByShopIds(Arrays.asList(shop.getId()), StringUtils.join(shop.getId())); WxRentContract contract = shopContractMap.get(shop.getId()); InvestHelper.notNull(contract, "合同信息不存在"); Map map = new HashMap<>(); @@ -918,8 +917,7 @@ public class InvestBizServiceImpl implements InvestBizService { if (Objects.isNull(shop)) { return new HashMap<>(); } - return rentContractService.selectRentContractByShopIds(Collections.singletonList(shop.getId()), StringUtils.join(shop.getId(), ""), - InvestUserContext.getUser().getTenantId()); + return rentContractService.selectRentContractByShopIds(Arrays.asList(shop.getId()), StringUtils.join(shop.getId(), "")); } @Override diff --git a/mallinkService/src/main/java/com/iformall/service/kw/KwMerchantMeterService.java b/mallinkService/src/main/java/com/iformall/service/kw/KwMerchantMeterService.java index aba7178de..f449a195a 100644 --- a/mallinkService/src/main/java/com/iformall/service/kw/KwMerchantMeterService.java +++ b/mallinkService/src/main/java/com/iformall/service/kw/KwMerchantMeterService.java @@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo; import com.iformall.domain.dto.KwMerchantMeterDataDto; import com.iformall.domain.dto.KwMerchantMeterDto; import com.iformall.domain.po.KwMerchantMeter; +import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.vo.KwMerchantMeterDataVo; import com.iformall.domain.vo.KwMerchantMeterVo; import com.iformall.domain.vo.MerchantMeterVo; @@ -54,7 +55,7 @@ public interface KwMerchantMeterService { int unbind(Long meterId); int unbindBatch(Long merchantId); - List getMerchantMeter(String tenantId); + List getMerchantMeter(TenantEntity tenantEntity); } \ No newline at end of file diff --git a/mallinkService/src/main/java/com/iformall/service/kw/impl/KwBoxServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/kw/impl/KwBoxServiceImpl.java index d123d1772..d481e45a9 100644 --- a/mallinkService/src/main/java/com/iformall/service/kw/impl/KwBoxServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/kw/impl/KwBoxServiceImpl.java @@ -109,7 +109,7 @@ public class KwBoxServiceImpl implements KwBoxService { KwMeterData kwMeterData = new KwMeterData(); kwMeterData.setId(idWorker.nextId()); - kwMeterData.setTenantId(kwBox.getTenantId()); + kwMeterData.updateTenantInfo(kwBox); kwMeterData.setAddress(address); kwMeterData.setBoxId(kwBox.getId()); kwMeterData.setCreateTime(recordTime); diff --git a/mallinkService/src/main/java/com/iformall/service/kw/impl/KwMerchantMeterServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/kw/impl/KwMerchantMeterServiceImpl.java index c1f4dfde1..70d185bcc 100644 --- a/mallinkService/src/main/java/com/iformall/service/kw/impl/KwMerchantMeterServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/kw/impl/KwMerchantMeterServiceImpl.java @@ -7,6 +7,7 @@ import com.iformall.common.IdWorker; import com.iformall.domain.dto.KwMerchantMeterDataDto; import com.iformall.domain.dto.KwMerchantMeterDto; import com.iformall.domain.po.KwMerchantMeter; +import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.vo.KwMerchantMeterDataVo; import com.iformall.domain.vo.KwMerchantMeterVo; import com.iformall.domain.vo.MerchantMeterVo; @@ -88,8 +89,8 @@ public class KwMerchantMeterServiceImpl implements KwMerchantMeterService { } @Override - public List getMerchantMeter(String tenantId) { - return kwMerchantMeterMapper.getMerchantMeter(tenantId); + public List getMerchantMeter(TenantEntity tenantEntity) { + return kwMerchantMeterMapper.getMerchantMeter(tenantEntity.getTenantId()); } }