From ab81e62477b138f7b93194d92dd9b6cb1916279f Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Thu, 18 Jan 2024 15:09:51 +0800 Subject: [PATCH] bug --- .../fuint/api/fuyou/controller/FyPayController.java | 12 ++++++++++++ .../order/service/impl/OilOrderServiceImpl.java | 6 ------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/FyPayController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/FyPayController.java index b6ebf50be..934ce34b3 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/FyPayController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/FyPayController.java @@ -3,7 +3,9 @@ package com.fuint.api.fuyou.controller; import cn.hutool.core.util.ObjectUtil; import com.fasterxml.jackson.core.JsonProcessingException; import com.fuint.api.fuyou.entity.Const; +import com.fuint.api.fuyou.entity.MerchantConfig; import com.fuint.api.fuyou.service.FyPayService; +import com.fuint.api.fuyou.service.MerchantConfigService; import com.fuint.api.fuyou.util.Utils; import com.fuint.business.integral.service.IntegralOrdersService; import com.fuint.business.marketingActivity.cardFule.service.CardFuelRecordService; @@ -44,6 +46,9 @@ public class FyPayController { @Lazy private AllOrderInfoService allOrderInfoService; @Autowired + @Lazy + private MerchantConfigService merchantConfigService; + @Autowired private RedisLock redisLock; // 接收支付平台异步通知的接口 @@ -67,6 +72,13 @@ public class FyPayController { allOrderInfo.setStatus("paid"); allOrderInfo.setPayTime(new Date()); allOrderInfoService.updateAllOrderInfo(allOrderInfo); + + // 修改配置收款账户余额信息 + MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(allOrderInfo.getStoreId()); + Double beforeAmount = merchantConfig.getAmount(); + Double afterAmount = beforeAmount + allOrderInfo.getPayMoney(); + merchantConfig.setAmount(afterAmount); + merchantConfigService.updateMerch(merchantConfig); } updateOrderStatus(orderNo,allOrderInfo.getType()); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java index b01596215..a210ad424 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java @@ -1090,12 +1090,6 @@ public class OilOrderServiceImpl extends ServiceImpl i this.updateGrowthValue(oilOrder.getPayAmount(),userId, Integer.valueOf(oilOrder.getOils()),null,oilOrder.getStoreId(),orderNo); this.addOilTracks(oilOrder,oilOrder.getStoreId()); staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(),oilOrder.getOilNum(),"1",orderNo); -// 修改配置收款账户余额信息 - MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(oilOrder.getStoreId()); - Double beforeAmount = merchantConfig.getAmount(); - Double afterAmount = beforeAmount + oilOrder.getPayAmount(); - merchantConfig.setAmount(afterAmount); - merchantConfigService.updateMerch(merchantConfig); CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo); if (ObjectUtil.isNotEmpty(cashierOrder)){