|
@@ -401,7 +401,7 @@ func TaskSaveMsg(msgId int, msg *map[string]interface{}, androidUrl, iosUrl stri
|
|
}
|
|
}
|
|
//log.Println("单条数据:", user.UserId)
|
|
//log.Println("单条数据:", user.UserId)
|
|
userId := user.UserId
|
|
userId := user.UserId
|
|
- i++
|
|
|
|
|
|
+
|
|
if config.SysConfigs.UserIdMap[userId] != "" {
|
|
if config.SysConfigs.UserIdMap[userId] != "" {
|
|
userId = config.SysConfigs.UserIdMap[userId]
|
|
userId = config.SysConfigs.UserIdMap[userId]
|
|
}
|
|
}
|
|
@@ -414,6 +414,7 @@ func TaskSaveMsg(msgId int, msg *map[string]interface{}, androidUrl, iosUrl stri
|
|
} else {
|
|
} else {
|
|
projectIdMap.Store(userId, true)
|
|
projectIdMap.Store(userId, true)
|
|
}
|
|
}
|
|
|
|
+ i++
|
|
userIds += userId + ","
|
|
userIds += userId + ","
|
|
//查询mongo库用户信息
|
|
//查询mongo库用户信息
|
|
userData := &map[string]interface{}{}
|
|
userData := &map[string]interface{}{}
|
|
@@ -456,19 +457,24 @@ func TaskSaveMsg(msgId int, msg *map[string]interface{}, androidUrl, iosUrl stri
|
|
if appVersion > "3.0.3" {
|
|
if appVersion > "3.0.3" {
|
|
go util.AppGrpcPush(dt, otherPushId, jgPushId, phoneType, appPushUrl)
|
|
go util.AppGrpcPush(dt, otherPushId, jgPushId, phoneType, appPushUrl)
|
|
}
|
|
}
|
|
|
|
+ log.Println("用户数量:", i)
|
|
if i == 100 {
|
|
if i == 100 {
|
|
//调用中台接口
|
|
//调用中台接口
|
|
|
|
+ log.Println("定时发送中100个用户开始发送消息")
|
|
util.MultipleSaveMessage(msg1, userIds, userNames)
|
|
util.MultipleSaveMessage(msg1, userIds, userNames)
|
|
userNames = ""
|
|
userNames = ""
|
|
userIds = ""
|
|
userIds = ""
|
|
i = 0
|
|
i = 0
|
|
|
|
+ log.Println("定时发送中100个用户发送消息完成")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if i > 0 {
|
|
if i > 0 {
|
|
//调用中台接口
|
|
//调用中台接口
|
|
|
|
+ log.Println("定时发送中最后一批用户开始发送消息")
|
|
util.MultipleSaveMessage(msg1, userIds, userNames)
|
|
util.MultipleSaveMessage(msg1, userIds, userNames)
|
|
userNames = ""
|
|
userNames = ""
|
|
userIds = ""
|
|
userIds = ""
|
|
|
|
+ log.Println("定时发送中最后一批用户发送消息完成")
|
|
}
|
|
}
|
|
log.Println("定时任务,获取分组及分组下用户耗时:", time.Since(st))
|
|
log.Println("定时任务,获取分组及分组下用户耗时:", time.Since(st))
|
|
sendStatus := 4
|
|
sendStatus := 4
|