mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-06 04:27:55 +00:00
ref 去除NotNotify字段, 各类型订单扩展合并到订单对象中
This commit is contained in:
@@ -13,10 +13,8 @@ import cn.daxpay.single.service.annotation.InitPaymentContext;
|
||||
import cn.daxpay.single.service.core.order.allocation.service.AllocationOrderQueryService;
|
||||
import cn.daxpay.single.service.core.payment.allocation.service.AllocationService;
|
||||
import cn.daxpay.single.service.core.payment.allocation.service.AllocationSyncService;
|
||||
import cn.daxpay.single.service.dto.order.allocation.AllocationOrderAndExtraDto;
|
||||
import cn.daxpay.single.service.dto.order.allocation.AllocationOrderDetailDto;
|
||||
import cn.daxpay.single.service.dto.order.allocation.AllocationOrderDto;
|
||||
import cn.daxpay.single.service.dto.order.allocation.AllocationOrderExtraDto;
|
||||
import cn.daxpay.single.service.param.order.AllocationOrderQuery;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -71,12 +69,8 @@ public class AllocationOrderController {
|
||||
|
||||
@Operation(summary = "查询扩展信息")
|
||||
@GetMapping("/findByAllocNo")
|
||||
public ResResult<AllocationOrderAndExtraDto> findByAllocNo(String allocNo){
|
||||
AllocationOrderAndExtraDto result = new AllocationOrderAndExtraDto();
|
||||
AllocationOrderDto order = queryService.findByAllocNo(allocNo);
|
||||
AllocationOrderExtraDto extra = queryService.findExtraById(order.getId());
|
||||
result.setOrder(order).setExtra(extra);
|
||||
return Res.ok(result);
|
||||
public ResResult<AllocationOrderDto> findByAllocNo(String allocNo){
|
||||
return Res.ok(queryService.findByAllocNo(allocNo));
|
||||
}
|
||||
|
||||
@Operation(summary = "获取可以分账的通道")
|
||||
|
@@ -12,14 +12,11 @@ import cn.daxpay.single.param.payment.pay.PaySyncParam;
|
||||
import cn.daxpay.single.result.sync.PaySyncResult;
|
||||
import cn.daxpay.single.service.annotation.InitPaymentContext;
|
||||
import cn.daxpay.single.service.core.order.pay.entity.PayOrder;
|
||||
import cn.daxpay.single.service.core.order.pay.service.PayOrderExtraService;
|
||||
import cn.daxpay.single.service.core.order.pay.service.PayOrderQueryService;
|
||||
import cn.daxpay.single.service.core.payment.allocation.service.AllocationService;
|
||||
import cn.daxpay.single.service.core.payment.close.service.PayCloseService;
|
||||
import cn.daxpay.single.service.core.payment.sync.service.PaySyncService;
|
||||
import cn.daxpay.single.service.dto.order.pay.PayOrderAndExtraDto;
|
||||
import cn.daxpay.single.service.dto.order.pay.PayOrderDto;
|
||||
import cn.daxpay.single.service.dto.order.pay.PayOrderExtraDto;
|
||||
import cn.daxpay.single.service.param.order.PayOrderQuery;
|
||||
import cn.daxpay.single.util.OrderNoGenerateUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -41,7 +38,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequiredArgsConstructor
|
||||
public class PayOrderController {
|
||||
private final PayOrderQueryService queryService;
|
||||
private final PayOrderExtraService payOrderExtraService;
|
||||
private final PayCloseService payCloseService;
|
||||
|
||||
|
||||
@@ -65,20 +61,11 @@ public class PayOrderController {
|
||||
|
||||
@Operation(summary = "查询订单详情")
|
||||
@GetMapping("/findByOrderNo")
|
||||
public ResResult<PayOrderAndExtraDto> findByOrderNo(String orderNo){
|
||||
public ResResult<PayOrderDto> findByOrderNo(String orderNo){
|
||||
PayOrderDto order = queryService.findByOrderNo(orderNo)
|
||||
.map(PayOrder::toDto)
|
||||
.orElseThrow(() -> new DataNotExistException("支付订单不存在"));
|
||||
PayOrderAndExtraDto detailDto=new PayOrderAndExtraDto();
|
||||
detailDto.setPayOrder(order);
|
||||
detailDto.setPayOrderExtra(payOrderExtraService.findById(order.getId()));
|
||||
return Res.ok(detailDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询支付订单扩展信息")
|
||||
@GetMapping("/getExtraById")
|
||||
public ResResult<PayOrderExtraDto> getExtraById(Long id){
|
||||
return Res.ok(payOrderExtraService.findById(id));
|
||||
return Res.ok(order);
|
||||
}
|
||||
|
||||
@Operation(summary = "同步支付状态")
|
||||
|
@@ -11,9 +11,7 @@ import cn.daxpay.single.service.annotation.InitPaymentContext;
|
||||
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;
|
||||
import cn.daxpay.single.service.dto.order.refund.RefundOrderAndExtraDto;
|
||||
import cn.daxpay.single.service.dto.order.refund.RefundOrderDto;
|
||||
import cn.daxpay.single.service.dto.order.refund.RefundOrderExtraDto;
|
||||
import cn.daxpay.single.service.param.order.PayOrderQuery;
|
||||
import cn.daxpay.single.service.param.order.PayOrderRefundParam;
|
||||
import cn.daxpay.single.service.param.order.RefundOrderQuery;
|
||||
@@ -45,12 +43,8 @@ public class RefundOrderController {
|
||||
|
||||
@Operation(summary = "查询退款订单详情")
|
||||
@GetMapping("/findByRefundNo")
|
||||
public ResResult<RefundOrderAndExtraDto> findByRefundNo(String refundNo){
|
||||
RefundOrderDto order = queryService.findByRefundNo(refundNo);
|
||||
RefundOrderAndExtraDto detailDto = new RefundOrderAndExtraDto();
|
||||
detailDto.setRefundOrder(order);
|
||||
detailDto.setRefundOrderExtra(queryService.findExtraById(order.getId()));
|
||||
return Res.ok(detailDto);
|
||||
public ResResult<RefundOrderDto> findByRefundNo(String refundNo){
|
||||
return Res.ok(queryService.findByRefundNo(refundNo));
|
||||
}
|
||||
@Operation(summary = "查询单条")
|
||||
@GetMapping("/findById")
|
||||
@@ -59,12 +53,6 @@ public class RefundOrderController {
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "查询扩展信息")
|
||||
@GetMapping("/findExtraById")
|
||||
public ResResult<RefundOrderExtraDto> findExtraById(Long id){
|
||||
return Res.ok(queryService.findExtraById(id));
|
||||
}
|
||||
|
||||
@InitPaymentContext(PaymentApiCode.REFUND)
|
||||
@Operation(summary = "手动发起退款")
|
||||
@PostMapping("/refund")
|
||||
|
Reference in New Issue
Block a user