|
|
@@ -14,8 +14,8 @@ import ( |
|
|
|
|
|
|
|
func getChangeContent(args md3.PushParams, Content string) string { |
|
|
|
Content = strings.Replace(Content, "[MasterId]", args.MasterId, -1) |
|
|
|
Content = strings.Replace(Content, "[消费发送者-会员昵称]", args.SendUserNickname, -1) |
|
|
|
Content = strings.Replace(Content, "[消费发送者-会员头像]", args.SendUserAvatarUrl, -1) |
|
|
|
Content = strings.Replace(Content, "[消息发送者-会员昵称]", args.SendUserNickname, -1) |
|
|
|
Content = strings.Replace(Content, "[消息发送者-会员头像]", args.SendUserAvatarUrl, -1) |
|
|
|
Content = strings.Replace(Content, "[消息类型]", args.MessageType, -1) |
|
|
|
Content = strings.Replace(Content, "[备注]", args.Memo, -1) |
|
|
|
Content = strings.Replace(Content, "[时间]", args.Times, -1) |
|
|
@@ -57,7 +57,14 @@ func JgPush(args md3.PushParams) { |
|
|
|
//alia := db.DbUserPushForJg.UserPushForJgGetWithDb(args.MasterId, args.Uid) |
|
|
|
var aud = md2.PushAudience{Alias: []string{args.PushAlia}} |
|
|
|
var extras = map[string]interface{}{ |
|
|
|
"extras": "拓展信息", |
|
|
|
"master_id": args.MasterId, |
|
|
|
"uid": args.SendUserNickname, |
|
|
|
"push_type": args.PushType, |
|
|
|
"message_type": args.MessageType, |
|
|
|
"send_user_nickname": args.SendUserNickname, |
|
|
|
"send_user_avatar_url": args.SendUserAvatarUrl, |
|
|
|
"memo": args.Memo, |
|
|
|
"times": args.Times, |
|
|
|
} |
|
|
|
var param = md2.PushParam{ |
|
|
|
Platform: "all", |
|
|
@@ -66,8 +73,10 @@ func JgPush(args md3.PushParams) { |
|
|
|
Content: args.Content, |
|
|
|
Extras: extras, |
|
|
|
} |
|
|
|
send, _, err := jg_push.Send(jgPushAppKey, jgPushAppSecret, param) |
|
|
|
send, res, err := jg_push.Send(jgPushAppKey, jgPushAppSecret, param) |
|
|
|
logger.Logger.Debug("JgPush_log", |
|
|
|
zap.String("send", send), |
|
|
|
zap.String("res", res), |
|
|
|
zap.String("push_alia", args.PushAlia), |
|
|
|
zap.String("title", param.Title), |
|
|
|
zap.String("content", param.Content), |
|
|
|