hsun 2 年之前
父節點
當前提交
96a252b2a0
共有 1 個文件被更改,包括 11 次插入2 次删除
  1. 11 2
      services/yb/community_question_comment.go

+ 11 - 2
services/yb/community_question_comment.go

@@ -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