update search question and answer

This commit is contained in:
hgaol
2023-12-18 17:27:21 +08:00
committed by kumfo
parent c0a231ede3
commit fd75d2f50d
+8 -2
View File
@@ -276,7 +276,10 @@ func (sr *searchRepo) SearchQuestions(ctx context.Context, words []string, tagID
ast + ".tag_id": tagID,
ast + ".status": entity.TagRelStatusAvailable,
})
args = append(args, entity.TagRelStatusAvailable, tagID)
args = append(args, entity.TagRelStatusAvailable)
for _, t := range tagID {
args = append(args, t)
}
}
// check need filter has not accepted
@@ -385,7 +388,10 @@ func (sr *searchRepo) SearchAnswers(ctx context.Context, words []string, tagIDs
ast + ".tag_id": tagID,
ast + ".status": entity.TagRelStatusAvailable,
})
args = append(args, entity.TagRelStatusAvailable, tagID)
args = append(args, entity.TagRelStatusAvailable)
for _, t := range tagID {
args = append(args, t)
}
}
// check limit accepted