diff --git a/app/md/md_notice.go b/app/md/md_notice.go index 81522fc..6a496de 100644 --- a/app/md/md_notice.go +++ b/app/md/md_notice.go @@ -119,6 +119,7 @@ type NoticeAliyunSmsPushSaveReq struct { Title string `json:"title"` Content string `json:"content"` Target string `json:"target"` + SmsCode string `json:"sms_code"` PhoneList []string `json:"phone_list"` TagList []string `json:"tag_list"` Level []string `json:"level"` diff --git a/app/svc/notice/svc_aliyun_sms.go b/app/svc/notice/svc_aliyun_sms.go index 524e176..0bf0b25 100644 --- a/app/svc/notice/svc_aliyun_sms.go +++ b/app/svc/notice/svc_aliyun_sms.go @@ -178,6 +178,10 @@ func AliyunSmsPushSave(c *gin.Context) { e.OutErr(c, e.ERR_INVALID_ARGS, err) return } + if req.SmsCode == "" { + e.OutErr(c, 400, e.NewErr(400, "请到阿里云获取营销短信模板id")) + return + } if utils.StrToInt(req.Id) > 0 { } else { data := &model.AliyunSmsRecord{ @@ -188,6 +192,7 @@ func AliyunSmsPushSave(c *gin.Context) { Level: utils.SerializeStr(req.Level), Title: req.Title, Content: req.Content, + SmsCode: req.SmsCode, CreateAt: time.Now(), UpdateAt: time.Now(), } diff --git a/go.mod b/go.mod index 90c5cbc..f887ff0 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( ) require ( - code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241212120727-3681308aeb14 + code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241213070558-a1f0ce782dff code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241212140020-c99f60b4f868 code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5