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 := ""