From 715a585147d184d1a53646c951abe979940aa0a4 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Thu, 19 Sep 2024 15:11:30 +0800 Subject: [PATCH] 7777 --- api/controller/Question.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/api/controller/Question.go b/api/controller/Question.go index 929fc4b..9f5a299 100644 --- a/api/controller/Question.go +++ b/api/controller/Question.go @@ -305,17 +305,12 @@ func (r *Question) PutQuestionSubmitCount(c *gin.Context) { // 获取题目数据 questionDao := dao.QuestionDao{} - question, err := questionDao.GetQuestionById(questionId) + _, err = questionDao.GetQuestionById(questionId) if err != nil { responses.FailWithMessage("题目错误", c) return } - if question.QuestionStatus != 1 { - responses.FailWithMessage("题目错误", c) - return - } - // 开始事务 tx := global.Db.Begin() defer func() {