feat(sms): 新增节点短信提醒(审核未通过/被租用需辅助/上架未成交)

This commit is contained in:
yml2213
2026-10-14 14:57:52 +08:00
parent efa0aa4ffd
commit 93e102b7c0
38 changed files with 3228 additions and 70 deletions
@@ -6,6 +6,7 @@ import (
"strings"
"hfb_sys/backend/internal/modules/rentergrowth"
smsnode "hfb_sys/backend/internal/modules/sms"
)
func (s *Service) Update(ctx context.Context, actorID uint64, key string, req UpdateRequest, meta AuditMeta) (*ConfigDTO, error) {
@@ -36,6 +37,17 @@ func (s *Service) Update(ctx context.Context, actorID uint64, key string, req Up
}
req.Value = value
}
if key == smsnode.ConfigKey {
cfg, err := smsnode.ParseConfigValue(req.Value)
if err != nil {
return nil, ErrInvalidConfig
}
value, err := smsnode.MarshalConfig(cfg)
if err != nil {
return nil, ErrInvalidConfig
}
req.Value = value
}
return s.repo.Update(ctx, actorID, key, req, meta)
}