Commit 47c1c8b2 by 吕明尚

0元退款删除redis

parent 8e66d7e4
...@@ -51,8 +51,6 @@ public class SOrderController extends BaseController ...@@ -51,8 +51,6 @@ public class SOrderController extends BaseController
public TableDataInfo list(SOrder sOrder) public TableDataInfo list(SOrder sOrder)
{ {
startPage(); startPage();
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
sOrder.setConsumerId(user.getId());
List<SOrderVo> list = sOrderService.selectPayedSOrderVoList(sOrder); List<SOrderVo> list = sOrderService.selectPayedSOrderVoList(sOrder);
return getDataTable(list); return getDataTable(list);
} }
......
...@@ -248,6 +248,11 @@ public class OrderTask { ...@@ -248,6 +248,11 @@ public class OrderTask {
logger.info("订单号为:" + jsonObject.getStr("orderNo") + "的订单不存在"); logger.info("订单号为:" + jsonObject.getStr("orderNo") + "的订单不存在");
return; return;
} }
if (OrderStatusEnum.CANCEL.getCode().equals(byOrderNo.getStatus())) {
redisUtil.delete(o);
logger.info("订单号为:" + jsonObject.getStr("orderNo") + "的订单已取消");
return;
}
//时间到期前30分钟到29分 //时间到期前30分钟到29分
long expire = (expirationTime.getTime() - new Date().getTime()) / 1000; long expire = (expirationTime.getTime() - new Date().getTime()) / 1000;
if (expire < TEN_MINUTES && expire > NINE_MINUTES) { if (expire < TEN_MINUTES && expire > NINE_MINUTES) {
......
...@@ -886,6 +886,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -886,6 +886,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
throw new BaseException("微信申请退款失败!"); throw new BaseException("微信申请退款失败!");
} }
}else { }else {
// 删除redis 缓存信息,防止退款订单自动开始及给用户发送提示短信
redisUtil.delete(ReceiptRdeisEnum.ORDER_NO.getValue() + sOrder.getOrderNo());
//修改订单退款状态,退款成功 //修改订单退款状态,退款成功
sOrder.setStatus(OrderStatusEnum.CANCEL.getCode()); sOrder.setStatus(OrderStatusEnum.CANCEL.getCode());
sOrder.setRefundStatus(RefundStatusEnum.REFUNDED.getCode()); sOrder.setRefundStatus(RefundStatusEnum.REFUNDED.getCode());
......
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