mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
refactor: 后端路由定义方式&请求参数绑定重构
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user