Forráskód Böngészése

Merge branch 'mfyx_3.4' of http://8.136.199.33:3000/cxzhang/hongze_mfyx into debug

xingzai 7 hónapja
szülő
commit
8ee0cfd67d

+ 8 - 1
controllers/yanxuan_special_message.go

@@ -85,14 +85,18 @@ func (this *YanxuanSpecialMessageController) MessageAdd() {
 		return
 	}
 
+	var msgText string
 	if parentId == 0 {
+		msgText = "留言成功"
 		go services.SendWxCategoryMsgByYanxuanSpecialMassageByAuthor(content, yanxuanSpecialBySpeciaDetail)
 	} else {
+		msgText = "回复成功"
 		go services.SendWxCategoryMsgByYanxuanSpecialMassage(parentId, int(messageId), content, yanxuanSpecialBySpeciaDetail)
 	}
+
 	br.Ret = 200
 	br.Success = true
-	br.Msg = "留言成功"
+	br.Msg = msgText
 }
 
 // @Title 留言管理列表
@@ -223,6 +227,9 @@ func (this *YanxuanSpecialMessageController) MessageManageList() {
 			item.SourceTitle = v.SourceTitle
 			item.CreateTime = v.CreateTime.Format(utils.FormatDateTime)
 			if len(itemChildMap[v.MessageId]) > 0 {
+				for _, vm := range itemChildMap[v.MessageId] {
+					vm.Headimgurl = mapUserImg[vm.UserId]
+				}
 				item.ChildList = itemChildMap[v.MessageId]
 			} else {
 				item.ChildList = make([]*models.CygxYanxuanSpecialMessageManageChildResp, 0)

+ 0 - 3
services/cygx_activity_video_history.go

@@ -71,9 +71,6 @@ func AddActivityVideoHistory(user *models.WxUserItem, activityId, playSeconds in
 
 // 记录用户活动音频播放记录
 func AddActivityVoiceHistory(user *models.WxUserItem, activityId, playSeconds int, inviteShareCode string) {
-	if playSeconds == 0 {
-		return
-	}
 	key := utils.CYGX_VIDEO_HISTORY_KEY + utils.CYGX_OBJ_ACTIVITYVOICE + strconv.Itoa(activityId) + "_" + strconv.Itoa(user.UserId)
 
 	var err error

+ 2 - 2
services/wx_category_template_msg.go

@@ -1054,7 +1054,7 @@ func SendWxCategoryMsgByYanxuanSpecialMassageByAuthor(content string, yanxuanSpe
 	var mobile string
 	//mobile = utils.WxMsgTemplateIdAskMsgMobilePublic
 	keyword1 = "专栏文章有新的留言"
-	keyword2 = content
+	keyword2 = utils.TruncateActivityNameString(content)
 
 	userInfo, e := models.GetWxUserItemByUserId(yanxuanSpecialBySpeciaDetail.UserId)
 	if e != nil {
@@ -1113,7 +1113,7 @@ func SendWxCategoryMsgByYanxuanSpecialMassage(parentId, messageId int, content s
 	//mobile = utils.WxMsgTemplateIdAskMsgMobilePublic
 	keyword1 = yanxuanSpecialBySpeciaDetail.Title
 	keyword2 = "作者回复了您的留言"
-	keyword3 = content
+	keyword3 = utils.TruncateActivityNameString(content)
 	keyword4 = time.Now().Format(utils.FormatDateTimeMinute2)
 	if utils.RunMode == "release" {
 		redirectUrl = utils.WX_MSG_PATH_YX_SPECIAL_MASSAGE_DETAIL + strconv.Itoa(messageId)