mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-06 12:39:38 +00:00
ref 数据结构/逻辑重构
This commit is contained in:
@@ -34,7 +34,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
public class UniPayAssistController {
|
||||
private final UniPayAssistService uniPayAssistService;
|
||||
|
||||
@CountTime
|
||||
@PaymentApi(PaymentApiCode.GET_WX_AUTH_URL)
|
||||
@Operation(summary = "获取微信OAuth2授权链接")
|
||||
@PostMapping("/getWxAuthUrl")
|
||||
@@ -42,7 +41,6 @@ public class UniPayAssistController {
|
||||
return DaxRes.ok(uniPayAssistService.getWxAuthUrl(param));
|
||||
}
|
||||
|
||||
@CountTime
|
||||
@PaymentApi(PaymentApiCode.GET_WX_ACCESS_TOKEN)
|
||||
@Operation(summary = "获取微信AccessToken")
|
||||
@PostMapping("/getWxAccessToken")
|
||||
|
@@ -50,7 +50,6 @@ public class UniPayController {
|
||||
private final AllocationService allocationService;
|
||||
|
||||
|
||||
@CountTime
|
||||
@PaymentApi(PaymentApiCode.PAY)
|
||||
@Operation(summary = "统一支付接口")
|
||||
@PostMapping("/pay")
|
||||
@@ -58,7 +57,6 @@ public class UniPayController {
|
||||
return DaxRes.ok(payService.pay(payParam));
|
||||
}
|
||||
|
||||
@CountTime
|
||||
@PaymentApi(PaymentApiCode.CLOSE)
|
||||
@Operation(summary = "支付关闭接口")
|
||||
@PostMapping("/close")
|
||||
@@ -67,7 +65,6 @@ public class UniPayController {
|
||||
return DaxRes.ok();
|
||||
}
|
||||
|
||||
@CountTime
|
||||
@PaymentApi(PaymentApiCode.REFUND)
|
||||
@Operation(summary = "统一退款接口")
|
||||
@PostMapping("/refund")
|
||||
@@ -75,7 +72,6 @@ public class UniPayController {
|
||||
return DaxRes.ok(refundService.refund(param));
|
||||
}
|
||||
|
||||
@CountTime
|
||||
@PaymentApi(PaymentApiCode.SYNC_PAY)
|
||||
@Operation(summary = "支付同步接口")
|
||||
@PostMapping("/syncPay")
|
||||
@@ -83,7 +79,6 @@ public class UniPayController {
|
||||
return DaxRes.ok(paySyncService.sync(param));
|
||||
}
|
||||
|
||||
@CountTime
|
||||
@PaymentApi(PaymentApiCode.SYNC_REFUND)
|
||||
@Operation(summary = "退款同步接口")
|
||||
@PostMapping("/syncRefund")
|
||||
@@ -91,7 +86,6 @@ public class UniPayController {
|
||||
return DaxRes.ok(refundSyncService.sync(param));
|
||||
}
|
||||
|
||||
@CountTime
|
||||
@PaymentApi(PaymentApiCode.ALLOCATION)
|
||||
@Operation(summary = "开启分账接口")
|
||||
@PostMapping("/allocation")
|
||||
@@ -99,7 +93,6 @@ public class UniPayController {
|
||||
return DaxRes.ok(allocationService.allocation(param));
|
||||
}
|
||||
|
||||
@CountTime
|
||||
@PaymentApi(PaymentApiCode.ALLOCATION_FINISH)
|
||||
@Operation(summary = "分账完结接口")
|
||||
@PostMapping("/allocationFinish")
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package cn.bootx.platform.daxpay.gateway.controller;
|
||||
|
||||
import cn.bootx.platform.common.core.annotation.CountTime;
|
||||
import cn.bootx.platform.common.core.annotation.IgnoreAuth;
|
||||
import cn.bootx.platform.daxpay.code.PaymentApiCode;
|
||||
import cn.bootx.platform.daxpay.param.payment.pay.QueryPayParam;
|
||||
@@ -9,7 +8,8 @@ import cn.bootx.platform.daxpay.result.DaxResult;
|
||||
import cn.bootx.platform.daxpay.result.order.PayOrderResult;
|
||||
import cn.bootx.platform.daxpay.result.order.RefundOrderResult;
|
||||
import cn.bootx.platform.daxpay.service.annotation.PaymentApi;
|
||||
import cn.bootx.platform.daxpay.service.core.order.refund.service.RefundOrderService;
|
||||
import cn.bootx.platform.daxpay.service.core.order.pay.service.PayOrderQueryService;
|
||||
import cn.bootx.platform.daxpay.service.core.order.refund.service.RefundOrderQueryService;
|
||||
import cn.bootx.platform.daxpay.util.DaxRes;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -31,22 +31,20 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequiredArgsConstructor
|
||||
public class UniQueryController {
|
||||
|
||||
private final cn.bootx.platform.daxpay.service.core.order.pay.service.PayOrderQueryService PayOrderQueryService;
|
||||
private final RefundOrderService payRefundQueryService;
|
||||
private final PayOrderQueryService payOrderQueryService;
|
||||
private final RefundOrderQueryService refundOrderQueryService;
|
||||
|
||||
@CountTime
|
||||
@PaymentApi(PaymentApiCode.QUERY_PAY_ORDER)
|
||||
@Operation(summary = "支付订单查询接口")
|
||||
@PostMapping("/payOrder")
|
||||
public DaxResult<PayOrderResult> queryPayOrder(@RequestBody QueryPayParam param){
|
||||
return DaxRes.ok(PayOrderQueryService.queryPayOrder(param));
|
||||
return DaxRes.ok(payOrderQueryService.queryPayOrder(param));
|
||||
}
|
||||
|
||||
@CountTime
|
||||
@PaymentApi(PaymentApiCode.QUERY_REFUND_ORDER)
|
||||
@Operation(summary = "退款订单查询接口")
|
||||
@PostMapping("/refundOrder")
|
||||
public DaxResult<RefundOrderResult> queryRefundOrder(@RequestBody QueryRefundParam param){
|
||||
return DaxRes.ok(payRefundQueryService.queryRefundOrder(param));
|
||||
return DaxRes.ok(refundOrderQueryService.queryRefundOrder(param));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user