fix:修复问题如下:
1. 小程序登录新增MINI参数,解决多个Appid问题 2. 新增文件预热功能,测试通过 3. 订单支付逻辑更新完成 4. 数据冷热切换功能发布更新 5. 订单素材上传完成后批量文件cdn预热,提升访问性能
This commit is contained in:
+5
-5
@@ -42,7 +42,7 @@ public class WechatConfigController {
|
||||
@Operation(summary = "根据类型和租户ID查询微信配置")
|
||||
@GetMapping("/type/{type}")
|
||||
public WechatConfig getConfig(@PathVariable String type, @RequestParam String tenantId) {
|
||||
WechatConfig config = wechatConfigService.getConfig(type, tenantId);
|
||||
WechatConfig config = wechatConfigService.getConfigByTypeTenantId(type, tenantId);
|
||||
return config;
|
||||
}
|
||||
|
||||
@@ -113,8 +113,8 @@ public class WechatConfigController {
|
||||
|
||||
@Operation(summary = "获取微信配置")
|
||||
@GetMapping("/app/{id}")
|
||||
public WechatConfig getConfigByAppId(@PathVariable("id") String appId) {
|
||||
return wechatConfigService.getConfig(appId);
|
||||
public WechatConfig getConfigByAppId(@PathVariable("id") String appId, @RequestParam String type) {
|
||||
return wechatConfigService.getConfigByAppIdAndType(appId,type);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/serial/{serialNumber}")
|
||||
@@ -128,7 +128,7 @@ public class WechatConfigController {
|
||||
public Result<Boolean> uploadPrivateKey(@RequestParam("file") MultipartFile file) {
|
||||
try {
|
||||
String privateKey = new String(file.getBytes());
|
||||
WechatConfig wechatConfig = wechatConfigService.getConfig("PAY",TenantContextHolder.getTenant());
|
||||
WechatConfig wechatConfig = wechatConfigService.getConfigByTypeTenantId("PAY",TenantContextHolder.getTenant());
|
||||
wechatConfig.setPrivateKey(privateKey);
|
||||
return Result.succeed(wechatConfigService.updateConfig(wechatConfig));
|
||||
} catch (Exception e) {
|
||||
@@ -140,7 +140,7 @@ public class WechatConfigController {
|
||||
@Operation(summary = "获取当前配置")
|
||||
@GetMapping("/current/{type}")
|
||||
public Result<WechatConfig> getCurrentConfig(@PathVariable String type) {
|
||||
return Result.succeed(wechatConfigService.getConfig(type, TenantContextHolder.getTenant()));
|
||||
return Result.succeed(wechatConfigService.getConfigByTypeTenantId(type, TenantContextHolder.getTenant()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ public interface WechatConfigService extends IService<WechatConfig> {
|
||||
* @param tenantId 商户ID
|
||||
* @return 微信配置
|
||||
*/
|
||||
WechatConfig getConfig(String type, String tenantId);
|
||||
WechatConfig getConfigByTypeTenantId(String type, String tenantId);
|
||||
|
||||
/**
|
||||
* 获取微信配置
|
||||
@@ -31,7 +31,7 @@ public interface WechatConfigService extends IService<WechatConfig> {
|
||||
* @param appId 商户ID
|
||||
* @return 微信配置
|
||||
*/
|
||||
WechatConfig getConfig(String appId);
|
||||
WechatConfig getConfigByAppIdAndType(String appId, String type);
|
||||
|
||||
/**
|
||||
* 获取微信配置
|
||||
|
||||
+3
-2
@@ -31,7 +31,7 @@ public class WechatConfigServiceImpl extends ServiceImpl<WechatConfigMapper, Wec
|
||||
|
||||
@Override
|
||||
// @Cacheable(value = CACHE_NAME, key = CACHE_KEY_PATTERN, unless = "#result == null")
|
||||
public WechatConfig getConfig(String type, String tenantId) {
|
||||
public WechatConfig getConfigByTypeTenantId(String type, String tenantId) {
|
||||
return getOne(new LambdaQueryWrapper<WechatConfig>()
|
||||
.eq(WechatConfig::getType, type)
|
||||
.eq(WechatConfig::getTenantId, tenantId)
|
||||
@@ -39,9 +39,10 @@ public class WechatConfigServiceImpl extends ServiceImpl<WechatConfigMapper, Wec
|
||||
}
|
||||
|
||||
@Override
|
||||
public WechatConfig getConfig(String appId) {
|
||||
public WechatConfig getConfigByAppIdAndType(String appId, String type) {
|
||||
return getOne(new LambdaQueryWrapper<WechatConfig>()
|
||||
.eq(WechatConfig::getAppId, appId)
|
||||
.eq(WechatConfig::getType,type)
|
||||
.eq(WechatConfig::getStatus, 1));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user