|
@@ -92,7 +92,6 @@ func AllUserSendMsg(param *Message, loginUserId int, loginUserName string, msgLo
|
|
if userInfo == nil || len(userInfo) == 0 {
|
|
if userInfo == nil || len(userInfo) == 0 {
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
- //name := qutil.ObjToString(userInfo["s_name"])
|
|
|
|
userId := mongodb.BsonIdToSId(userInfo["_id"])
|
|
userId := mongodb.BsonIdToSId(userInfo["_id"])
|
|
userNames += "" + "," // 由于部分昵称包含表情、数据库存不进去,所以消息表不保存用户昵称
|
|
userNames += "" + "," // 由于部分昵称包含表情、数据库存不进去,所以消息表不保存用户昵称
|
|
userIds += userId + ","
|
|
userIds += userId + ","
|
|
@@ -150,7 +149,9 @@ func AppPushMsg(param *Message, userInfo map[string]interface{}, loginUserId int
|
|
appPushUrl := "/jyapp/frontPage/messageCenter/sess/index"
|
|
appPushUrl := "/jyapp/frontPage/messageCenter/sess/index"
|
|
if strings.Contains(phoneType, "iPhone") {
|
|
if strings.Contains(phoneType, "iPhone") {
|
|
if param.IosUrl != "" {
|
|
if param.IosUrl != "" {
|
|
- appPushUrl = param.IosUrl
|
|
|
|
|
|
+ if strings.HasPrefix(appPushUrl, "/") {
|
|
|
|
+ appPushUrl = appPushUrl[1:]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if param.AndroidUrl != "" {
|
|
if param.AndroidUrl != "" {
|
|
@@ -188,6 +189,7 @@ func WxTmplPushMsg(param *Message, userInfo map[string]interface{}) {
|
|
log.Println("未知消息类型")
|
|
log.Println("未知消息类型")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ log.Println(param.Title, param.SendTime, param.Content, "", param.WeChatUrl, param.MsgType)
|
|
if err := SendWxTmplMsg(mongodb.BsonIdToSId(userInfo["_id"]), param.Title, param.SendTime, param.Content, "", param.WeChatUrl, param.MsgType); err != nil {
|
|
if err := SendWxTmplMsg(mongodb.BsonIdToSId(userInfo["_id"]), param.Title, param.SendTime, param.Content, "", param.WeChatUrl, param.MsgType); err != nil {
|
|
log.Println("WxTmplPushMsg error ", err.Error())
|
|
log.Println("WxTmplPushMsg error ", err.Error())
|
|
}
|
|
}
|
|
@@ -263,6 +265,7 @@ func GetMegType() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
BlackClassMap = blackClassMap
|
|
BlackClassMap = blackClassMap
|
|
WxBlackPush = wxBlackPush
|
|
WxBlackPush = wxBlackPush
|
|
BlackNameType = nameTypeMap
|
|
BlackNameType = nameTypeMap
|