1
This commit is contained in:
+4
-4
@@ -155,12 +155,12 @@ func (r *QuestionDao) GetQuestionPageSearch(req requests.GetQuestionPage, page,
|
||||
query = query.Where("question_source = ?", req.QuestionSource)
|
||||
|
||||
// 一级标签id
|
||||
if req.FirstLabelId != nil {
|
||||
if req.FirstLabelId != "" {
|
||||
query = query.Where("first_label_id = ?", req.FirstLabelId)
|
||||
}
|
||||
|
||||
// 二级标签id
|
||||
if req.SecondLabelId != nil {
|
||||
if req.SecondLabelId != "" {
|
||||
query = query.Where("second_label_id = ?", req.SecondLabelId)
|
||||
}
|
||||
|
||||
@@ -242,12 +242,12 @@ func (r *QuestionDao) GetQuestionCountSearch(req requests.GetQuestionCount) (tot
|
||||
}
|
||||
|
||||
// 一级标签id
|
||||
if req.FirstLabelId != nil {
|
||||
if req.FirstLabelId != "" {
|
||||
query = query.Where("first_label_id = ?", req.FirstLabelId)
|
||||
}
|
||||
|
||||
// 二级标签id
|
||||
if req.SecondLabelId != nil {
|
||||
if req.SecondLabelId != "" {
|
||||
query = query.Where("second_label_id = ?", req.SecondLabelId)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user