@@ -40,7 +40,7 @@ func AliyunSmsRecord(eg *xorm.Engine) { | |||||
MoreSmsSend(eg, ch, v) | MoreSmsSend(eg, ch, v) | ||||
} | } | ||||
if v.Target == "2" { //等级 | if v.Target == "2" { //等级 | ||||
commSmsSend(eg, ch, v, p, utils.IntToStr(v.Level)) | |||||
commSmsSend(eg, ch, v, p, v.Level) | |||||
} | } | ||||
if v.Target == "3" { //指定标签 | if v.Target == "3" { //指定标签 | ||||
tagSmsRecordSend(eg, ch, v, p) | tagSmsRecordSend(eg, ch, v, p) | ||||
@@ -103,7 +103,9 @@ func commSmsSend(eg *xorm.Engine, ch *rabbit.Channel, data model.AliyunSmsRecord | |||||
var userList []model.User | var userList []model.User | ||||
sess := eg.Where("1=1") | sess := eg.Where("1=1") | ||||
if level != "" { | 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) | sess.Asc("id").Limit(1000, p).Find(&userList) | ||||
uids := "" | uids := "" | ||||
@@ -44,7 +44,7 @@ func JpushRecord(eg *xorm.Engine) { | |||||
MoreJpushRecordSend(eg, ch, v) | MoreJpushRecordSend(eg, ch, v) | ||||
} | } | ||||
if v.Target == "2" { //等级 | if v.Target == "2" { //等级 | ||||
commJpushRecordSend(eg, ch, v, p, utils.IntToStr(v.Level)) | |||||
commJpushRecordSend(eg, ch, v, p, v.Level) | |||||
} | } | ||||
if v.Target == "3" { //标签 | if v.Target == "3" { //标签 | ||||
tagJpushRecordSend(eg, ch, v, p) | tagJpushRecordSend(eg, ch, v, p) | ||||
@@ -59,7 +59,9 @@ func commJpushRecordSend(eg *xorm.Engine, ch *rabbit.Channel, data model.JpushRe | |||||
var userList []model.User | var userList []model.User | ||||
sess := eg.Where("1=1") | sess := eg.Where("1=1") | ||||
if level != "" { | 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) | sess.Asc("id").Limit(1000, p).Find(&userList) | ||||
uids := "" | uids := "" | ||||