mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-06 12:39:38 +00:00
feat 分账SDK接口开发和前端联调
This commit is contained in:
@@ -53,7 +53,6 @@ public class UniAllocationController {
|
||||
return DaxRes.ok(allocationService.finish(param));
|
||||
}
|
||||
|
||||
|
||||
@PaymentSign
|
||||
@PlatformInitContext(PaymentApiCode.ALLOCATION_RECEIVER_ADD)
|
||||
@Operation(summary = "添加分账接收方接口")
|
||||
@@ -70,4 +69,5 @@ public class UniAllocationController {
|
||||
return DaxRes.ok(receiverService.remove(param));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -15,8 +15,6 @@ import cn.daxpay.single.service.annotation.PlatformInitContext;
|
||||
import cn.daxpay.single.service.core.payment.close.service.PayCloseService;
|
||||
import cn.daxpay.single.service.core.payment.pay.service.PayService;
|
||||
import cn.daxpay.single.service.core.payment.refund.service.RefundService;
|
||||
import cn.daxpay.single.service.core.payment.sync.service.PaySyncService;
|
||||
import cn.daxpay.single.service.core.payment.sync.service.RefundSyncService;
|
||||
import cn.daxpay.single.util.DaxRes;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -39,9 +37,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
public class UniPayController {
|
||||
private final PayService payService;
|
||||
private final RefundService refundService;
|
||||
private final PaySyncService paySyncService;
|
||||
private final PayCloseService payCloseService;
|
||||
private final RefundSyncService refundSyncService;
|
||||
|
||||
@PaymentSign
|
||||
@PlatformInitContext(PaymentApiCode.PAY)
|
||||
@@ -67,7 +63,6 @@ public class UniPayController {
|
||||
return DaxRes.ok(refundService.refund(param));
|
||||
}
|
||||
|
||||
|
||||
@PaymentSign
|
||||
@PlatformInitContext(PaymentApiCode.TRANSFER)
|
||||
@Operation(summary = "统一转账接口")
|
||||
@@ -76,5 +71,4 @@ public class UniPayController {
|
||||
return DaxRes.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -5,8 +5,9 @@ import cn.daxpay.single.param.payment.allocation.AllocSyncParam;
|
||||
import cn.daxpay.single.param.payment.pay.PaySyncParam;
|
||||
import cn.daxpay.single.param.payment.refund.RefundSyncParam;
|
||||
import cn.daxpay.single.result.DaxResult;
|
||||
import cn.daxpay.single.result.allocation.AllocationSyncResult;
|
||||
import cn.daxpay.single.result.pay.SyncResult;
|
||||
import cn.daxpay.single.result.sync.AllocSyncResult;
|
||||
import cn.daxpay.single.result.sync.PaySyncResult;
|
||||
import cn.daxpay.single.result.sync.RefundSyncResult;
|
||||
import cn.daxpay.single.service.annotation.PaymentSign;
|
||||
import cn.daxpay.single.service.annotation.PlatformInitContext;
|
||||
import cn.daxpay.single.service.core.payment.allocation.service.AllocationSyncService;
|
||||
@@ -28,7 +29,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@Tag(name = "")
|
||||
@RestController
|
||||
@RequestMapping("/unipay/sync/")
|
||||
@RequestMapping("/unipay/sync")
|
||||
@RequiredArgsConstructor
|
||||
public class UniPaySyncController {
|
||||
|
||||
@@ -40,7 +41,7 @@ public class UniPaySyncController {
|
||||
@PlatformInitContext(PaymentApiCode.SYNC_PAY)
|
||||
@Operation(summary = "支付同步接口")
|
||||
@PostMapping("/pay")
|
||||
public DaxResult<SyncResult> syncPay(@RequestBody PaySyncParam param){
|
||||
public DaxResult<PaySyncResult> pay(@RequestBody PaySyncParam param){
|
||||
return DaxRes.ok(paySyncService.sync(param));
|
||||
}
|
||||
|
||||
@@ -48,7 +49,7 @@ public class UniPaySyncController {
|
||||
@PlatformInitContext(PaymentApiCode.SYNC_REFUND)
|
||||
@Operation(summary = "退款同步接口")
|
||||
@PostMapping("/refund")
|
||||
public DaxResult<SyncResult> syncRefund(@RequestBody RefundSyncParam param){
|
||||
public DaxResult<RefundSyncResult> refund(@RequestBody RefundSyncParam param){
|
||||
return DaxRes.ok(refundSyncService.sync(param));
|
||||
}
|
||||
|
||||
@@ -56,8 +57,17 @@ public class UniPaySyncController {
|
||||
@PaymentSign
|
||||
@PlatformInitContext(PaymentApiCode.SYNC_ALLOCATION)
|
||||
@Operation(summary = "分账同步接口")
|
||||
@PostMapping("/sync")
|
||||
public DaxResult<AllocationSyncResult> sync(@RequestBody AllocSyncParam param){
|
||||
@PostMapping("/allocation")
|
||||
public DaxResult<AllocSyncResult> allocation(@RequestBody AllocSyncParam param){
|
||||
return DaxRes.ok(allocationSyncService.sync(param));
|
||||
}
|
||||
|
||||
@PaymentSign
|
||||
@PlatformInitContext(PaymentApiCode.SYNC_TRANSFER)
|
||||
@Operation(summary = "转账同步接口")
|
||||
@PostMapping("/transfer")
|
||||
public DaxResult<Void> transfer(@RequestBody AllocSyncParam param){
|
||||
allocationSyncService.sync(param);
|
||||
return DaxRes.ok();
|
||||
}
|
||||
}
|
||||
|
@@ -6,13 +6,14 @@ import cn.daxpay.single.param.payment.allocation.QueryAllocOrderParam;
|
||||
import cn.daxpay.single.param.payment.allocation.QueryAllocReceiverParam;
|
||||
import cn.daxpay.single.param.payment.pay.QueryPayParam;
|
||||
import cn.daxpay.single.param.payment.refund.QueryRefundParam;
|
||||
import cn.daxpay.single.param.payment.transfer.QueryTransferParam;
|
||||
import cn.daxpay.single.result.DaxResult;
|
||||
import cn.daxpay.single.result.allocation.AllocOrderResult;
|
||||
import cn.daxpay.single.result.order.AllocOrderResult;
|
||||
import cn.daxpay.single.result.allocation.AllocReceiversResult;
|
||||
import cn.daxpay.single.result.order.PayOrderResult;
|
||||
import cn.daxpay.single.result.order.RefundOrderResult;
|
||||
import cn.daxpay.single.service.annotation.PlatformInitContext;
|
||||
import cn.daxpay.single.service.annotation.PaymentSign;
|
||||
import cn.daxpay.single.service.annotation.PlatformInitContext;
|
||||
import cn.daxpay.single.service.core.order.pay.service.PayOrderQueryService;
|
||||
import cn.daxpay.single.service.core.order.refund.service.RefundOrderQueryService;
|
||||
import cn.daxpay.single.service.core.payment.allocation.service.AllocationReceiverService;
|
||||
@@ -67,6 +68,14 @@ public class UniQueryController {
|
||||
return DaxRes.ok(allocationService.queryAllocationOrder(param));
|
||||
}
|
||||
|
||||
@PaymentSign
|
||||
@PlatformInitContext(PaymentApiCode.QUERY_TRANSFER_ORDER)
|
||||
@Operation(summary = "转账订单查询接口")
|
||||
@PostMapping("/transferOrder")
|
||||
public DaxResult<Void> transferOrder(@RequestBody QueryTransferParam param){
|
||||
return DaxRes.ok();
|
||||
}
|
||||
|
||||
@PaymentSign
|
||||
@PlatformInitContext(PaymentApiCode.QUERY_ALLOCATION_RECEIVER)
|
||||
@Operation(summary = "分账接收方查询接口")
|
||||
|
@@ -1,16 +1,14 @@
|
||||
package cn.daxpay.single.gateway.controller;
|
||||
|
||||
import cn.daxpay.single.code.PaymentApiCode;
|
||||
import cn.daxpay.single.param.payment.pay.PayParam;
|
||||
import cn.daxpay.single.result.DaxResult;
|
||||
import cn.daxpay.single.service.annotation.PlatformInitContext;
|
||||
import cn.daxpay.single.service.annotation.PaymentSign;
|
||||
import cn.daxpay.single.service.annotation.PlatformInitContext;
|
||||
import cn.daxpay.single.util.DaxRes;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -29,7 +27,7 @@ public class UniReconcileController {
|
||||
@PlatformInitContext(PaymentApiCode.PAY)
|
||||
@Operation(summary = "下载指定日期的资金流水")
|
||||
@PostMapping("/pay")
|
||||
public DaxResult<?> down(@RequestBody PayParam payParam){
|
||||
public DaxResult<?> down(){
|
||||
return DaxRes.ok();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user