张延森 4 years ago
parent
commit
6927265c35

+ 4
- 4
src/main/java/com/yunzhi/niucai/controller/TaAlipayController.java View File

@@ -59,7 +59,7 @@ public class TaAlipayController extends BaseController {
59 59
      * @return
60 60
      * @throws Exception
61 61
      */
62
-    @PostMapping("/api/app/alipay/order")
62
+    @PostMapping("/app/alipay/order")
63 63
     @ApiOperation(value = "创建订单", notes = "创建订单", httpMethod = "POST", response = ResponseBean.class)
64 64
     public ResponseBean create(HttpServletRequest request,@ApiParam("下单记录") @RequestBody TaOrder taOrder) throws Exception {
65 65
         boolean res = aliPayService.orderPaying(taOrder);
@@ -70,7 +70,7 @@ public class TaAlipayController extends BaseController {
70 70
         }
71 71
     }
72 72
 
73
-    @GetMapping("/api/app/alipay/result")
73
+    @GetMapping("/app/alipay/result")
74 74
     @ApiOperation(value = "查询支付状态", notes = "查询支付状态", httpMethod = "GET", response = ResponseBean.class)
75 75
     public ResponseBean getPayResult(@ApiParam("订单号") @RequestParam String orderId) {
76 76
         return ResponseBean.success("");
@@ -80,7 +80,7 @@ public class TaAlipayController extends BaseController {
80 80
      * 支付成功回调
81 81
      * @param request
82 82
      */
83
-    @GetMapping("/alipay/pay/callback")
83
+    @GetMapping("/app/callback/alipay/pay")
84 84
     public void callback(HttpServletRequest request){
85 85
         String tradeNo = request.getParameter("trade_no");
86 86
         String appId = request.getParameter("app_id");
@@ -95,7 +95,7 @@ public class TaAlipayController extends BaseController {
95 95
      * @param appAuthCode
96 96
      * @throws AlipayApiException
97 97
      */
98
-    @GetMapping("/alipay/auth/callback")
98
+    @GetMapping("/app/callback/alipay/auth")
99 99
     public void aliPayAuthNotice(@RequestParam("app_id") String appId,@RequestParam("app_auth_code") String appAuthCode) throws AlipayApiException {
100 100
         // 虚拟一个服务, 主要是为了调用其中方法
101 101
         PayService payService = alipayFactory.getService(-1);

+ 1
- 1
src/main/resources/application-dev.yml View File

@@ -21,4 +21,4 @@ logging:
21 21
 #    expire: 300
22 22
 
23 23
 aliPay:
24
-  notifyUrl: http://127.0.0.1:8080/alipay/pay/callback
24
+  notifyUrl: http://127.0.0.1:8080/api/app/callback/alipay/pay

+ 1
- 1
src/main/resources/application.yml View File

@@ -13,7 +13,7 @@ interceptor:
13 13
       - /app/login
14 14
       - /app/logout
15 15
       - /app/signup
16
-      - /alipay/**
16
+      - /app/callback/**
17 17
       - /swagger-ui/**
18 18
       - /swagger-resources/**
19 19
       - /v2/**