Bläddra i källkod

调整支付接口

tianboguang 3 år sedan
förälder
incheckning
5c2a5c9f21
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. 4 4
      platform-api/src/main/java/com/platform/api/ApiPayController.java

+ 4 - 4
platform-api/src/main/java/com/platform/api/ApiPayController.java

@@ -177,7 +177,7 @@ public class ApiPayController extends ApiBaseAction {
     @ApiOperation(value = "查询订单状态")
     @PostMapping("query")
     @Transactional(rollbackFor = Exception.class)
-    public Object orderQuery(@LoginUser UserVo loginUser, Integer orderId) {
+    public Object orderQuery(Integer orderId) {
         if (orderId == null) {
             return toResponsFail("订单不存在");
         }
@@ -217,7 +217,7 @@ public class ApiPayController extends ApiBaseAction {
         String trade_state = MapUtils.getString("trade_state", resultUn);
         if ("SUCCESS".equals(trade_state)) {
             //更新订单的状态为已支付,更新库存
-            updateGoodsNumAndDealNum(orderDetail.getOrder_sn() , loginUser.getUserId());
+            updateGoodsNumAndDealNum(orderDetail.getOrder_sn() , getUserId());
 
             return toResponsMsgSuccess("支付成功");
         } else if ("USERPAYING".equals(trade_state)) {
@@ -225,10 +225,10 @@ public class ApiPayController extends ApiBaseAction {
             Integer num = (Integer) J2CacheUtils.get(J2CacheUtils.SHOP_CACHE_NAME, "queryRepeatNum" + orderId + "");
             if (num == null) {
                 J2CacheUtils.put(J2CacheUtils.SHOP_CACHE_NAME, "queryRepeatNum" + orderId + "", 1);
-                this.orderQuery(loginUser, orderId);
+                this.orderQuery(orderId);
             } else if (num <= 3) {
                 J2CacheUtils.remove(J2CacheUtils.SHOP_CACHE_NAME, "queryRepeatNum" + orderId);
-                this.orderQuery(loginUser, orderId);
+                this.orderQuery(orderId);
             } else {
                 return toResponsFail("查询失败,error=" + trade_state);
             }