diff --git a/api/dao/QuestionQa.go b/api/dao/QuestionQa.go index 7eb2687..00b7a22 100644 --- a/api/dao/QuestionQa.go +++ b/api/dao/QuestionQa.go @@ -231,7 +231,9 @@ func (r *QuestionQaDao) GetQuestionQaListSearch(req requests.GetQuestionQaList) } // 类型 - query = query.Where("qa_type = ?", req.QaType) + //query = query.Where("qa_type = ?", req.QaType) + + query = query.Where("qa_type IN ?", []string{"1", "2", "3"}) // 状态 if req.QaStatus != nil { diff --git a/api/requests/QuestionQa.go b/api/requests/QuestionQa.go index 9d0c602..fab1d33 100644 --- a/api/requests/QuestionQa.go +++ b/api/requests/QuestionQa.go @@ -29,8 +29,8 @@ type GetQuestionQaPage struct { // GetQuestionQaList 获取问答题库列表 type GetQuestionQaList struct { QaName string `json:"qa_name" form:"qa_name" label:"名称"` - QaType int `json:"qa_type" form:"qa_type" label:"题库类型" validate:"required,oneof=1 2 3"` // (1:常规模式 2:固定套题模式 3:多轮固定题型模式) - QaStatus *int `json:"qa_status" form:"qa_status" label:"状态"` // (1:正常 2:过期) + QaType int `json:"qa_type" form:"qa_type" label:"题库类型"` // (1:常规模式 2:固定套题模式 3:多轮固定题型模式) + QaStatus *int `json:"qa_status" form:"qa_status" label:"状态"` // (1:正常 2:过期) QaRuleContent string `json:"qa_rule_content" form:"qa_rule_content" label:"规则解释"` QaDisplayType *int `json:"qa_display_type" form:"qa_display_type" label:"展示类型"` // (1:常规 2:飞花令) QaExpireTime string `json:"qa_expire_time" form:"qa_expire_time" label:"过期时间"` // 注意:这里假设LocalTime转换为字符串格式处理