新增题目时,增加来源验重
This commit is contained in:
parent
def0c5b41f
commit
9ae630f70d
@ -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("题目名称重复")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user