|
@@ -78,6 +78,9 @@ public class UserOrderRefundServiceImpl extends ServiceImpl<UserOrderRefundDao,
|
|
|
@Autowired
|
|
|
private UserOrderService userOrderService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TenantTeacherAccountRecordService tenantTeacherAccountRecordService;
|
|
|
+
|
|
|
//验证是否可以退款,获取退款金额信息
|
|
|
private static final Map<GoodTypeEnum, Function<OrderRefundReq, HttpResponseResult<RefundCreateRes>>> refundCreate = new HashMap<>();
|
|
|
//插入退款后执行
|
|
@@ -656,19 +659,28 @@ public class UserOrderRefundServiceImpl extends ServiceImpl<UserOrderRefundDao,
|
|
|
.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);
|
|
|
- }
|
|
|
+ tenantAccountRecord.setPostStatus(PostStatusEnum.CANCEL.getCode());
|
|
|
+ platformCashAccountRecordService.cancelRecord(tenantAccountRecord.getOrderNo(), tenantAccountRecord.getBizType(), tenantAccountRecord.getBizId(),
|
|
|
+ InOrOutEnum.OUT);
|
|
|
}
|
|
|
tenantAccountRecordService.updateBatchById(list);
|
|
|
+ // 处理机构老师入账
|
|
|
+ List<TenantTeacherAccountRecord> teacherAccountRecordList = tenantTeacherAccountRecordService.lambdaQuery()
|
|
|
+ .eq(TenantTeacherAccountRecord::getOrderNo, vo.getOrderNo())
|
|
|
+ .list();
|
|
|
+ if (CollectionUtils.isNotEmpty(teacherAccountRecordList)) {
|
|
|
+ for (TenantTeacherAccountRecord tenantTeacherAccountRecord : teacherAccountRecordList) {
|
|
|
+ tenantTeacherAccountRecord.setPostStatus(PostStatusEnum.CANCEL.getCode());
|
|
|
+ }
|
|
|
+ tenantTeacherAccountRecordService.updateBatchById(teacherAccountRecordList);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//处理平台入账
|
|
|
platformCashAccountRecordService.cancelRecord(vo.getOrderNo(), vo.getGoodType().getCode(), vo.getBizId(),
|
|
|
InOrOutEnum.IN);
|
|
|
+ platformCashAccountRecordService.cancelRecord(vo.getOrderNo(), vo.getGoodType().getCode(), vo.getBizId(),
|
|
|
+ InOrOutEnum.OUT);
|
|
|
}
|
|
|
|
|
|
/**
|