增加了题库不允许重复的业务逻辑14
This commit is contained in:
parent
6e662c0cb0
commit
c292fe4d33
@ -378,18 +378,20 @@ func (r *QuestionQaService) PutQuestionQa(qaId int64, req requests.PutQuestionQa
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 是否允许重复
|
// 是否允许重复
|
||||||
if len(req.RepeatQaId) > 0 {
|
if req.Action == 2 {
|
||||||
var repeatQaId []string
|
if len(req.RepeatQaId) > 0 {
|
||||||
for _, item := range req.RepeatQaId {
|
var repeatQaId []string
|
||||||
repeatQaId = append(repeatQaId, item.QaId)
|
for _, item := range req.RepeatQaId {
|
||||||
}
|
repeatQaId = append(repeatQaId, item.QaId)
|
||||||
|
}
|
||||||
|
|
||||||
repeatQaIdStr := strings.Join(repeatQaId, ",")
|
repeatQaIdStr := strings.Join(repeatQaId, ",")
|
||||||
if repeatQaIdStr != questionQa.RepeatQaId {
|
if repeatQaIdStr != questionQa.RepeatQaId {
|
||||||
questionQaData["repeat_qa_id"] = repeatQaIdStr
|
questionQaData["repeat_qa_id"] = repeatQaIdStr
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
questionQaData["repeat_qa_id"] = ""
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
questionQaData["repeat_qa_id"] = ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 背景图
|
// 背景图
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user