ref 签名注解和上下文初始化注解改造, 初步实现分账通知功能

This commit is contained in:
DaxPay
2024-05-22 22:07:34 +08:00
parent 3ac539f277
commit 5280793f31
44 changed files with 530 additions and 315 deletions

View File

@@ -5,9 +5,11 @@ import cn.bootx.platform.common.core.rest.Res;
import cn.bootx.platform.common.core.rest.ResResult;
import cn.bootx.platform.common.core.rest.dto.LabelValue;
import cn.bootx.platform.common.core.rest.param.PageParam;
import cn.daxpay.single.param.payment.allocation.AllocStartParam;
import cn.daxpay.single.code.PaymentApiCode;
import cn.daxpay.single.param.payment.allocation.AllocationParam;
import cn.daxpay.single.param.payment.allocation.AllocSyncParam;
import cn.daxpay.single.param.payment.allocation.AllocFinishParam;
import cn.daxpay.single.service.annotation.PlatformInitContext;
import cn.daxpay.single.service.core.order.allocation.service.AllocationOrderService;
import cn.daxpay.single.service.core.payment.allocation.service.AllocationService;
import cn.daxpay.single.service.dto.order.allocation.AllocationOrderDetailDto;
@@ -69,6 +71,7 @@ public class AllocationOrderController {
return Res.ok(allocationOrderService.findChannels());
}
@PlatformInitContext(PaymentApiCode.SYNC_ALLOCATION)
@Operation(summary = "同步分账结果")
@PostMapping("/sync")
public ResResult<Void> sync(String allocationNo){
@@ -78,6 +81,7 @@ public class AllocationOrderController {
return Res.ok();
}
@PlatformInitContext(PaymentApiCode.SYNC_REFUND)
@Operation(summary = "分账完结")
@PostMapping("/finish")
public ResResult<Void> finish(String allocationNo){
@@ -87,10 +91,11 @@ public class AllocationOrderController {
return Res.ok();
}
@PlatformInitContext(PaymentApiCode.ALLOCATION)
@Operation(summary = "重新发起分账")
@PostMapping("/retry")
public ResResult<Void> retryAllocation(String bizAllocationNo){
AllocStartParam param = new AllocStartParam();
AllocationParam param = new AllocationParam();
param.setBizAllocationNo(bizAllocationNo);
allocationService.allocation(param);
return Res.ok();

View File

@@ -5,7 +5,7 @@ import cn.bootx.platform.common.core.rest.PageResult;
import cn.bootx.platform.common.core.rest.Res;
import cn.bootx.platform.common.core.rest.ResResult;
import cn.bootx.platform.common.core.rest.param.PageParam;
import cn.daxpay.single.param.payment.allocation.AllocStartParam;
import cn.daxpay.single.param.payment.allocation.AllocationParam;
import cn.daxpay.single.param.payment.pay.PayCloseParam;
import cn.daxpay.single.param.payment.pay.PaySyncParam;
import cn.daxpay.single.result.pay.SyncResult;
@@ -99,7 +99,7 @@ public class PayOrderController {
@Operation(summary = "发起分账")
@PostMapping("/allocation")
public ResResult<Void> allocation(String orderNo){
AllocStartParam param = new AllocStartParam();
AllocationParam param = new AllocationParam();
param.setOrderNo(orderNo);
param.setBizAllocationNo(OrderNoGenerateUtil.allocation());
allocationService.allocation(param);

View File

@@ -4,8 +4,10 @@ import cn.bootx.platform.common.core.rest.PageResult;
import cn.bootx.platform.common.core.rest.Res;
import cn.bootx.platform.common.core.rest.ResResult;
import cn.bootx.platform.common.core.rest.param.PageParam;
import cn.daxpay.single.code.PaymentApiCode;
import cn.daxpay.single.param.payment.refund.RefundSyncParam;
import cn.daxpay.single.result.pay.SyncResult;
import cn.daxpay.single.service.annotation.PlatformInitContext;
import cn.daxpay.single.service.core.order.refund.service.RefundOrderQueryService;
import cn.daxpay.single.service.core.order.refund.service.RefundOrderService;
import cn.daxpay.single.service.core.payment.sync.service.RefundSyncService;
@@ -63,6 +65,7 @@ public class RefundOrderController {
return Res.ok(queryService.findExtraById(id));
}
@PlatformInitContext(PaymentApiCode.REFUND)
@Operation(summary = "手动发起退款")
@PostMapping("/refund")
public ResResult<Void> refund(@RequestBody PayOrderRefundParam param){
@@ -70,6 +73,7 @@ public class RefundOrderController {
return Res.ok();
}
@PlatformInitContext(PaymentApiCode.REFUND)
@Operation(summary = "重新发起退款")
@PostMapping("/resetRefund")
public ResResult<Void> resetRefund(Long id){

View File

@@ -4,7 +4,7 @@ import cn.bootx.platform.common.core.rest.PageResult;
import cn.bootx.platform.common.core.rest.Res;
import cn.bootx.platform.common.core.rest.ResResult;
import cn.bootx.platform.common.core.rest.param.PageParam;
import cn.daxpay.single.service.core.task.notice.service.ClientNoticeTaskService;
import cn.daxpay.single.service.core.notice.service.ClientNoticeTaskService;
import cn.daxpay.single.service.dto.record.notice.ClientNoticeRecordDto;
import cn.daxpay.single.service.dto.record.notice.ClientNoticeTaskDto;
import cn.daxpay.single.service.param.record.ClientNoticeRecordQuery;