Эх сурвалжийг харах

Merge branch 'yb/8.2' into debug

hsun 2 жил өмнө
parent
commit
89cd9c307e

+ 6 - 1
logic/yb_community_question/yb_community_question_comment.go

@@ -391,7 +391,12 @@ func systemMessageToAdmin(adminInfo admin.Admin, wxUser user.UserInfo, community
 
 	var msgType, sourceType, approvalStatus int8
 	msgType = company_approval_message.CompanyApprovalMessageMessageTypeByApply
-	sourceType = company_approval_message.CompanyApprovalMessageSourceTypeByQuestionComment
+	// 消息来源: 6-问答社区; 7-视频社区
+	if communityQuestionComment.Source == 1 {
+		sourceType = company_approval_message.CompanyApprovalMessageSourceTypeByQuestionComment
+	} else {
+		sourceType = company_approval_message.CompanyApprovalMessageSourceTypeByVideoComment
+	}
 	approvalStatus = company_approval_message.CompanyApprovalMessageApprovalStatusByPending
 
 	companyInfo, err := company.GetByCompanyId(wxUser.CompanyID)

+ 2 - 2
logic/yb_community_question/yb_community_question_like_tease.go

@@ -71,12 +71,12 @@ func SetLikeOrTease(userId uint64, communityQuestionId uint32, opType, enable, s
 		}
 	}
 	//查询总的点赞数
-	likeNum, err = yb_community_question_like_tease.GetLikeNumByCommunityQuestionId(communityQuestionId, yb_community_question_like_tease.SourceQuestion)
+	likeNum, err = yb_community_question_like_tease.GetLikeNumByCommunityQuestionId(communityQuestionId, int(source))
 	if err != nil {
 		errMsg = err.Error()
 		err = errors.New("查询点赞数出错")
 	}
-	teaseNum, err = yb_community_question_like_tease.GetTeaseNumByCommunityQuestionId(communityQuestionId, yb_community_question_like_tease.SourceQuestion)
+	teaseNum, err = yb_community_question_like_tease.GetTeaseNumByCommunityQuestionId(communityQuestionId, int(source))
 	if err != nil {
 		errMsg = err.Error()
 		err = errors.New("查询吐槽数出错")

+ 2 - 1
services/company_approval_message/company_approval_message.go

@@ -6,7 +6,7 @@ import (
 	"time"
 )
 
-//消息来源类型,1:客户,2:合同,3:用印,4:指标替换,5:问答社区,6:问答评论
+//消息来源类型,1:客户,2:合同,3:用印,4:指标替换,5:问答社区,6:问答评论,7:视频评论
 const (
 	CompanyApprovalMessageSourceTypeByCompany         = 1
 	CompanyApprovalMessageSourceTypeByContract        = 2
@@ -14,6 +14,7 @@ const (
 	CompanyApprovalMessageSourceTypeByEdbInfo         = 4
 	CompanyApprovalMessageSourceTypeByQuestion        = 5
 	CompanyApprovalMessageSourceTypeByQuestionComment = 6
+	CompanyApprovalMessageSourceTypeByVideoComment    = 7
 )
 
 // 1:申请消息,2:审批结果,3:消息通知