增加了题库不允许重复的业务逻辑9
This commit is contained in:
parent
0f8550d9f9
commit
840fd493c0
@ -98,6 +98,16 @@ func (r *QuestionQaService) AddQuestionQa(req requests.AddQuestionQa) (bool, err
|
|||||||
ItemContent: string(questionQaItemContent),
|
ItemContent: string(questionQaItemContent),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(req.RepeatQaId) > 0 {
|
||||||
|
var repeatQaId []string
|
||||||
|
for _, item := range req.RepeatQaId {
|
||||||
|
repeatQaId = append(repeatQaId, item.QaId)
|
||||||
|
}
|
||||||
|
|
||||||
|
repeatQaIdStr := strings.Join(repeatQaId, ",")
|
||||||
|
questionQa.RepeatQaId = repeatQaIdStr
|
||||||
|
}
|
||||||
|
|
||||||
// 固定套题模式-飞花令数量
|
// 固定套题模式-飞花令数量
|
||||||
if req.QaType == 2 {
|
if req.QaType == 2 {
|
||||||
questionQa.TokenNum = req.TokenNum
|
questionQa.TokenNum = req.TokenNum
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user