mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-08 14:15:34 +08:00
refactor(payment): 移除 PayProductConfig 的 configured 字段并 DROP 数据库列
This commit is contained in:
@@ -61,3 +61,17 @@ WHERE t.container_id = o.id
|
||||
AND t.trade_type = 'gateway'
|
||||
AND t.provider IS NULL
|
||||
AND o.provider IS NOT NULL;
|
||||
|
||||
-- ============================================================
|
||||
-- pay_md_product_config 删除 configured 字段
|
||||
-- ============================================================
|
||||
-- 背景:
|
||||
-- 该字段仅用于前端卡片"未配置"标签展示, 由前端保存时手动设置,
|
||||
-- 无任何后端业务逻辑读取(通道模块只读 activeEnv).
|
||||
-- 每个支付产品的配置存储方式各不相同(20+ 张独立 key_config/channel_merchant 表,
|
||||
-- 字段差异极大), 无法用统一规则判定"是否已配置", 故该字段不可靠, 一并移除.
|
||||
-- 影响:
|
||||
-- - 升级后前端不再展示"未配置"标签, 卡片仅显示产品图标与名称.
|
||||
-- - 无任何业务逻辑受影响(路由匹配/订单处理/通道选择均不读此字段).
|
||||
-- ============================================================
|
||||
ALTER TABLE pay_md_product_config DROP COLUMN IF EXISTS configured;
|
||||
|
||||
@@ -85,7 +85,6 @@ public class PayProductConfigService {
|
||||
config.setProduct(param.getProduct());
|
||||
config.setChannel(param.getChannel());
|
||||
config.setActiveEnv(param.getActiveEnv() != null ? param.getActiveEnv() : PayEnvEnum.PROD.getCode());
|
||||
config.setConfigured(param.isConfigured());
|
||||
config.setRemark(param.getRemark());
|
||||
payProductConfigManager.saveOrUpdate(config);
|
||||
}
|
||||
@@ -127,10 +126,8 @@ public class PayProductConfigService {
|
||||
if (config != null) {
|
||||
result.setId(config.getId());
|
||||
result.setActiveEnv(config.getActiveEnv());
|
||||
result.setConfigured(config.isConfigured());
|
||||
} else {
|
||||
result.setActiveEnv(PayEnvEnum.PROD.getCode());
|
||||
result.setConfigured(false);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -144,7 +141,6 @@ public class PayProductConfigService {
|
||||
config.setProduct(product);
|
||||
config.setChannel(productEnum.getChannel());
|
||||
config.setActiveEnv(PayEnvEnum.PROD.getCode());
|
||||
config.setConfigured(false);
|
||||
payProductConfigManager.save(config);
|
||||
return config;
|
||||
}
|
||||
|
||||
@@ -26,9 +26,6 @@ public class PayProductConfig extends MpBaseEntity implements ToResult<PayProduc
|
||||
/// 生效环境: prod/sandbox
|
||||
private String activeEnv;
|
||||
|
||||
/// 是否已配置参数
|
||||
private boolean configured;
|
||||
|
||||
/// 备注
|
||||
private String remark;
|
||||
|
||||
|
||||
@@ -23,9 +23,6 @@ public class PayProductConfigParam {
|
||||
@Schema(description = "生效环境: prod/sandbox")
|
||||
private String activeEnv;
|
||||
|
||||
@Schema(description = "是否已配置参数")
|
||||
private boolean configured;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@@ -32,9 +32,6 @@ public class PayProductConfigResult extends BaseResult {
|
||||
@Schema(description = "生效环境: prod/sandbox")
|
||||
private String activeEnv;
|
||||
|
||||
@Schema(description = "是否已配置参数")
|
||||
private boolean configured;
|
||||
|
||||
/// 是否为服务商模式(true=服务商, false=直连)
|
||||
private boolean isv;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user