|
@@ -106,22 +106,17 @@ func UpdateUserMsgSummary(in *message.MultipleSaveMsgReq) error {
|
|
|
}
|
|
|
wg := &sync.WaitGroup{}
|
|
|
group_id := MsgGroupIdMap[int(in.MsgType)]
|
|
|
- str := ""
|
|
|
- i := 0
|
|
|
+ var ids []string
|
|
|
for _, v := range userIdArr {
|
|
|
- i++
|
|
|
- if i != 1 {
|
|
|
- str += ","
|
|
|
- }
|
|
|
- str += "'" + v + "'"
|
|
|
- if i == 1000 {
|
|
|
- go Update(str, in.MsgLogId)
|
|
|
- str = ""
|
|
|
- i = 0
|
|
|
+ ids = append(ids, fmt.Sprintf(`'%s'`, v))
|
|
|
+ if len(ids) == 1000 {
|
|
|
+ idStr := strings.Join(ids, ",")
|
|
|
+ go Update(idStr, in.MsgLogId)
|
|
|
+ ids = []string{}
|
|
|
}
|
|
|
}
|
|
|
- if i > 0 {
|
|
|
- go Update(str, in.MsgLogId)
|
|
|
+ if len(ids) > 0 {
|
|
|
+ go Update(strings.Join(ids, ","), in.MsgLogId)
|
|
|
}
|
|
|
//p459 特殊处理 传过来的消息内容格式为 消息内容#jy#微信模板项目名称#jy#服务地址
|
|
|
equityName, equityAddr := "", ""
|