|
@@ -1,5 +1,6 @@
|
|
|
package com.ym.mec.collectfee.controller;
|
|
|
|
|
|
+import com.ym.mec.collectfee.utils.GenerateNum;
|
|
|
import com.ym.mec.collectfee.utils.yqpay.YqPayUtil;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.ModelMap;
|
|
@@ -22,15 +23,17 @@ public class YqRegController {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- @GetMapping("/register")
|
|
|
- public String register(ModelMap map) throws Exception {
|
|
|
+ @GetMapping("/per")
|
|
|
+ public String per(ModelMap map) throws Exception {
|
|
|
|
|
|
String notifyUrl = "http://47.99.212.176:9000/yqpay/notify"; //主动通知地址
|
|
|
|
|
|
+ String seraialNumber = GenerateNum.getInstance().GenerateOrderNo();
|
|
|
+
|
|
|
Map<String, Object> resultMap = new LinkedHashMap<String, Object>();
|
|
|
resultMap.put("type", "H5");
|
|
|
- resultMap.put("returnUrl", "https://www.baidu.com");
|
|
|
- resultMap.put("seraialNumber", "785679");
|
|
|
+ resultMap.put("returnUrl", "http://dev.dayaedu.com/");
|
|
|
+ resultMap.put("seraialNumber", seraialNumber);
|
|
|
resultMap.put("merType", "per");
|
|
|
|
|
|
Map<String, Object> requestMap = new YqPayUtil(notifyUrl, resultMap).getRequestMap();
|
|
@@ -38,4 +41,38 @@ public class YqRegController {
|
|
|
return "/reg/register";
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/com")
|
|
|
+ public String com(ModelMap map) throws Exception {
|
|
|
+ String notifyUrl = "http://47.99.212.176:9000/yqpay/notify"; //主动通知地址
|
|
|
+
|
|
|
+ String seraialNumber = GenerateNum.getInstance().GenerateOrderNo();
|
|
|
+
|
|
|
+ Map<String, Object> resultMap = new LinkedHashMap<String, Object>();
|
|
|
+ resultMap.put("type", "H5");
|
|
|
+ resultMap.put("returnUrl", "http://dev.dayaedu.com/");
|
|
|
+ resultMap.put("seraialNumber", seraialNumber);
|
|
|
+ resultMap.put("merType", "com");
|
|
|
+
|
|
|
+ Map<String, Object> requestMap = new YqPayUtil(notifyUrl, resultMap).getRequestMap();
|
|
|
+ map.addAttribute("info", requestMap);
|
|
|
+ return "/reg/register";
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/pcy")
|
|
|
+ public String pcy(ModelMap map) throws Exception {
|
|
|
+ String notifyUrl = "http://47.99.212.176:9000/yqpay/notify"; //主动通知地址
|
|
|
+
|
|
|
+ String seraialNumber = GenerateNum.getInstance().GenerateOrderNo();
|
|
|
+
|
|
|
+ Map<String, Object> resultMap = new LinkedHashMap<String, Object>();
|
|
|
+ resultMap.put("type", "H5");
|
|
|
+ resultMap.put("returnUrl", "http://dev.dayaedu.com/");
|
|
|
+ resultMap.put("seraialNumber", seraialNumber);
|
|
|
+ resultMap.put("merType", "pcy");
|
|
|
+
|
|
|
+ Map<String, Object> requestMap = new YqPayUtil(notifyUrl, resultMap).getRequestMap();
|
|
|
+ map.addAttribute("info", requestMap);
|
|
|
+ return "/reg/register";
|
|
|
+ }
|
|
|
+
|
|
|
}
|