|
@@ -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();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|