refactor: 后端路由定义方式&请求参数绑定重构

This commit is contained in:
meilin.huang
2023-07-08 20:05:55 +08:00
parent 183a6e4905
commit 3269dfa5d6
59 changed files with 559 additions and 1020 deletions

View File

@@ -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)
}