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

@@ -20,7 +20,7 @@ func (d *dbRepoImpl) GetDbList(condition *entity.DbQuery, pageParam *model.PageP
Like("host", condition.Host).
Like("database", condition.Database).
In("tag_id", condition.TagIds).
RLike("tag_path", condition.TagPathLike).
RLike("tag_path", condition.TagPath).
OrderByAsc("tag_path")
return gormx.PageQuery(qd, pageParam, toEntity)
}
@@ -30,9 +30,6 @@ func (d *dbRepoImpl) Count(condition *entity.DbQuery) 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.Db), where)
}