Browse Source

商户入驻

kongge 1 week ago
parent
commit
3133802f59

+ 4 - 4
src/main/java/com/chelvc/cloud/maintain/controller/AssetController.java

@@ -58,12 +58,12 @@ public class AssetController {
      */
      */
     @Security(enabled = false)
     @Security(enabled = false)
     @PostMapping("/asset/withdraw/notify")
     @PostMapping("/asset/withdraw/notify")
-    public void withdrawNotify(HttpServletRequest request, @RequestBody SxyNotifyParam param) {
+    public String withdrawNotify(HttpServletRequest request, @RequestBody SxyNotifyParam param) {
         String merchantId = request.getHeader("merchantId");
         String merchantId = request.getHeader("merchantId");
         String encryptKey = request.getHeader("encryptKey");
         String encryptKey = request.getHeader("encryptKey");
         param.setMerchantId(merchantId);
         param.setMerchantId(merchantId);
         param.setEncryptKey(encryptKey);
         param.setEncryptKey(encryptKey);
-        this.assetClient.withdrawNotify(param);
+        return this.assetClient.withdrawNotify(param);
     }
     }
 
 
     /**
     /**
@@ -71,11 +71,11 @@ public class AssetController {
      */
      */
     @Security(enabled = false)
     @Security(enabled = false)
     @PostMapping("/asset/transfer/notify")
     @PostMapping("/asset/transfer/notify")
-    public void transferNotify(HttpServletRequest request, @RequestBody SxyNotifyParam param) {
+    public String transferNotify(HttpServletRequest request, @RequestBody SxyNotifyParam param) {
         String merchantId = request.getHeader("merchantId");
         String merchantId = request.getHeader("merchantId");
         String encryptKey = request.getHeader("encryptKey");
         String encryptKey = request.getHeader("encryptKey");
         param.setMerchantId(merchantId);
         param.setMerchantId(merchantId);
         param.setEncryptKey(encryptKey);
         param.setEncryptKey(encryptKey);
-        this.assetClient.transferNotify(param);
+        return this.assetClient.transferNotify(param);
     }
     }
 }
 }

+ 17 - 8
src/main/java/com/chelvc/cloud/maintain/controller/MerchantController.java

@@ -31,12 +31,7 @@ import com.chelvc.framework.security.annotation.Security;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 
 /**
 /**
  * 商家接口
  * 商家接口
@@ -185,12 +180,26 @@ public class MerchantController {
      */
      */
     @Security(enabled = false)
     @Security(enabled = false)
     @PostMapping("/merchant/apply/notify")
     @PostMapping("/merchant/apply/notify")
-    public void merchantApplyNotify(HttpServletRequest request,
+    public String merchantApplyNotify(HttpServletRequest request,
                                     @RequestBody SxyNotifyParam param) {
                                     @RequestBody SxyNotifyParam param) {
         String merchantId = request.getHeader("merchantId");
         String merchantId = request.getHeader("merchantId");
         String encryptKey = request.getHeader("encryptKey");
         String encryptKey = request.getHeader("encryptKey");
         param.setMerchantId(merchantId);
         param.setMerchantId(merchantId);
         param.setEncryptKey(encryptKey);
         param.setEncryptKey(encryptKey);
-        this.merchantClient.merchantApplyNotify(param);
+        return this.merchantClient.merchantApplyNotify(param);
+    }
+
+    /**
+     * 电子签回调接口
+     *
+     */
+    @PostMapping("/merchant/reSign/notify")
+    public String merchantReSignNotify(HttpServletRequest request,
+           @RequestParam("frequency") Integer frequency, @RequestBody SxyNotifyParam param) {
+        String merchantId = request.getHeader("merchantId");
+        String encryptKey = request.getHeader("encryptKey");
+        param.setMerchantId(merchantId);
+        param.setEncryptKey(encryptKey);
+        return this.merchantClient.merchantReSignNotify(frequency, param);
     }
     }
 }
 }

+ 1 - 0
src/main/resources/application-dev.yml

@@ -18,6 +18,7 @@ security:
     secret: oauth.token.secret@chelvc!@#2023
     secret: oauth.token.secret@chelvc!@#2023
   ignores:
   ignores:
     - /maintain/merchant/apply/notify #商户入驻回调
     - /maintain/merchant/apply/notify #商户入驻回调
+    - /maintain/merchant/reSign/notify #电子签回调
     - /maintain/asset/withdraw/notify #提现回调
     - /maintain/asset/withdraw/notify #提现回调
     - /maintain/asset/transfer/notify #转账回调
     - /maintain/asset/transfer/notify #转账回调
     - /maintain/order/notify          #支付回调
     - /maintain/order/notify          #支付回调

+ 1 - 0
src/main/resources/application-pre.yml

@@ -18,6 +18,7 @@ security:
     secret: oauth.token.secret@chelvc!@#2023
     secret: oauth.token.secret@chelvc!@#2023
   ignores:
   ignores:
     - /maintain/merchant/apply/notify #商户入驻回调
     - /maintain/merchant/apply/notify #商户入驻回调
+    - /maintain/merchant/reSign/notify #电子签回调
     - /maintain/asset/withdraw/notify #提现回调
     - /maintain/asset/withdraw/notify #提现回调
     - /maintain/asset/transfer/notify #转账回调
     - /maintain/asset/transfer/notify #转账回调
     - /maintain/order/notify          #支付回调
     - /maintain/order/notify          #支付回调

+ 1 - 0
src/main/resources/application-prod.yml

@@ -18,6 +18,7 @@ security:
     secret: oauth.token.secret@chelvc!@#2023
     secret: oauth.token.secret@chelvc!@#2023
   ignores:
   ignores:
     - /maintain/merchant/apply/notify #商户入驻回调
     - /maintain/merchant/apply/notify #商户入驻回调
+    - /maintain/merchant/reSign/notify #电子签回调
     - /maintain/asset/withdraw/notify #提现回调
     - /maintain/asset/withdraw/notify #提现回调
     - /maintain/asset/transfer/notify #转账回调
     - /maintain/asset/transfer/notify #转账回调
     - /maintain/order/notify          #支付回调
     - /maintain/order/notify          #支付回调

+ 1 - 0
src/main/resources/application-test.yml

@@ -18,6 +18,7 @@ security:
     secret: oauth.token.secret@chelvc!@#2023
     secret: oauth.token.secret@chelvc!@#2023
   ignores:
   ignores:
     - /maintain/merchant/apply/notify #商户入驻回调
     - /maintain/merchant/apply/notify #商户入驻回调
+    - /maintain/merchant/reSign/notify #电子签回调
     - /maintain/asset/withdraw/notify #提现回调
     - /maintain/asset/withdraw/notify #提现回调
     - /maintain/asset/transfer/notify #转账回调
     - /maintain/asset/transfer/notify #转账回调
     - /maintain/order/notify          #支付回调
     - /maintain/order/notify          #支付回调