增加了题库不允许重复的业务逻辑11
This commit is contained in:
parent
4a9760019f
commit
ecc7c52314
@ -484,8 +484,12 @@ func (r *QuestionQaService) PutQuestionQa(qaId int64, req requests.PutQuestionQa
|
||||
|
||||
if len(questions) < item.Quantity {
|
||||
tx.Rollback()
|
||||
if len(notQuestionIds) > 0 {
|
||||
return false, errors.New("因不允许重复选题超出现有题目数量")
|
||||
} else {
|
||||
return false, errors.New("选题超出现有题目数量")
|
||||
}
|
||||
}
|
||||
|
||||
for _, question := range questions {
|
||||
questionQaItem := &model.QuestionQaItem{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user