|
|
@@ -218,6 +218,10 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
|
|
|
private final UserTicketClearedRecordMapper userTicketClearedRecordMapper;
|
|
|
|
|
|
+ private final NetflixUserAccountSubmitRecoverRecordMapper netflixUserAccountSubmitRecoverRecordMapper;
|
|
|
+
|
|
|
+ private final NetflixUserChangeOtherTicketRecordMapper netflixUserChangeOtherTicketRecordMapper;
|
|
|
+
|
|
|
private static final GlobalThreadPoolTaskExecutor TASK_POOL = GlobalThreadPoolTaskExecutor.getInstance();
|
|
|
|
|
|
@Override
|
|
|
@@ -912,6 +916,13 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
if (OrderDon.Status.noPayment == orderDon.getStatus() || OrderDon.Status.close == orderDon.getStatus()) {
|
|
|
throw BusinessRuntimeException.getInstance("订单{0}状态不支持退款", orderDon.getStatus());
|
|
|
}
|
|
|
+ if (goodsDon.getId() == Constant.NETFLIX_GID) {
|
|
|
+ Integer selectCount = netflixUserChangeOtherTicketRecordMapper.selectCount(Wrappers.lambdaQuery(NetflixUserChangeOtherTicketRecord.class)
|
|
|
+ .eq(NetflixUserChangeOtherTicketRecord::getOrderId, orderDon.getId()));
|
|
|
+ if (selectCount > 0) {
|
|
|
+ throw BusinessRuntimeException.getInstance("该奈飞车票已替换其他车票,无法退款");
|
|
|
+ }
|
|
|
+ }
|
|
|
if (goodsDon.getType() == 1 && sku != null) {
|
|
|
//虚拟原订单是否已过期
|
|
|
Integer months = sku.getMonths();
|
|
|
@@ -1164,6 +1175,19 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
}
|
|
|
//HBO GO退款,车队上架
|
|
|
setUpIfEmpty(orderDon.getGoodsId(), orderDon.getRelationId());
|
|
|
+
|
|
|
+ if (orderDon.getGoodsId() == Constant.NETFLIX_GID) {
|
|
|
+ List<Long> userIdList = userBindRelationService.getRelationUserIdList(orderDon.getUserId(), null);
|
|
|
+ NetflixUserAccountSubmitRecoverRecord recoverRecord = netflixUserAccountSubmitRecoverRecordMapper.selectOne(Wrappers.lambdaQuery(NetflixUserAccountSubmitRecoverRecord.class)
|
|
|
+ .eq(NetflixUserAccountSubmitRecoverRecord::getRelationId, orderDon.getRelationId())
|
|
|
+ .in(NetflixUserAccountSubmitRecoverRecord::getUserId, userIdList)
|
|
|
+ .eq(NetflixUserAccountSubmitRecoverRecord::getStatus, 0)
|
|
|
+ .last("limit 1"));
|
|
|
+ if (recoverRecord != null) {
|
|
|
+ recoverRecord.setStatus(3);
|
|
|
+ netflixUserAccountSubmitRecoverRecordMapper.updateById(recoverRecord);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//处理下级渠道分销提成
|