diff --git a/api/controller/Question.go b/api/controller/Question.go index 2f4f876..929fc4b 100644 --- a/api/controller/Question.go +++ b/api/controller/Question.go @@ -257,17 +257,12 @@ func (r *Question) PutQuestionClickCount(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() {