mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-16 04:36:35 +08:00
refactor: 后端路由定义方式&请求参数绑定重构
This commit is contained in:
@@ -19,7 +19,7 @@ func (r *redisRepoImpl) GetRedisList(condition *entity.RedisQuery, pageParam *mo
|
||||
qd := gormx.NewQuery(new(entity.Redis)).
|
||||
Like("host", condition.Host).
|
||||
In("tag_id", condition.TagIds).
|
||||
RLike("tag_path", condition.TagPathLike).
|
||||
RLike("tag_path", condition.TagPath).
|
||||
OrderByAsc("tag_path")
|
||||
return gormx.PageQuery(qd, pageParam, toEntity)
|
||||
}
|
||||
@@ -29,9 +29,6 @@ func (r *redisRepoImpl) Count(condition *entity.RedisQuery) int64 {
|
||||
if len(condition.TagIds) > 0 {
|
||||
where["tag_id"] = condition.TagIds
|
||||
}
|
||||
if condition.TagId != 0 {
|
||||
where["tag_id"] = condition.TagId
|
||||
}
|
||||
|
||||
return gormx.CountByCond(new(entity.Redis), where)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user