Browse Source

feature 增加用户金额更新的日志信息

xiahan 2 months ago
parent
commit
1cec8998f9

+ 3 - 1
zhsw-wechat-common/src/main/java/com/rongwei/wechat/system/wechat/impl/PaymentRecordServiceImpl.java

@@ -145,7 +145,7 @@ public class PaymentRecordServiceImpl implements PaymentRecordService {
             if (StringUtils.isNotBlank(zdId)) {
                 unpaidDoList = swBillManagementUnpaidService.getBaseMapper().selectBatchIds(Arrays.asList(zdId.split(",")));
             }
-
+            log.error("本次缴费对应的账单信息:{}", unpaidDoList);
 
             // 生成缴费记录
             SwBillingRecordDo swBillingRecordDo = generateRecord(swUserManagementDo, unpaidDoList, createPaymentRecordVo.getPaymentAmount(),
@@ -169,6 +169,8 @@ public class PaymentRecordServiceImpl implements PaymentRecordService {
     public void dataUpdate(SwBillingRecordDo swBillingRecordDo, SwUserManagementDo swUserManagementDo, List<SwBillManagementPaidDo> bills,
                            List<SwBillManagementUnpaidDo> unpaidDoList) {
         BigDecimal balanceChange = swBillingRecordDo.getAfterpaymentbalance().subtract(swUserManagementDo.getAccountbalance());
+        log.debug("开始更新当前用户的余额信息!用户:{}的原余额为:{},缴费金额为:{},实际应缴为:{},金额变化:{}", swUserManagementDo.getUsernumber(),
+                swUserManagementDo.getAccountbalance(),swBillingRecordDo.getPaidin(),swBillingRecordDo.getActualdue(),balanceChange);
         swUserManagementService.balanceAdd(swUserManagementDo.getId(), balanceChange);
         swBillingRecordService.save(swBillingRecordDo);
         if (!bills.isEmpty()) {