feat(config): 添加API网关配置并更新订单通知URL
- 在配置属性中新增apiUrl字段用于API网关地址 - 为开发、测试、生产环境配置文件添加api-url配置项 - 更新商城订单服务中的通知URL使用API网关地址 - 修改默认订单通知URL和微信支付通知URL的获取逻辑 - 保留server-url作为基础模块接口,api-url作为业务模块接口 - 实现基础模块和业务模块接口分离的架构设计
This commit is contained in:
@@ -92,6 +92,11 @@ public class ConfigProperties {
|
|||||||
*/
|
*/
|
||||||
private String serverUrl;
|
private String serverUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API网关地址
|
||||||
|
*/
|
||||||
|
private String apiUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 阿里云存储 OSS
|
* 阿里云存储 OSS
|
||||||
* Endpoint
|
* Endpoint
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ public class ShopOrderServiceImpl extends ServiceImpl<ShopOrderMapper, ShopOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String defaultShopOrderNotifyUrl(Integer tenantId) {
|
private String defaultShopOrderNotifyUrl(Integer tenantId) {
|
||||||
String base = trimTrailingSlashes(config.getServerUrl());
|
String base = trimTrailingSlashes(config.getApiUrl());
|
||||||
if (StrUtil.isBlank(base) || tenantId == null) {
|
if (StrUtil.isBlank(base) || tenantId == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -197,7 +197,7 @@ public class ShopOrderServiceImpl extends ServiceImpl<ShopOrderMapper, ShopOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String legacySystemWxPayNotifyUrl(Integer tenantId) {
|
private String legacySystemWxPayNotifyUrl(Integer tenantId) {
|
||||||
String base = trimTrailingSlashes(config.getServerUrl());
|
String base = trimTrailingSlashes(config.getApiUrl());
|
||||||
if (StrUtil.isBlank(base) || tenantId == null) {
|
if (StrUtil.isBlank(base) || tenantId == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,8 +44,10 @@ mqtt:
|
|||||||
|
|
||||||
# 框架配置
|
# 框架配置
|
||||||
config:
|
config:
|
||||||
# 开发环境接口
|
# 基础模块接口
|
||||||
server-url: https://server.websoft.top/api
|
server-url: https://server.websoft.top/api
|
||||||
|
# 业务模块接口
|
||||||
|
api-url: https://cms-api.websoft.top/api
|
||||||
upload-path: /Users/gxwebsoft/Documents/uploads/ # window(D:\Temp)
|
upload-path: /Users/gxwebsoft/Documents/uploads/ # window(D:\Temp)
|
||||||
|
|
||||||
# 开发环境证书配置
|
# 开发环境证书配置
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ config:
|
|||||||
file-server: https://file-s209.shoplnk.cn
|
file-server: https://file-s209.shoplnk.cn
|
||||||
# 生产环境接口
|
# 生产环境接口
|
||||||
server-url: https://glt-server.websoft.top/api
|
server-url: https://glt-server.websoft.top/api
|
||||||
|
# 业务模块接口
|
||||||
|
api-url: https://glt-api.websoft.top/api
|
||||||
upload-path: /www/wwwroot/file.ws
|
upload-path: /www/wwwroot/file.ws
|
||||||
|
|
||||||
# 阿里云OSS云存储
|
# 阿里云OSS云存储
|
||||||
|
|||||||
@@ -47,8 +47,10 @@ mqtt:
|
|||||||
config:
|
config:
|
||||||
# 文件服务器
|
# 文件服务器
|
||||||
file-server: https://file-s209.shoplnk.cn
|
file-server: https://file-s209.shoplnk.cn
|
||||||
# 生产环境接口
|
# 基础模块接口
|
||||||
server-url: https://server.websoft.top/api
|
server-url: https://server.websoft.top/api
|
||||||
|
# 业务模块接口
|
||||||
|
api-url: https://cms-api.websoft.top/api
|
||||||
upload-path: /www/wwwroot/file.ws
|
upload-path: /www/wwwroot/file.ws
|
||||||
|
|
||||||
# 阿里云OSS云存储
|
# 阿里云OSS云存储
|
||||||
|
|||||||
Reference in New Issue
Block a user