|
@@ -204,9 +204,18 @@ func afterDeleteComment(communityQuestionComment *yb_community_question_comment.
|
|
|
go alarm_msg.SendAlarmMsg("问答评论信息删除后,标记站内消息失败"+time.Now().Format(utils.FormatDateTime)+";Err:"+err.Error(), 3)
|
|
|
}
|
|
|
}()
|
|
|
- sourceType := services.CompanyApprovalMessageSourceTypeByQuestionComment
|
|
|
- if communityQuestionComment.Source == 2 {
|
|
|
+
|
|
|
+ sourceType := 0
|
|
|
+ switch communityQuestionComment.Source {
|
|
|
+ case 1:
|
|
|
+ sourceType = services.CompanyApprovalMessageSourceTypeByQuestionComment
|
|
|
+ case 2:
|
|
|
sourceType = services.CompanyApprovalMessageSourceTypeByVideoComment
|
|
|
+ case 3:
|
|
|
+ sourceType = services.CompanyApprovalMessageSourceTypeByRoadVideoComment
|
|
|
+ default:
|
|
|
+ err = errors.New("sourceType有误")
|
|
|
+ return
|
|
|
}
|
|
|
err = company_approval_message.CancelCompanyApprovalMessage(int(communityQuestionComment.CommunityQuestionCommentId), sourceType)
|
|
|
return
|