diff --git a/bootx-platform/bootx-platform-starter/starter-delay-queue/src/main/java/cn/bootx/platform/starter/redis/delay/controller/DelayQueueController.java b/bootx-platform/bootx-platform-starter/starter-delay-queue/src/main/java/cn/bootx/platform/starter/redis/delay/controller/DelayQueueController.java index 436edd05a..e18740942 100644 --- a/bootx-platform/bootx-platform-starter/starter-delay-queue/src/main/java/cn/bootx/platform/starter/redis/delay/controller/DelayQueueController.java +++ b/bootx-platform/bootx-platform-starter/starter-delay-queue/src/main/java/cn/bootx/platform/starter/redis/delay/controller/DelayQueueController.java @@ -1,5 +1,7 @@ package cn.bootx.platform.starter.redis.delay.controller; +import cn.bootx.platform.core.annotation.RequestGroup; +import cn.bootx.platform.core.annotation.RequestPath; import cn.bootx.platform.core.rest.Res; import cn.bootx.platform.core.rest.param.PageParam; import cn.bootx.platform.core.rest.result.PageResult; @@ -23,61 +25,71 @@ import java.util.List; * @author xxm * @since 2024/9/20 */ -@Tag(name = "") +@Tag(name = "延时队列管理") +@RequestGroup(groupCode = "delay", groupName = "延时队列管理", moduleCode = "starter", moduleName = "starter模块") @RestController @RequestMapping("/delay/queue") @RequiredArgsConstructor public class DelayQueueController { private final DelayQueueService delayQueueService; + @RequestPath("获取桶信息列表") @Operation(summary = "获取桶信息列表") @GetMapping("/getBucket") public Result> getBucket() { return Res.ok(delayQueueService.getBucket()); } + @RequestPath("获取死信主题列表") @Operation(summary = "获取桶任务分页") @GetMapping("/pageBucketJob") public Result> pageBucketJob(String bucketName, PageParam pageParam) { return Res.ok(delayQueueService.pageBucketJob(bucketName, pageParam)); } + @RequestPath("获取就绪主题列表") @Operation(summary = "获取就绪主题列表") @GetMapping("/getReadyTopic") public Result> getReadyTopic() { return Res.ok(delayQueueService.getDelayTopic()); } + @RequestPath("获取就绪主题任务分页") @Operation(summary = "获取就绪任务分页") @GetMapping("/pageReadyJob") public Result> pageReadyJob(String topic, PageParam pageParam) { return Res.ok(delayQueueService.pageReadyJob(topic, pageParam)); } + @RequestPath("获取任务详情") @Operation(summary = "获取任务详情") @PostMapping("/getJobDetail") public Result getJobDetail(String jobId) { return Res.ok(delayQueueService.getJobDetail(jobId)); } + @RequestPath("获取死信主题列表") @Operation(summary = "获取死信主题数量和列表") @GetMapping("/getDeadTopic") public Result> getDeadTopic() { return Res.ok(delayQueueService.getDeadTopic()); } + @RequestPath("获取死信主题任务分页") @Operation(summary = "获取死信主题任务分页") @GetMapping("/pageDeadJob") public Result> pageDeadJob(String topic, PageParam pageParam) { return Res.ok(delayQueueService.pageDeadJob(topic, pageParam)); } + @RequestPath("获取死信任务详情") @Operation(summary = "获取死信任务详情") @PostMapping("/getDeadJobDetail") public Result resetDeadJob(String jobId) { return Res.ok(delayQueueService.getDeadJobDetail(jobId)); } + @RequestPath("删除死信任务") @Operation(summary = "删除死信任务") @PostMapping("/removeDeadJob") public Result removeDeadJob(String jobId) { diff --git a/daxpay-single-channel/daxpay-single-alipay/src/main/java/org/dromara/daxpay/channel/alipay/service/config/AliPayConfigService.java b/daxpay-single-channel/daxpay-single-alipay/src/main/java/org/dromara/daxpay/channel/alipay/service/config/AliPayConfigService.java index db5220ec6..98ccca3e0 100644 --- a/daxpay-single-channel/daxpay-single-alipay/src/main/java/org/dromara/daxpay/channel/alipay/service/config/AliPayConfigService.java +++ b/daxpay-single-channel/daxpay-single-alipay/src/main/java/org/dromara/daxpay/channel/alipay/service/config/AliPayConfigService.java @@ -111,7 +111,7 @@ public class AliPayConfigService { public String getReturnUrl() { MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo(); var platformInfo = platformConfigService.getConfig(); - return StrUtil.format("{}/unipay/return/{}/{}/alipay",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId()); + return StrUtil.format("{}/unipay/return/{}/alipay",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId()); } /** diff --git a/daxpay-single-channel/daxpay-single-alipay/src/main/java/org/dromara/daxpay/channel/alipay/service/extra/AliPayAuthService.java b/daxpay-single-channel/daxpay-single-alipay/src/main/java/org/dromara/daxpay/channel/alipay/service/extra/AliPayAuthService.java index 7da5b8d00..413ac7b09 100644 --- a/daxpay-single-channel/daxpay-single-alipay/src/main/java/org/dromara/daxpay/channel/alipay/service/extra/AliPayAuthService.java +++ b/daxpay-single-channel/daxpay-single-alipay/src/main/java/org/dromara/daxpay/channel/alipay/service/extra/AliPayAuthService.java @@ -48,7 +48,7 @@ public class AliPayAuthService { // 授权地址 String serverUrl = platformConfig.getGatewayMobileUrl(); - String authUrl = StrUtil.format("{}/alipay/auth/{}/{}/{}/{}", + String authUrl = StrUtil.format("{}/alipay/auth/{}/{}/{}", serverUrl, param.getAppId(),param.getChannel(),queryCode,aliPayConfig.getAliAppId()); return new AuthUrlResult().setAuthUrl(authUrl).setQueryCode(queryCode); diff --git a/daxpay-single-channel/daxpay-single-union/src/main/java/org/dromara/daxpay/channel/union/service/config/UnionPayConfigService.java b/daxpay-single-channel/daxpay-single-union/src/main/java/org/dromara/daxpay/channel/union/service/config/UnionPayConfigService.java index bc4c4c4b7..ba7e8e22a 100644 --- a/daxpay-single-channel/daxpay-single-union/src/main/java/org/dromara/daxpay/channel/union/service/config/UnionPayConfigService.java +++ b/daxpay-single-channel/daxpay-single-union/src/main/java/org/dromara/daxpay/channel/union/service/config/UnionPayConfigService.java @@ -140,7 +140,7 @@ public class UnionPayConfigService { public String getReturnUrl() { MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo(); var platformInfo = platformConfigService.getConfig(); - return StrUtil.format("{}/unipay/return/{}/{}/union",platformInfo.getGatewayServiceUrl(),mchAppInfo.getAppId()); + return StrUtil.format("{}/unipay/return/{}/union",platformInfo.getGatewayServiceUrl(),mchAppInfo.getAppId()); } /** diff --git a/daxpay-single-channel/daxpay-single-wechat/src/main/java/org/dromara/daxpay/channel/wechat/service/assist/WechatAuthService.java b/daxpay-single-channel/daxpay-single-wechat/src/main/java/org/dromara/daxpay/channel/wechat/service/assist/WechatAuthService.java index 3d7a138ec..2bb968eb2 100644 --- a/daxpay-single-channel/daxpay-single-wechat/src/main/java/org/dromara/daxpay/channel/wechat/service/assist/WechatAuthService.java +++ b/daxpay-single-channel/daxpay-single-wechat/src/main/java/org/dromara/daxpay/channel/wechat/service/assist/WechatAuthService.java @@ -47,7 +47,7 @@ public class WechatAuthService { PlatformConfig platformConfig = platformsConfigService.getConfig(); String queryCode = RandomUtil.randomString(10); String serverUrl = platformConfig.getGatewayMobileUrl(); - String redirectUrl = StrUtil.format("{}/wechat/auth/{}/{}/{}", serverUrl, param.getAppId(), param.getChannel(),queryCode); + String redirectUrl = StrUtil.format("{}/wechat/auth/{}/{}", serverUrl, param.getAppId(), param.getChannel(),queryCode); String authUrl = wxMpService.getOAuth2Service().buildAuthorizationUrl(redirectUrl, WxConsts.OAuth2Scope.SNSAPI_BASE, ""); return new AuthUrlResult().setAuthUrl(authUrl).setQueryCode(queryCode); } diff --git a/daxpay-single-channel/daxpay-single-wechat/src/main/java/org/dromara/daxpay/channel/wechat/service/config/WechatPayConfigService.java b/daxpay-single-channel/daxpay-single-wechat/src/main/java/org/dromara/daxpay/channel/wechat/service/config/WechatPayConfigService.java index 1c09fdd16..52dee3d73 100644 --- a/daxpay-single-channel/daxpay-single-wechat/src/main/java/org/dromara/daxpay/channel/wechat/service/config/WechatPayConfigService.java +++ b/daxpay-single-channel/daxpay-single-wechat/src/main/java/org/dromara/daxpay/channel/wechat/service/config/WechatPayConfigService.java @@ -95,7 +95,7 @@ public class WechatPayConfigService { public String getPayNotifyUrl() { MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo(); var platformInfo = platformConfigService.getConfig(); - return StrUtil.format("{}/unipay/callback/{}/{}/wechat/pay",platformInfo.getGatewayServiceUrl(),mchAppInfo.getAppId()); + return StrUtil.format("{}/unipay/callback/{}/wechat/pay",platformInfo.getGatewayServiceUrl(),mchAppInfo.getAppId()); } /** @@ -104,7 +104,7 @@ public class WechatPayConfigService { public String getRefundNotifyUrl() { MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo(); var platformInfo = platformConfigService.getConfig(); - return StrUtil.format("{}/unipay/callback/{}/{}/wechat/refund",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId()); + return StrUtil.format("{}/unipay/callback/{/wechat/refund",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId()); } /** @@ -113,7 +113,7 @@ public class WechatPayConfigService { public String getTransferNotifyUrl() { MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo(); var platformInfo = platformConfigService.getConfig(); - return StrUtil.format("{}/unipay/callback/{}/{}/wechat/transfer",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId()); + return StrUtil.format("{}/unipay/callback/{}/wechat/transfer",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId()); } diff --git a/daxpay-single-channel/daxpay-single-wechat/src/main/java/org/dromara/daxpay/channel/wechat/service/pay/WechatPayCashierService.java b/daxpay-single-channel/daxpay-single-wechat/src/main/java/org/dromara/daxpay/channel/wechat/service/pay/WechatPayCashierService.java index 763793489..ec39bf4f8 100644 --- a/daxpay-single-channel/daxpay-single-wechat/src/main/java/org/dromara/daxpay/channel/wechat/service/pay/WechatPayCashierService.java +++ b/daxpay-single-channel/daxpay-single-wechat/src/main/java/org/dromara/daxpay/channel/wechat/service/pay/WechatPayCashierService.java @@ -43,7 +43,7 @@ public class WechatPayCashierService { WxMpService wxMpService = this.getWxMpService(); PlatformConfig platformConfig = platformConfigService.getConfig(); String serverUrl = platformConfig.getGatewayMobileUrl(); - String redirectUrl = StrUtil.format("{}/wechat/cashier/{}/{}", serverUrl, param.getAppId()); + String redirectUrl = StrUtil.format("{}/wechat/cashier/{}", serverUrl, param.getAppId()); return wxMpService.getOAuth2Service().buildAuthorizationUrl(redirectUrl, WxConsts.OAuth2Scope.SNSAPI_BASE, ""); } diff --git a/daxpay-single-server/src/main/resources/application.yml b/daxpay-single-server/src/main/resources/application.yml index f3089641f..b89ac4840 100644 --- a/daxpay-single-server/src/main/resources/application.yml +++ b/daxpay-single-server/src/main/resources/application.yml @@ -4,7 +4,7 @@ spring: application: name: dax-pay-server profiles: - active: demo + active: dev task: scheduling: pool: diff --git a/daxpay-single/daxpay-single-service/src/main/java/org/dromara/daxpay/service/service/config/ChannelCashierConfigService.java b/daxpay-single/daxpay-single-service/src/main/java/org/dromara/daxpay/service/service/config/ChannelCashierConfigService.java index 2a750522f..92f55c3e7 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/org/dromara/daxpay/service/service/config/ChannelCashierConfigService.java +++ b/daxpay-single/daxpay-single-service/src/main/java/org/dromara/daxpay/service/service/config/ChannelCashierConfigService.java @@ -110,6 +110,6 @@ public class ChannelCashierConfigService { MchApp mchApp = mchAppManager.findByAppId(appId).orElseThrow(() -> new DataNotExistException("未找到指定的应用配置")); PlatformConfig platformConfig = platformConfigService.getConfig(); String serverUrl = platformConfig.getGatewayMobileUrl(); - return StrUtil.format("{}/channel/cashier/{}/{}", serverUrl, mchApp.getAppId()); + return StrUtil.format("{}/channel/cashier/{}", serverUrl, mchApp.getAppId()); } }