refactor: 精简base.repo与base.app等

This commit is contained in:
meilin.huang
2024-04-28 23:45:57 +08:00
parent 653953ee76
commit f2c7ef78c0
91 changed files with 758 additions and 957 deletions

View File

@@ -4,7 +4,6 @@ import (
"mayfly-go/internal/sys/domain/entity"
"mayfly-go/internal/sys/domain/repository"
"mayfly-go/pkg/base"
"mayfly-go/pkg/gormx"
"mayfly-go/pkg/model"
)
@@ -17,9 +16,9 @@ func newAccountRepo() repository.Account {
}
func (m *AccountRepoImpl) GetPageList(condition *entity.AccountQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
qd := gormx.NewQuery(new(entity.Account)).
qd := model.NewCond().
Like("name", condition.Name).
Like("username", condition.Username).
In("id", condition.Ids)
return gormx.PageQuery(qd, pageParam, toEntity)
return m.PageByCond(qd, pageParam, toEntity)
}