|
@@ -72,6 +72,9 @@ public class UserOrderRefundServiceImpl extends ServiceImpl<UserOrderRefundDao,
|
|
@Autowired
|
|
@Autowired
|
|
private PlatformCashAccountRecordService platformCashAccountRecordService;
|
|
private PlatformCashAccountRecordService platformCashAccountRecordService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private TenantAccountRecordService tenantAccountRecordService;
|
|
|
|
+
|
|
//验证是否可以退款,获取退款金额信息
|
|
//验证是否可以退款,获取退款金额信息
|
|
private static final Map<GoodTypeEnum, Function<OrderRefundReq, HttpResponseResult<RefundCreateRes>>> refundCreate = new HashMap<>();
|
|
private static final Map<GoodTypeEnum, Function<OrderRefundReq, HttpResponseResult<RefundCreateRes>>> refundCreate = new HashMap<>();
|
|
//插入退款后执行
|
|
//插入退款后执行
|
|
@@ -643,6 +646,20 @@ public class UserOrderRefundServiceImpl extends ServiceImpl<UserOrderRefundDao,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 处理机构入账
|
|
// 处理机构入账
|
|
|
|
+ List<TenantAccountRecord> list = tenantAccountRecordService.lambdaQuery()
|
|
|
|
+ .eq(TenantAccountRecord::getOrderNo, vo.getOrderNo())
|
|
|
|
+ .list();
|
|
|
|
+ if (CollectionUtils.isNotEmpty(list)) {
|
|
|
|
+ for (TenantAccountRecord tenantAccountRecord : list) {
|
|
|
|
+ if (PostStatusEnum.WAIT.getCode().equals(tenantAccountRecord.getPostStatus())
|
|
|
|
+ || PostStatusEnum.FROZEN.getCode().equals(tenantAccountRecord.getPostStatus())) {
|
|
|
|
+ tenantAccountRecord.setPostStatus(PostStatusEnum.CANCEL.getCode());
|
|
|
|
+ platformCashAccountRecordService.cancelRecord(tenantAccountRecord.getOrderNo(), tenantAccountRecord.getBizType(), tenantAccountRecord.getBizId(),
|
|
|
|
+ InOrOutEnum.OUT);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ tenantAccountRecordService.updateBatchById(list);
|
|
|
|
+ }
|
|
|
|
|
|
//处理平台入账
|
|
//处理平台入账
|
|
platformCashAccountRecordService.cancelRecord(vo.getOrderNo(), vo.getGoodType().getCode(), vo.getBizId(),
|
|
platformCashAccountRecordService.cancelRecord(vo.getOrderNo(), vo.getGoodType().getCode(), vo.getBizId(),
|