(cherry picked from commit 5bef8e77ccd503802cd842a27e00b4eaa9a84eee)
@@ -298,4 +298,9 @@ public interface IFsStoreOrderService
*/
List<FsStoreOrder> selectDeliverPenddingData();
+ /**
+ * 用户取消支付
+ * @param param
+ */
+ void cancelPay(FsStoreOrderPayParam param);
}
@@ -1826,6 +1826,11 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
return fsStoreOrderMapper.selectDeliverPendingData();
+ @Override
+ public void cancelPay(FsStoreOrderPayParam param) {
+ redisCache.deleteObject("isPaying:"+param.getOrderId());
+ }
+
@Override
@Transactional(rollbackFor = Throwable.class,propagation = Propagation.REQUIRED)
//类型1支付回调 类型2货到付款
@@ -144,7 +144,14 @@ public class StoreOrderController extends AppBaseController {
return result;
-
+ @Login
+ @ApiOperation("取消支付")
+ @PostMapping("/cancelPay")
+ public R cancelPay(@Validated @RequestBody FsStoreOrderPayParam param) {
+ logger.info("用户取消支付 订单号: {},支付类型",param.getOrderId());
+ orderService.cancelPay(param);
+ return R.ok();
@Login
@ApiOperation("修改支付类型")