44
This commit is contained in:
parent
8ec3b65494
commit
8d418d567a
@ -179,7 +179,7 @@ func (r *QuestionQaItemDao) GetQuestionQaItemPageSearch(req requests.GetQuestion
|
||||
}
|
||||
|
||||
// 一级标签id
|
||||
if req.FirstLabelId != nil {
|
||||
if req.FirstLabelId != "" {
|
||||
subQuery := global.Db.Model(&model.Question{}).
|
||||
Select("question_id").
|
||||
Where("first_label_id = ?", req.FirstLabelId)
|
||||
@ -188,7 +188,7 @@ func (r *QuestionQaItemDao) GetQuestionQaItemPageSearch(req requests.GetQuestion
|
||||
}
|
||||
|
||||
// 二级标签id
|
||||
if req.SecondLabelId != nil {
|
||||
if req.SecondLabelId != "" {
|
||||
subQuery := global.Db.Model(&model.Question{}).
|
||||
Select("question_id").
|
||||
Where("second_label_id = ?", req.SecondLabelId)
|
||||
|
||||
@ -17,8 +17,8 @@ type GetQuestionQaItemPage struct {
|
||||
QuestionType *int `json:"question_type" form:"question_type" validate:"omitempty,oneof=1 2 3 4" label:"题目类型"` // 题目类型(1:单选 2:多选 3:问答 4:判断)
|
||||
QuestionSource *int `json:"question_source" form:"question_source" validate:"omitempty,oneof=1 2" label:"题目来源"` // 题目来源(1:本题库 2:外部数据)
|
||||
Difficulty *int `json:"difficulty" form:"difficulty" label:"难度"`
|
||||
FirstLabelId *string `json:"first_label_id" form:"first_label_id" label:"一级标签id"`
|
||||
SecondLabelId *string `json:"second_label_id" form:"second_label_id" label:"二级标签id"`
|
||||
FirstLabelId string `json:"first_label_id" form:"first_label_id" label:"一级标签id"`
|
||||
SecondLabelId string `json:"second_label_id" form:"second_label_id" label:"二级标签id"`
|
||||
Order *GetQuestionQaItemPageOrder `json:"order" form:"order" label:"排序"`
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user