7777
This commit is contained in:
parent
a18559a0ee
commit
715a585147
@ -305,17 +305,12 @@ func (r *Question) PutQuestionSubmitCount(c *gin.Context) {
|
|||||||
|
|
||||||
// 获取题目数据
|
// 获取题目数据
|
||||||
questionDao := dao.QuestionDao{}
|
questionDao := dao.QuestionDao{}
|
||||||
question, err := questionDao.GetQuestionById(questionId)
|
_, err = questionDao.GetQuestionById(questionId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
responses.FailWithMessage("题目错误", c)
|
responses.FailWithMessage("题目错误", c)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if question.QuestionStatus != 1 {
|
|
||||||
responses.FailWithMessage("题目错误", c)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 开始事务
|
// 开始事务
|
||||||
tx := global.Db.Begin()
|
tx := global.Db.Begin()
|
||||||
defer func() {
|
defer func() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user