Commit 711382f0 by 吕明尚

自动退款后面支付成功的订单

parent 702bf887
...@@ -1617,35 +1617,37 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -1617,35 +1617,37 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
unLockOrder(sOrder.getRoomId()); unLockOrder(sOrder.getRoomId());
ConsumerWallet consumerWallet = consumerWalletService.getOne(new LambdaQueryWrapper<ConsumerWallet>().eq(ConsumerWallet::getConsumerId, sOrder.getConsumerId())); ConsumerWallet consumerWallet = consumerWalletService.getOne(new LambdaQueryWrapper<ConsumerWallet>().eq(ConsumerWallet::getConsumerId, sOrder.getConsumerId()));
ConsumerMember consumerMember = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, sOrder.getConsumerId())); ConsumerMember consumerMember = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, sOrder.getConsumerId()));
// LambdaQueryWrapper<SOrder> queryWrapper = new LambdaQueryWrapper<>(); logger.debug("订单查询预约时间是否干涉");
// queryWrapper.ne(SOrder::getOrderNo,sOrder.getOrderNo()); LambdaQueryWrapper<SOrder> queryWrapper = new LambdaQueryWrapper<>();
// queryWrapper.eq(SOrder::getOrderType,OrderTypeEnum.RESERVER.getCode()); queryWrapper.ne(SOrder::getOrderNo, sOrder.getOrderNo());
// queryWrapper.notIn(SOrder::getRefundStatus, RefundStatusEnum.getRefundedStatus()); queryWrapper.eq(SOrder::getOrderType, OrderTypeEnum.RESERVER.getCode());
// queryWrapper.in(SOrder::getStatus, OrderStatusEnum.getUnfinishOrderStatus()); queryWrapper.notIn(SOrder::getRefundStatus, RefundStatusEnum.getRefundedStatus());
// queryWrapper.eq(SOrder::getIsDelete, YesNoEnum.no.getIndex()); queryWrapper.in(SOrder::getStatus, OrderStatusEnum.getUnfinishOrderStatus());
// queryWrapper.eq(SOrder::getStoreId, sOrder.getStoreId()); queryWrapper.eq(SOrder::getIsDelete, YesNoEnum.no.getIndex());
// queryWrapper.eq(SOrder::getRoomId, sOrder.getRoomId()); queryWrapper.eq(SOrder::getStoreId, sOrder.getStoreId());
// queryWrapper.apply("(IFNULL(start_date,pre_start_date) BETWEEN '" queryWrapper.eq(SOrder::getRoomId, sOrder.getRoomId());
// + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, sOrder.getPreStartDate()) queryWrapper.apply("(IFNULL(start_date,pre_start_date) BETWEEN '"
// + "' AND '" + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.addMinutes(sOrder.getPreEndDate(), Constants.ROOM_LOCK_DELAY_MINUTE)) + "' " + + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, sOrder.getPreStartDate())
// "OR IFNULL(end_date,pre_end_date) BETWEEN '" + "' AND '" + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.addMinutes(sOrder.getPreEndDate(), Constants.ROOM_LOCK_DELAY_MINUTE)) + "' " +
// + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.addMinutes(sOrder.getPreStartDate(), -Constants.ROOM_LOCK_DELAY_MINUTE)) "OR IFNULL(end_date,pre_end_date) BETWEEN '"
// + "' AND '" + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, sOrder.getPreEndDate()) + "' )"); + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.addMinutes(sOrder.getPreStartDate(), -Constants.ROOM_LOCK_DELAY_MINUTE))
// SOrder order = getOne(queryWrapper); + "' AND '" + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, sOrder.getPreEndDate()) + "' )");
// if(ObjectUtil.isNotEmpty(order)){ SOrder order = getOne(queryWrapper);
// //退款 if (ObjectUtil.isNotEmpty(order)) {
// AdminRefundRequest refundRequest = new AdminRefundRequest(); logger.debug("订单:" + sOrder.getOrderNo() + "和订单:" + order.getOrderNo() + "预约时间有干涉");
// refundRequest.setOrderNo(sOrder.getOrderNo()); //退款
// refundRequest.setAmount(sOrder.getPayPrice()); AdminRefundRequest refundRequest = new AdminRefundRequest();
// refundRequest.setIsClean(YesNoEnum.no.getIndex()); refundRequest.setOrderNo(sOrder.getOrderNo());
// refundRequest.setRefundCoupon(YesNoEnum.yes.getIndex()); refundRequest.setAmount(sOrder.getPayPrice());
// refundRequest.setRefundReason("当前订单:"+sOrder.getOrderNo()+"和订单:"+order.getOrderNo()+"预约时间有干涉"); refundRequest.setIsClean(YesNoEnum.no.getIndex());
// int i = sOrderService.refundOp(refundRequest); refundRequest.setRefundCoupon(YesNoEnum.yes.getIndex());
// if(i==1){ refundRequest.setRefundReason("当前订单:" + sOrder.getOrderNo() + "和订单:" + order.getOrderNo() + "预约时间有干涉");
// sOrderService.removeById(sOrder); int i = sOrderService.refundOp(refundRequest);
// } if (i == 1) {
// return; sOrderService.removeById(sOrder);
// } }
return;
}
if (sOrder.getOrderType().equals(OrderTypeEnum.RENEW.getCode())) { if (sOrder.getOrderType().equals(OrderTypeEnum.RENEW.getCode())) {
SRoom room = roomService.getById(sOrder.getRoomId()); SRoom room = roomService.getById(sOrder.getRoomId());
......
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