| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 支付接口控制器 |
| | | * |
| | |
| | | } |
| | | |
| | | /** |
| | | * 查询支付订单列表(支持按渠道交易号、业务订单号、订单标题、最新交易ID查询) |
| | | */ |
| | | @Anonymous() |
| | | @GetMapping("/orders/list") |
| | | public AjaxResult listOrders( |
| | | @RequestParam(required = false) String channelTradeNo, |
| | | @RequestParam(required = false) String bizOrderId, |
| | | @RequestParam(required = false) String subject, |
| | | @RequestParam(required = false) Long latestTransactionId) { |
| | | try { |
| | | List<PaymentOrder> orders = paymentService.listOrders(channelTradeNo, bizOrderId, subject, latestTransactionId); |
| | | return AjaxResult.success(orders); |
| | | } catch (Exception e) { |
| | | log.error("查询支付订单列表失败", e); |
| | | return AjaxResult.error("查询失败: " + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询最新交易 |
| | | */ |
| | | @Anonymous() |