Browse Source

Merge branch 'dev/v1.2.7_dx' of moapp/MessageCenter into feature/v1.2.7

duxin 1 year ago
parent
commit
293f7b1933
1 changed files with 5 additions and 4 deletions
  1. 5 4
      rpc/internal/logic/appletterpushlogic.go

+ 5 - 4
rpc/internal/logic/appletterpushlogic.go

@@ -62,14 +62,15 @@ func (l *AppLetterPushLogic) AppLetterPush(in *message.WxTmplMsgRequest) (*messa
 				userData = *rData
 			}
 		}
-		AppPushMsg(userData, pushConfig.Switch, in.Url, in.Title)
+
+		AppPushMsg(userData, pushConfig.Switch, in.Url, in.Title, in.Detail)
 	}
 	return &message.SendMsgResponse{
 		Total: 1,
 	}, nil
 }
 
-func AppPushMsg(userInfo map[string]interface{}, stm, appPushUrl, title string) {
+func AppPushMsg(userInfo map[string]interface{}, stm, appPushUrl, title, detail string) {
 	userId := mongodb.BsonIdToSId(userInfo["_id"])
 	if pushSetMap := qutil.ObjToMap(userInfo["o_pushset"]); pushSetMap != nil && len(*pushSetMap) > 0 {
 		if pushKeyMap := qutil.ObjToMap((*pushSetMap)[stm]); pushKeyMap != nil && len(*pushKeyMap) > 0 {
@@ -85,8 +86,8 @@ func AppPushMsg(userInfo map[string]interface{}, stm, appPushUrl, title string)
 				dt := map[string]interface{}{
 					"receiveUserId": userId,
 					"receiveName":   name,
-					"title":         "剑鱼标讯",
-					"content":       fmt.Sprintf("您收到一条来自%s私信", title),
+					"title":         title,
+					"content":       detail,
 					"msgType":       "messagecenter",
 					"link":          appPushUrl,
 					"appid":         "10000",