ソースを参照

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan 5 年 前
コミット
88b3b604a4

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -371,7 +371,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 amount,
                 orderNo,
                 baseApiUrl+"/api-student/studentOrder/notify",
-                baseApiUrl+"/#/paymentresult?orderNo=" + orderNo,
+                baseApiUrl+"/api-student/studentOrder/paymentResult?orderNo=" + orderNo,
                 chargeInfo.getTitle(),
                 chargeInfo.getTitle(),
                 userId,
@@ -564,7 +564,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 amount,
                 orderNo,
                 baseApiUrl+"/api-student/studentOrder/notify",
-                baseApiUrl+"/#/paymentresult?orderNo=" + orderNo,
+                baseApiUrl+"/api-student/studentOrder/paymentResult?orderNo=" + orderNo,
                 "乐团报名缴费",
                 "乐团报名缴费",
                 userId,
@@ -761,7 +761,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 amount,
                 orderNo,
                 baseApiUrl+"/api-student/studentOrder/notify",
-                baseApiUrl+"/#/paymentresult?orderNo=" + orderNo,
+                baseApiUrl+"/api-student/studentOrder/paymentResult?orderNo=" + orderNo,
                 "乐团报名缴费",
                 "乐团报名缴费",
                 userId,
@@ -1535,7 +1535,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 
             Map<String, Object> payMap = payService.getPayMap(amount, studentPaymentOrder.getOrderNo(),
                     baseApiUrl+"/api-student/studentOrder/notify",
-                    baseApiUrl+"/#/paymentresult?orderNo=" + studentPaymentOrder.getOrderNo(),
+                    baseApiUrl+"/api-student/studentOrder/paymentResult?orderNo=" + studentPaymentOrder.getOrderNo(),
                     "续费",
                     "乐团续费",
                     userId,

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -1112,7 +1112,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 					amount,
 					orderNo,
 					baseApiUrl+"/api-student/studentOrder/notify",
-					baseApiUrl+"/#/paymentresult?orderNo=" + orderNo,
+					baseApiUrl+"/api-student/studentOrder/paymentResult?orderNo=" + orderNo,
 					"vip课购买",
 					vipGroup.getName(),
 					user.getId(),

+ 16 - 0
mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java

@@ -1,10 +1,12 @@
 package com.ym.mec.student.controller;
 
+import com.ym.mec.biz.dal.dao.SysConfigDao;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 
+import java.io.IOException;
 import java.math.BigDecimal;
 import java.net.URLEncoder;
 import java.util.Arrays;
@@ -51,6 +53,8 @@ import com.ym.mec.thirdparty.yqpay.YqPayFeignService;
 import com.ym.mec.thirdparty.yqpay.YqPayUtil;
 import com.ym.mec.util.http.HttpUtil;
 
+import javax.servlet.http.HttpServletResponse;
+
 @RequestMapping("studentOrder")
 @Api(tags = "订单回调")
 @RestController
@@ -71,6 +75,8 @@ public class StudentOrderController extends BaseController {
     private YqPayFeignService yqPayFeignService;
     @Autowired
     private StudentPaymentOrderDao studentPaymentOrderDao;
+    @Autowired
+    private SysConfigDao sysConfigDao;
 
     @PostMapping("/notify")
     public Msg notify(@ModelAttribute Msg msg) throws Exception {
@@ -273,4 +279,14 @@ public class StudentOrderController extends BaseController {
         }
         return succeed("订单不存在");
     }
+
+    @RequestMapping("paymentResult")
+    public void paymentResult(HttpServletResponse response, String orderNo) {
+        try {
+            String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
+            response.sendRedirect(baseApiUrl+"/#/paymentresult?orderNo=" + orderNo);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
 }