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