|
@@ -378,7 +378,7 @@ func pushMsg(param *SendMessage, sendStatus int) (int, error) {
|
|
|
if appVersion > "3.0.3" {
|
|
|
go util.AppGrpcPush(dt, otherPushId, jgPushId, phoneType, appPushUrl)
|
|
|
}
|
|
|
- if i == 100 {
|
|
|
+ if i >= 100 {
|
|
|
//调用消息中台
|
|
|
log.Println("100个用户开始发送消息:", i)
|
|
|
util.MultipleSaveMessage(msg, userIds, userNames)
|
|
@@ -458,9 +458,6 @@ func GroupSendMsg(param *public.Message, sendStatus int, loginUserId int, loginU
|
|
|
projectIdMap.Store(userId, true)
|
|
|
}
|
|
|
log.Println("单条数据用户id:", user.UserId)
|
|
|
- i++
|
|
|
- userIds += userId + ","
|
|
|
-
|
|
|
//查询mongo库用户信息
|
|
|
userData := &map[string]interface{}{}
|
|
|
ok := false
|
|
@@ -468,11 +465,13 @@ func GroupSendMsg(param *public.Message, sendStatus int, loginUserId int, loginU
|
|
|
if userData == nil || len(*userData) == 0 || !ok {
|
|
|
continue
|
|
|
}
|
|
|
+ i++
|
|
|
+ userIds += userId + ","
|
|
|
//name := qutil.ObjToString((*userData)["s_name"])
|
|
|
userNames += "" + ","
|
|
|
public.AppPushMsg(param, *userData, loginUserId, loginUserName, msgType)
|
|
|
log.Println("用户数量:", i)
|
|
|
- if i == 100 {
|
|
|
+ if i >= 100 {
|
|
|
log.Println("100用户开始发送消息:", len(userIds))
|
|
|
//调用消息中台
|
|
|
util.MultipleSaveMessage(msg, userIds, userNames)
|