@@ -109,6 +109,14 @@ func (c *QuestionController) Add() {
br.IsSendEmail = false
return
}
+ obj := rag.Question{}
+ _, err = obj.GetByCondition(` AND question_content = ? `, []interface{}{req.Content})
+ if err == nil {
+ br.Msg = "问题已入库,请不要重复添加"
+ br.IsSendEmail = false
+ return
+ }
+
item := &rag.Question{
QuestionId: 0,
QuestionContent: req.Content,