mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-03-10 03:55:38 +08:00
refactor: 精简base.repo与base.app等
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"mayfly-go/internal/mongo/domain/entity"
|
||||
"mayfly-go/internal/mongo/domain/repository"
|
||||
"mayfly-go/pkg/base"
|
||||
"mayfly-go/pkg/gormx"
|
||||
"mayfly-go/pkg/model"
|
||||
)
|
||||
|
||||
@@ -18,9 +17,9 @@ func newMongoRepo() repository.Mongo {
|
||||
|
||||
// 分页获取数据库信息列表
|
||||
func (d *mongoRepoImpl) GetList(condition *entity.MongoQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
|
||||
qd := gormx.NewQuery(new(entity.Mongo)).
|
||||
qd := model.NewCond().
|
||||
Like("name", condition.Name).
|
||||
Eq("code", condition.Code).
|
||||
In("code", condition.Codes)
|
||||
return gormx.PageQuery(qd, pageParam, toEntity)
|
||||
return d.PageByCond(qd, pageParam, toEntity)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user