From 56717fd4466ecf92d2bb607aa02b33a838d29404 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 5 Dec 2024 16:42:12 +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/task/svc/svc_aliyun_sms_record.go | 6 ++++-- app/task/svc/svc_jpush_record.go | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/task/svc/svc_aliyun_sms_record.go b/app/task/svc/svc_aliyun_sms_record.go index 4847c99..d53a91e 100644 --- a/app/task/svc/svc_aliyun_sms_record.go +++ b/app/task/svc/svc_aliyun_sms_record.go @@ -40,7 +40,7 @@ func AliyunSmsRecord(eg *xorm.Engine) { MoreSmsSend(eg, ch, v) } if v.Target == "2" { //等级 - commSmsSend(eg, ch, v, p, utils.IntToStr(v.Level)) + commSmsSend(eg, ch, v, p, v.Level) } if v.Target == "3" { //指定标签 tagSmsRecordSend(eg, ch, v, p) @@ -103,7 +103,9 @@ func commSmsSend(eg *xorm.Engine, ch *rabbit.Channel, data model.AliyunSmsRecord var userList []model.User sess := eg.Where("1=1") if level != "" { - sess.And("level=?", level) + var tmp []string + json.Unmarshal([]byte(level), &tmp) + sess.In("level", tmp) } sess.Asc("id").Limit(1000, p).Find(&userList) uids := "" diff --git a/app/task/svc/svc_jpush_record.go b/app/task/svc/svc_jpush_record.go index 8341bda..06566b4 100644 --- a/app/task/svc/svc_jpush_record.go +++ b/app/task/svc/svc_jpush_record.go @@ -44,7 +44,7 @@ func JpushRecord(eg *xorm.Engine) { MoreJpushRecordSend(eg, ch, v) } if v.Target == "2" { //等级 - commJpushRecordSend(eg, ch, v, p, utils.IntToStr(v.Level)) + commJpushRecordSend(eg, ch, v, p, v.Level) } if v.Target == "3" { //标签 tagJpushRecordSend(eg, ch, v, p) @@ -59,7 +59,9 @@ func commJpushRecordSend(eg *xorm.Engine, ch *rabbit.Channel, data model.JpushRe var userList []model.User sess := eg.Where("1=1") if level != "" { - sess.And("level=?", level) + var tmp []string + json.Unmarshal([]byte(level), &tmp) + sess.In("level", tmp) } sess.Asc("id").Limit(1000, p).Find(&userList) uids := ""