diff --git a/api/service/QuestionQa.go b/api/service/QuestionQa.go index bb7720b..e965939 100644 --- a/api/service/QuestionQa.go +++ b/api/service/QuestionQa.go @@ -484,7 +484,11 @@ func (r *QuestionQaService) PutQuestionQa(qaId int64, req requests.PutQuestionQa if len(questions) < item.Quantity { tx.Rollback() - return false, errors.New("选题超出现有题目数量") + if len(notQuestionIds) > 0 { + return false, errors.New("因不允许重复选题超出现有题目数量") + } else { + return false, errors.New("选题超出现有题目数量") + } } for _, question := range questions {