refactor: 将分布式锁从 redis 迁移至 utils 包
This commit is contained in:
@@ -82,7 +82,7 @@ func (d *category) List(ctx context.Context, req *dto.ListCategoryReq, fields ..
|
||||
|
||||
// buildListFilter 构建列表查询的过滤条件
|
||||
func (d *category) buildListFilter(ctx context.Context, req *dto.ListCategoryReq) *gdb.Model {
|
||||
model := gfdb.DB(ctx).Model(ctx, public.CategoryCollection).Model
|
||||
model := gfdb.DB(ctx).Model(ctx, public.CategoryCollection).Cache(ctx)
|
||||
if !g.IsEmpty(req.Keyword) {
|
||||
model.WhereLike(entity.CategoryCol.Name, "%"+req.Keyword+"%")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user