新增题目时,增加来源验重

This commit is contained in:
wucongxing8150 2024-11-20 08:36:59 +08:00
parent def0c5b41f
commit 9ae630f70d

View File

@ -109,6 +109,7 @@ func (r *QuestionService) AddQuestion(req requests.AddQuestion) (bool, error) {
maps := make(map[string]interface{}) maps := make(map[string]interface{})
maps["question_name"] = req.QuestionName maps["question_name"] = req.QuestionName
maps["question_source"] = req.QuestionSource
question, _ := questionDao.GetQuestion(maps) question, _ := questionDao.GetQuestion(maps)
if question != nil { if question != nil {
return false, errors.New("题目名称重复") return false, errors.New("题目名称重复")