Browse Source

Merge branch 'dev/2024/0703/update-app-Y' of Harper/feifan-backend-zx-app into master

新增支付通道
Yangzw 8 months ago
parent
commit
6577a2cf3c

+ 10 - 1
feifan-module-pay/feifan-module-pay-biz/src/main/java/cn/newfeifan/mall/module/pay/controller/app/fuyouorder/NewPayOrderController.java

@@ -1,5 +1,6 @@
 package cn.newfeifan.mall.module.pay.controller.app.fuyouorder;
 
+import cn.newfeifan.mall.framework.common.exception.ErrorCode;
 import cn.newfeifan.mall.framework.common.pojo.CommonResult;
 import cn.newfeifan.mall.module.pay.fuiou.reqvo.SubmitOrderRequestVO;
 import cn.newfeifan.mall.module.pay.fuiou.respVO.FuYouPaymentResponseVO;
@@ -12,6 +13,7 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 
+import static cn.newfeifan.mall.framework.common.exception.util.ServiceExceptionUtil.exception;
 import static cn.newfeifan.mall.framework.common.pojo.CommonResult.success;
 
 @Tag(name = "用户 APP - 富有支付订单")
@@ -28,9 +30,16 @@ public class NewPayOrderController {
     @Operation(summary = "向富友提交支付订单")
     public CommonResult<String> submitFuYouPayOrder(@RequestBody SubmitOrderRequestVO reqVO) {
 
+        try{
         String respVO = fuYouPayOrderService.submitOrder(reqVO);
 
-        return success(respVO);
+        }catch (Exception e){
+            ErrorCode err = new ErrorCode(1,e.getMessage() + "===");
+            throw exception(err);
+        }
+
+
+        return success("success");
     }
 
     @PostMapping("/notify")