|
|
@@ -15,6 +15,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.MessageType, -1) |
|
|
|
Content = strings.Replace(Content, "[备注]", args.Memo, -1) |
|
|
|
Content = strings.Replace(Content, "[时间]", args.Times, -1) |
|
|
|
return Content |
|
|
@@ -65,15 +67,15 @@ func JgPush(args md3.PushParams) { |
|
|
|
Extras: extras, |
|
|
|
} |
|
|
|
send, _, err := jg_push.Send(jgPushAppKey, jgPushAppSecret, param) |
|
|
|
logger.Logger.Debug("JgPush", |
|
|
|
logger.Logger.Debug("JgPush_log", |
|
|
|
zap.String("push_alia", args.PushAlia), |
|
|
|
zap.String("title", param.Title), |
|
|
|
zap.String("content", param.Content), |
|
|
|
zap.String("jg_push_app_key", jgPushAppKey), |
|
|
|
zap.String("jg_push_app_secret", jgPushAppSecret), |
|
|
|
zap.String("err", err.Error()), |
|
|
|
) |
|
|
|
if err != nil { |
|
|
|
fmt.Println("send_error::::", err) |
|
|
|
return |
|
|
|
} |
|
|
|
if send == "" { |
|
|
|