Parcourir la source

完善日志,解决费用不对的问题

lipf il y a 2 mois
Parent
commit
a3f3dd4041

+ 3 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsFeeAuditServiceImpl.java

@@ -494,6 +494,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
 
             // 更新用户账户
             feeOrders = feeOrdersService.getById(param.getOrderNo());
+            log.info("根据订单查询出的费用信息如下:feeOrders=[{}]", JSONUtil.toJsonStr(feeOrders));
             HttpResult<SysUser> sysUserResult = orgClient.getUserOnlyIdByMobile(orders.getRealQuoteUserId());
             SysUser ywySysUser = sysUserResult.getData();
             HttpResult<SysUserAccount> result = orgClient.accountGet(ywySysUser.getId());
@@ -517,6 +518,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
             }
             BigDecimal sumAmountUnpaid = userAccount.getSumAmountUnpaid();
             BigDecimal amount = feeOrders.getTotalPayablePremium();
+            log.info("费用审核通过。 amount=[{}].feeOrders=[{}]",amount, JSONUtil.toJsonStr(feeOrders));
             userAccount.setSumAmount(BigDecimalUtil.add(amount,userAccount.getSumAmount()));
             userAccount.setSumAmountUnpaid(BigDecimalUtil.add(amount, sumAmountUnpaid));
             orgClient.saveOrUpdate(userAccount);
@@ -531,6 +533,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
             exportChangeLog.setIsDelete(0);
             exportChangeLog.setRemark("保单费用");
             exportChangeLog.setAmountBefore(sumAmountUnpaid);
+            log.info("准备调用orgClient保存账号变更明细:exportChangeLog=[{}]", JSONUtil.toJsonStr(exportChangeLog));
             orgClient.addUserAccountChangeLog(exportChangeLog);
 
             // 进入应收表

+ 2 - 0
tenant/organization/src/main/java/com/jzg/organization/controller/UserAccountController.java

@@ -1,6 +1,7 @@
 package com.jzg.organization.controller;
 
 
+import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jzg.commons.core.base.BaseController;
 import com.jzg.commons.core.page.HttpResult;
@@ -114,6 +115,7 @@ public class UserAccountController {
     @PostMapping("/addUserAccountChangeLog")
     public HttpResult<String> addUserAccountChangeLog(@RequestBody SysUserAccountChangeLog changeLog){
         try{
+            log.info("添加用户钱包账户记录。 changeLog=[{}]", JSONUtil.toJsonStr(changeLog));
            boolean save = sysUserAccountIncomeLogService.save(changeLog);
             if(save){
                 return HttpResult.ok("保存业务员账号明细成功");