|
@@ -12,6 +12,7 @@ import (
|
|
|
"hongze/hongze_yb/models/tables/yb_comment_anonymous_user"
|
|
|
"hongze/hongze_yb/models/tables/yb_community_question"
|
|
|
"hongze/hongze_yb/models/tables/yb_community_question_comment"
|
|
|
+ "hongze/hongze_yb/models/tables/yb_community_video"
|
|
|
"hongze/hongze_yb/services/alarm_msg"
|
|
|
"hongze/hongze_yb/services/company_approval_message"
|
|
|
"hongze/hongze_yb/services/user"
|
|
@@ -413,18 +414,34 @@ func systemMessageToAdmin(adminInfo admin.Admin, wxUser user.UserInfo, community
|
|
|
companyName := companyInfo.CompanyName
|
|
|
remark := `您有新的问答评论待查阅`
|
|
|
content := `您有新的问答评论待查阅`
|
|
|
+ if communityQuestionComment.Source == 2 {
|
|
|
+ remark = `您有新的视频评论待查阅`
|
|
|
+ content = `您有新的视频评论待查阅`
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
- communityQuestion, err := yb_community_question.GetItemById(int(communityQuestionComment.CommunityQuestionID))
|
|
|
- if err != nil {
|
|
|
- err = errors.New("获取评论对应的问答失败,err:" + err.Error())
|
|
|
+
|
|
|
+ msgContent := ``
|
|
|
+ if communityQuestionComment.Source == 1 {
|
|
|
+ communityQuestion, e := yb_community_question.GetItemById(int(communityQuestionComment.CommunityQuestionID))
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("获取评论对应的问答失败,err:" + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ msgContent = communityQuestion.QuestionContent
|
|
|
+ } else {
|
|
|
+ communityVideo, e := yb_community_video.GetItemById(int(communityQuestionComment.CommunityQuestionID))
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("获取评论对应的视频失败,err:" + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ msgContent = communityVideo.Title
|
|
|
}
|
|
|
messageInfo := company_approval_message.MessageInfo{
|
|
|
CompanyName: companyInfo.CompanyName,
|
|
|
ProductId: productId,
|
|
|
CompanyProductStatus: companyProductInfo.Status,
|
|
|
Title: communityQuestionComment.Content,
|
|
|
- Content: communityQuestion.QuestionContent,
|
|
|
+ Content: msgContent,
|
|
|
UserId: wxUser.UserID,
|
|
|
UserName: communityQuestionComment.RealName,
|
|
|
CreateTime: communityQuestionComment.CreateTime,
|