From 88ad3c24b0c80e9e82daae72b96ff129e7831aa4 Mon Sep 17 00:00:00 2001 From: D <3066417822@qq.com> Date: Wed, 27 Mar 2024 04:28:56 +0800 Subject: [PATCH] update --- .../java/com/ruoyi/web/core/config/SwaggerConfig.java | 8 ++++++++ .../com/ruoyi/pay/sqb/controller/SQBController.java | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java index 8c0da23..5fd7c38 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java @@ -42,4 +42,12 @@ public class SwaggerConfig { .build(); } + @Bean + public GroupedOpenApi payApi() { + return GroupedOpenApi.builder() + .group("支付模块") + .pathsToMatch("/pay/**") + .build(); + } + } diff --git a/ruoyi-pay/ruoyi-pay-sqb/src/main/java/com/ruoyi/pay/sqb/controller/SQBController.java b/ruoyi-pay/ruoyi-pay-sqb/src/main/java/com/ruoyi/pay/sqb/controller/SQBController.java index 86974fd..9566cb4 100644 --- a/ruoyi-pay/ruoyi-pay-sqb/src/main/java/com/ruoyi/pay/sqb/controller/SQBController.java +++ b/ruoyi-pay/ruoyi-pay-sqb/src/main/java/com/ruoyi/pay/sqb/controller/SQBController.java @@ -13,6 +13,12 @@ import com.ruoyi.pay.domain.PayOrder; import com.ruoyi.pay.service.IPayOrderService; import com.ruoyi.pay.sqb.service.Impl.SQBServiceImpl; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.tags.Tag; + +@Tag(name = "sqb支付") @RestController @RequestMapping("/pay/sql") public class SQBController extends BaseController { @@ -21,6 +27,10 @@ public class SQBController extends BaseController { @Autowired private IPayOrderService payOrderServicer; + @Operation(summary = "获取支付url") + @Parameters(value = { + @Parameter(name = "id", description = "订单号", required = true) + }) @PostMapping("/payUrl") @Anonymous public AjaxResult payUrl(@RequestParam("id") String orderNumber) throws Exception { @@ -30,6 +40,7 @@ public class SQBController extends BaseController { return ajaxResult; } + @Operation(summary = "查询支付状态") @PostMapping("/query") @Anonymous public AjaxResult query(@RequestParam("id") String orderNumber) throws Exception {