Skip to content

Commit 70948f9

Browse files
committed
feat: 增加文本搜索条件
1 parent 9956dc2 commit 70948f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/controller/sentence/sentence_v1_list.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ func (c *ControllerV1) List(ctx context.Context, req *v1.ListReq) (res *v1.ListR
2424
)
2525
if len(req.TagIds) > 0 {
2626
data, total, err = c.listByTagIds(ctx, req)
27-
} else {
27+
} else if req.BookId > 0 {
2828
data, total, err = c.listByBookId(ctx, req)
29+
} else {
30+
data, total, err = c.listBySearch(ctx, req)
2931
}
3032

3133
if err != nil {

0 commit comments

Comments
 (0)