增加了题库不允许重复的业务逻辑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 {
|
||||
var repeatQaId []string
|
||||
for _, item := range req.RepeatQaId {
|
||||
repeatQaId = append(repeatQaId, item.QaId)
|
||||
}
|
||||
if req.Action == 2 {
|
||||
if len(req.RepeatQaId) > 0 {
|
||||
var repeatQaId []string
|
||||
for _, item := range req.RepeatQaId {
|
||||
repeatQaId = append(repeatQaId, item.QaId)
|
||||
}
|
||||
|
||||
repeatQaIdStr := strings.Join(repeatQaId, ",")
|
||||
if repeatQaIdStr != questionQa.RepeatQaId {
|
||||
questionQaData["repeat_qa_id"] = repeatQaIdStr
|
||||
repeatQaIdStr := strings.Join(repeatQaId, ",")
|
||||
if repeatQaIdStr != questionQa.RepeatQaId {
|
||||
questionQaData["repeat_qa_id"] = repeatQaIdStr
|
||||
}
|
||||
} else {
|
||||
questionQaData["repeat_qa_id"] = ""
|
||||
}
|
||||
} else {
|
||||
questionQaData["repeat_qa_id"] = ""
|
||||
}
|
||||
|
||||
// 背景图
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user