Commit e2a5e055 authored by 周健威's avatar 周健威

修改代码

parent 62f0a822
......@@ -344,7 +344,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}});
if(null == crosstown) {
throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE, Sets.newSet("退款第一部分押金失败,获取不了还车/定损记录,订单号:"+ orderMQDTO.getId()));
throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE, Sets.newSet(StrUtil.format("退款第一部分押金失败,获取不了还车/定损记录,订单号:{}, crosstownTypeEnum: {}", orderMQDTO.getId(), crosstownTypeEnum)));
}
if(null == crosstown.getRestDeposit()
......@@ -365,12 +365,12 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
handleDedRefundDesc = handleDed(crosstown, handleDedRefundDesc, csv);
if(csv.getDamagesAmount().compareTo(BigDecimal.ZERO) > 0) {
oad.getDeductions().add(
initDeduction(crosstown.getDeductionCost(), handleDedRefundDesc, DeductionTypeEnum.DAMAGES, OrderAccountDeduction.ORIGIN_DEPOSIT)
initDeduction(csv.getDamagesAmount(), handleDedRefundDesc, DeductionTypeEnum.DAMAGES, OrderAccountDeduction.ORIGIN_DEPOSIT)
);
}
//剩余押金 = 押金 - 违章保证金 - 定损金额
oad.setDepositAmount(oad.getDepositAmount().subtract(illegalReserve).subtract(crosstown.getDeductionCost()));
oad.setDepositAmount(oad.getDepositAmount().subtract(illegalReserve).subtract(csv.getDamagesAmount()));
handleCrosstownDetail(crosstown, oad);
//退款
......@@ -413,7 +413,12 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
handelCostDetailExtend(csv);
}});
orderMsgBiz.handelMsgDeposit(orderMQDTO.getOrderRentVehicleDetail(), orderMQDTO, userFeign.userDetailById(orderMQDTO.getUserId()).getData());
//捕捉异常
try {
orderMsgBiz.handelMsgDeposit(orderMQDTO.getOrderRentVehicleDetail(), orderMQDTO, userFeign.userDetailById(orderMQDTO.getUserId()).getData());
}catch (Exception e) {
log.error(e.getMessage(), e);
}
}
}
......
package com.xxfc.platform.order.biz.inner;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
import com.github.wxiaoqi.security.common.exception.BaseException;
......@@ -407,7 +408,7 @@ public class OrderMsgBiz {
residueAmount = BigDecimal.ZERO;
}else {
throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE, new HashSet<String>() {{
add("当前退款状态不对,订单号:"+ baseOrder.getNo());
add(StrUtil.format("当前退款状态不对,订单号:{} baseOrder.getRefundStatus(): {}", baseOrder.getNo(), baseOrder.getRefundStatus()));
}});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment