瀏覽代碼

fix: 删除评论后续

hsun 2 年之前
父節點
當前提交
6281e2f33a
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      logic/yb_community_question/yb_community_question_comment.go

+ 5 - 1
logic/yb_community_question/yb_community_question_comment.go

@@ -463,6 +463,10 @@ func afterDelete(communityQuestionComment *yb_community_question_comment.YbCommu
 			go alarm_msg.SendAlarmMsg("问答评论信息删除后,标记站内消息失败"+time.Now().Format("2006-01-02 15:04:05")+";Err:"+err.Error(), 3)
 		}
 	}()
-	err = company_approval_message.CancelCompanyApprovalMessage(int(communityQuestionComment.CommunityQuestionCommentID), company_approval_message.CompanyApprovalMessageSourceTypeByQuestionComment)
+	sourceType := company_approval_message.CompanyApprovalMessageSourceTypeByQuestionComment
+	if communityQuestionComment.Source == 2 {
+		sourceType = company_approval_message.CompanyApprovalMessageSourceTypeByVideoComment
+	}
+	err = company_approval_message.CancelCompanyApprovalMessage(int(communityQuestionComment.CommunityQuestionCommentID), int8(sourceType))
 	return
 }