mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-04 19:49:07 +00:00
fix 路径拼接错误和添加请求路径注解
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package cn.bootx.platform.starter.redis.delay.controller;
|
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.Res;
|
||||||
import cn.bootx.platform.core.rest.param.PageParam;
|
import cn.bootx.platform.core.rest.param.PageParam;
|
||||||
import cn.bootx.platform.core.rest.result.PageResult;
|
import cn.bootx.platform.core.rest.result.PageResult;
|
||||||
@@ -23,61 +25,71 @@ import java.util.List;
|
|||||||
* @author xxm
|
* @author xxm
|
||||||
* @since 2024/9/20
|
* @since 2024/9/20
|
||||||
*/
|
*/
|
||||||
@Tag(name = "")
|
@Tag(name = "延时队列管理")
|
||||||
|
@RequestGroup(groupCode = "delay", groupName = "延时队列管理", moduleCode = "starter", moduleName = "starter模块")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/delay/queue")
|
@RequestMapping("/delay/queue")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class DelayQueueController {
|
public class DelayQueueController {
|
||||||
private final DelayQueueService delayQueueService;
|
private final DelayQueueService delayQueueService;
|
||||||
|
|
||||||
|
@RequestPath("获取桶信息列表")
|
||||||
@Operation(summary = "获取桶信息列表")
|
@Operation(summary = "获取桶信息列表")
|
||||||
@GetMapping("/getBucket")
|
@GetMapping("/getBucket")
|
||||||
public Result<List<BucketResult>> getBucket() {
|
public Result<List<BucketResult>> getBucket() {
|
||||||
return Res.ok(delayQueueService.getBucket());
|
return Res.ok(delayQueueService.getBucket());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestPath("获取死信主题列表")
|
||||||
@Operation(summary = "获取桶任务分页")
|
@Operation(summary = "获取桶任务分页")
|
||||||
@GetMapping("/pageBucketJob")
|
@GetMapping("/pageBucketJob")
|
||||||
public Result<PageResult<DelayJobResult>> pageBucketJob(String bucketName, PageParam pageParam) {
|
public Result<PageResult<DelayJobResult>> pageBucketJob(String bucketName, PageParam pageParam) {
|
||||||
return Res.ok(delayQueueService.pageBucketJob(bucketName, pageParam));
|
return Res.ok(delayQueueService.pageBucketJob(bucketName, pageParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestPath("获取就绪主题列表")
|
||||||
@Operation(summary = "获取就绪主题列表")
|
@Operation(summary = "获取就绪主题列表")
|
||||||
@GetMapping("/getReadyTopic")
|
@GetMapping("/getReadyTopic")
|
||||||
public Result<List<TopicResult>> getReadyTopic() {
|
public Result<List<TopicResult>> getReadyTopic() {
|
||||||
return Res.ok(delayQueueService.getDelayTopic());
|
return Res.ok(delayQueueService.getDelayTopic());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestPath("获取就绪主题任务分页")
|
||||||
@Operation(summary = "获取就绪任务分页")
|
@Operation(summary = "获取就绪任务分页")
|
||||||
@GetMapping("/pageReadyJob")
|
@GetMapping("/pageReadyJob")
|
||||||
public Result<PageResult<DelayJobResult>> pageReadyJob(String topic, PageParam pageParam) {
|
public Result<PageResult<DelayJobResult>> pageReadyJob(String topic, PageParam pageParam) {
|
||||||
return Res.ok(delayQueueService.pageReadyJob(topic, pageParam));
|
return Res.ok(delayQueueService.pageReadyJob(topic, pageParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestPath("获取任务详情")
|
||||||
@Operation(summary = "获取任务详情")
|
@Operation(summary = "获取任务详情")
|
||||||
@PostMapping("/getJobDetail")
|
@PostMapping("/getJobDetail")
|
||||||
public Result<DelayJobResult> getJobDetail(String jobId) {
|
public Result<DelayJobResult> getJobDetail(String jobId) {
|
||||||
return Res.ok(delayQueueService.getJobDetail(jobId));
|
return Res.ok(delayQueueService.getJobDetail(jobId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestPath("获取死信主题列表")
|
||||||
@Operation(summary = "获取死信主题数量和列表")
|
@Operation(summary = "获取死信主题数量和列表")
|
||||||
@GetMapping("/getDeadTopic")
|
@GetMapping("/getDeadTopic")
|
||||||
public Result<List<TopicResult>> getDeadTopic() {
|
public Result<List<TopicResult>> getDeadTopic() {
|
||||||
return Res.ok(delayQueueService.getDeadTopic());
|
return Res.ok(delayQueueService.getDeadTopic());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestPath("获取死信主题任务分页")
|
||||||
@Operation(summary = "获取死信主题任务分页")
|
@Operation(summary = "获取死信主题任务分页")
|
||||||
@GetMapping("/pageDeadJob")
|
@GetMapping("/pageDeadJob")
|
||||||
public Result<PageResult<DelayJobResult>> pageDeadJob(String topic, PageParam pageParam) {
|
public Result<PageResult<DelayJobResult>> pageDeadJob(String topic, PageParam pageParam) {
|
||||||
return Res.ok(delayQueueService.pageDeadJob(topic, pageParam));
|
return Res.ok(delayQueueService.pageDeadJob(topic, pageParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestPath("获取死信任务详情")
|
||||||
@Operation(summary = "获取死信任务详情")
|
@Operation(summary = "获取死信任务详情")
|
||||||
@PostMapping("/getDeadJobDetail")
|
@PostMapping("/getDeadJobDetail")
|
||||||
public Result<DelayJobResult> resetDeadJob(String jobId) {
|
public Result<DelayJobResult> resetDeadJob(String jobId) {
|
||||||
return Res.ok(delayQueueService.getDeadJobDetail(jobId));
|
return Res.ok(delayQueueService.getDeadJobDetail(jobId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestPath("删除死信任务")
|
||||||
@Operation(summary = "删除死信任务")
|
@Operation(summary = "删除死信任务")
|
||||||
@PostMapping("/removeDeadJob")
|
@PostMapping("/removeDeadJob")
|
||||||
public Result<Object> removeDeadJob(String jobId) {
|
public Result<Object> removeDeadJob(String jobId) {
|
||||||
|
@@ -111,7 +111,7 @@ public class AliPayConfigService {
|
|||||||
public String getReturnUrl() {
|
public String getReturnUrl() {
|
||||||
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
|
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
|
||||||
var platformInfo = platformConfigService.getConfig();
|
var platformInfo = platformConfigService.getConfig();
|
||||||
return StrUtil.format("{}/unipay/return/{}/{}/alipay",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId());
|
return StrUtil.format("{}/unipay/return/{}/alipay",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -48,7 +48,7 @@ public class AliPayAuthService {
|
|||||||
|
|
||||||
// 授权地址
|
// 授权地址
|
||||||
String serverUrl = platformConfig.getGatewayMobileUrl();
|
String serverUrl = platformConfig.getGatewayMobileUrl();
|
||||||
String authUrl = StrUtil.format("{}/alipay/auth/{}/{}/{}/{}",
|
String authUrl = StrUtil.format("{}/alipay/auth/{}/{}/{}",
|
||||||
serverUrl, param.getAppId(),param.getChannel(),queryCode,aliPayConfig.getAliAppId());
|
serverUrl, param.getAppId(),param.getChannel(),queryCode,aliPayConfig.getAliAppId());
|
||||||
|
|
||||||
return new AuthUrlResult().setAuthUrl(authUrl).setQueryCode(queryCode);
|
return new AuthUrlResult().setAuthUrl(authUrl).setQueryCode(queryCode);
|
||||||
|
@@ -140,7 +140,7 @@ public class UnionPayConfigService {
|
|||||||
public String getReturnUrl() {
|
public String getReturnUrl() {
|
||||||
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
|
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
|
||||||
var platformInfo = platformConfigService.getConfig();
|
var platformInfo = platformConfigService.getConfig();
|
||||||
return StrUtil.format("{}/unipay/return/{}/{}/union",platformInfo.getGatewayServiceUrl(),mchAppInfo.getAppId());
|
return StrUtil.format("{}/unipay/return/{}/union",platformInfo.getGatewayServiceUrl(),mchAppInfo.getAppId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -47,7 +47,7 @@ public class WechatAuthService {
|
|||||||
PlatformConfig platformConfig = platformsConfigService.getConfig();
|
PlatformConfig platformConfig = platformsConfigService.getConfig();
|
||||||
String queryCode = RandomUtil.randomString(10);
|
String queryCode = RandomUtil.randomString(10);
|
||||||
String serverUrl = platformConfig.getGatewayMobileUrl();
|
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, "");
|
String authUrl = wxMpService.getOAuth2Service().buildAuthorizationUrl(redirectUrl, WxConsts.OAuth2Scope.SNSAPI_BASE, "");
|
||||||
return new AuthUrlResult().setAuthUrl(authUrl).setQueryCode(queryCode);
|
return new AuthUrlResult().setAuthUrl(authUrl).setQueryCode(queryCode);
|
||||||
}
|
}
|
||||||
|
@@ -95,7 +95,7 @@ public class WechatPayConfigService {
|
|||||||
public String getPayNotifyUrl() {
|
public String getPayNotifyUrl() {
|
||||||
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
|
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
|
||||||
var platformInfo = platformConfigService.getConfig();
|
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() {
|
public String getRefundNotifyUrl() {
|
||||||
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
|
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
|
||||||
var platformInfo = platformConfigService.getConfig();
|
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() {
|
public String getTransferNotifyUrl() {
|
||||||
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
|
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
|
||||||
var platformInfo = platformConfigService.getConfig();
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ public class WechatPayCashierService {
|
|||||||
WxMpService wxMpService = this.getWxMpService();
|
WxMpService wxMpService = this.getWxMpService();
|
||||||
PlatformConfig platformConfig = platformConfigService.getConfig();
|
PlatformConfig platformConfig = platformConfigService.getConfig();
|
||||||
String serverUrl = platformConfig.getGatewayMobileUrl();
|
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, "");
|
return wxMpService.getOAuth2Service().buildAuthorizationUrl(redirectUrl, WxConsts.OAuth2Scope.SNSAPI_BASE, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@ spring:
|
|||||||
application:
|
application:
|
||||||
name: dax-pay-server
|
name: dax-pay-server
|
||||||
profiles:
|
profiles:
|
||||||
active: demo
|
active: dev
|
||||||
task:
|
task:
|
||||||
scheduling:
|
scheduling:
|
||||||
pool:
|
pool:
|
||||||
|
@@ -110,6 +110,6 @@ public class ChannelCashierConfigService {
|
|||||||
MchApp mchApp = mchAppManager.findByAppId(appId).orElseThrow(() -> new DataNotExistException("未找到指定的应用配置"));
|
MchApp mchApp = mchAppManager.findByAppId(appId).orElseThrow(() -> new DataNotExistException("未找到指定的应用配置"));
|
||||||
PlatformConfig platformConfig = platformConfigService.getConfig();
|
PlatformConfig platformConfig = platformConfigService.getConfig();
|
||||||
String serverUrl = platformConfig.getGatewayMobileUrl();
|
String serverUrl = platformConfig.getGatewayMobileUrl();
|
||||||
return StrUtil.format("{}/channel/cashier/{}/{}", serverUrl, mchApp.getAppId());
|
return StrUtil.format("{}/channel/cashier/{}", serverUrl, mchApp.getAppId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user