|
@@ -1,6 +1,7 @@
|
|
package com.bosshand.virgo.api.workark.service;
|
|
package com.bosshand.virgo.api.workark.service;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
+import com.bosshand.virgo.api.service.QuartzService;
|
|
import com.bosshand.virgo.api.workark.config.WxPayConfig;
|
|
import com.bosshand.virgo.api.workark.config.WxPayConfig;
|
|
import com.bosshand.virgo.api.workark.enums.OrderStatus;
|
|
import com.bosshand.virgo.api.workark.enums.OrderStatus;
|
|
import com.bosshand.virgo.api.workark.enums.wxpay.WxNotifyType;
|
|
import com.bosshand.virgo.api.workark.enums.wxpay.WxNotifyType;
|
|
@@ -56,6 +57,9 @@ public class WxPayService {
|
|
@Autowired
|
|
@Autowired
|
|
private RefundInfoService refundInfoService;
|
|
private RefundInfoService refundInfoService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private QuartzService quartzService;
|
|
|
|
+
|
|
private final ReentrantLock lock = new ReentrantLock();
|
|
private final ReentrantLock lock = new ReentrantLock();
|
|
|
|
|
|
private final static Log log = LogFactory.getLog(WxPayService.class);
|
|
private final static Log log = LogFactory.getLog(WxPayService.class);
|
|
@@ -144,12 +148,15 @@ public class WxPayService {
|
|
codeUrl = response.getCodeUrl();
|
|
codeUrl = response.getCodeUrl();
|
|
|
|
|
|
//保存二维码
|
|
//保存二维码
|
|
- orderInfoService.saveCodeUrl(orderInfo.getOrderNo(), codeUrl);
|
|
|
|
|
|
+ OrderInfo orderInfo1 = orderInfoService.saveCodeUrl(orderInfo.getOrderNo(), codeUrl);
|
|
|
|
+
|
|
|
|
+ //支付超时关闭订单
|
|
|
|
+ quartzService.executeWxPayCloseOrderTask(orderInfo1);
|
|
|
|
|
|
//返回二维码
|
|
//返回二维码
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
map.put("codeUrl", codeUrl);
|
|
map.put("codeUrl", codeUrl);
|
|
- map.put("codeUrlFailureTime", orderInfo.getCodeUrlFailureTime());
|
|
|
|
|
|
+ map.put("codeUrlFailureTime", orderInfo1.getCodeUrlFailureTime());
|
|
map.put("orderNo", orderInfo.getOrderNo());
|
|
map.put("orderNo", orderInfo.getOrderNo());
|
|
map.put("base64", QrRcodeGenUtil.jumpToQRcodeGen(codeUrl));
|
|
map.put("base64", QrRcodeGenUtil.jumpToQRcodeGen(codeUrl));
|
|
return map;
|
|
return map;
|