refactor: 将分布式锁从 redis 迁移至 utils 包

This commit is contained in:
2026-03-27 09:49:44 +08:00
parent 018d60469a
commit b9ed1b2492
4 changed files with 7 additions and 8 deletions

View File

@@ -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+"%")
}