feat(distribution): 支持分站独立短信验证码通道
- 新增分销站点独立短信服务商配置(阿里云),登录验证码按 site_code/domain 解析专属通道,未启用或解析失败时回退主站默认通道 - 密钥经 crypto.Encryptor 加密落库,模型字段 json 序列化隔离,DTO 仅回传掩码 - provider 白名单校验,mock 仅在非生产环境放行;启用时强制校验必填凭据 - 配置读写/测试接口限管理员权限,测试发送增加 60s 频控(Redis,缺省进程内) - 解密失败记告警并优雅回退主站,避免把密文当明文密钥使用 - 两套前端新增短信配置入口、必填与手机号校验、发送冷却 - 新增迁移 000071 及加解密、白名单、频控、解析回退等单测
This commit is contained in:
@@ -519,3 +519,36 @@ type DistributionTrendPoint struct {
|
||||
GMVCent int64 `json:"gmv_cent"`
|
||||
ProfitCent int64 `json:"profit_cent"`
|
||||
}
|
||||
|
||||
// 分销站点独立短信配置结构体
|
||||
type SiteSMSConfigDTO struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
Provider string `json:"provider"`
|
||||
AccessKeyID string `json:"access_key_id"`
|
||||
MaskedSecret string `json:"masked_secret"`
|
||||
HasSecret bool `json:"has_secret"`
|
||||
Endpoint string `json:"endpoint"`
|
||||
SignName string `json:"sign_name"`
|
||||
LoginTemplateCode string `json:"login_template_code"`
|
||||
}
|
||||
|
||||
type UpdateSiteSMSConfigRequest struct {
|
||||
Enabled *bool `json:"enabled"`
|
||||
Provider *string `json:"provider"`
|
||||
AccessKeyID *string `json:"access_key_id"`
|
||||
AccessKeySecret *string `json:"access_key_secret"`
|
||||
Endpoint *string `json:"endpoint"`
|
||||
SignName *string `json:"sign_name"`
|
||||
LoginTemplateCode *string `json:"login_template_code"`
|
||||
}
|
||||
|
||||
type TestSiteSMSConfigRequest struct {
|
||||
Phone string `json:"phone" binding:"required"`
|
||||
Enabled *bool `json:"enabled"`
|
||||
Provider *string `json:"provider"`
|
||||
AccessKeyID *string `json:"access_key_id"`
|
||||
AccessKeySecret *string `json:"access_key_secret"`
|
||||
Endpoint *string `json:"endpoint"`
|
||||
SignName *string `json:"sign_name"`
|
||||
LoginTemplateCode *string `json:"login_template_code"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user