From 718e965376aba442edab22dc44d52f4414c43b0b Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 13 Dec 2024 15:06:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/md/md_notice.go | 1 + app/svc/notice/svc_aliyun_sms.go | 5 +++++ go.mod | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) 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