fix: search all contents haven't result

This commit is contained in:
kumfo 2022-11-30 18:25:31 +08:00
parent a331cad4bf
commit 04062afeac
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ func (sr *searchRepo) SearchContents(ctx context.Context, words []string, tagIDs
if err != nil {
return
}
sql := fmt.Sprintf("(%s UNION ALL %s)", ubSQL, bSQL)
sql := fmt.Sprintf("(%s UNION ALL %s)", bSQL, ubSQL)
countSQL, _, err := builder.MySQL().Select("count(*) total").From(sql, "c").ToSQL()
if err != nil {