mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-25 09:06:34 +08:00
refactor: 后端路由定义方式&请求参数绑定重构
This commit is contained in:
@@ -19,7 +19,7 @@ func (d *mongoRepoImpl) GetList(condition *entity.MongoQuery, pageParam *model.P
|
||||
qd := gormx.NewQuery(new(entity.Mongo)).
|
||||
Like("name", condition.Name).
|
||||
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 (d *mongoRepoImpl) Count(condition *entity.MongoQuery) 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.Mongo), where)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user