mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-08 08:50:25 +08:00
feat: 新增简易版ioc
This commit is contained in:
@@ -19,16 +19,15 @@ type AuthCert interface {
|
||||
GetByIds(ids ...uint64) []*entity.AuthCert
|
||||
}
|
||||
|
||||
func newAuthCertApp(authCertRepo repository.AuthCert) AuthCert {
|
||||
return &authCertAppImpl{
|
||||
base.AppImpl[*entity.AuthCert, repository.AuthCert]{Repo: authCertRepo},
|
||||
}
|
||||
}
|
||||
|
||||
type authCertAppImpl struct {
|
||||
base.AppImpl[*entity.AuthCert, repository.AuthCert]
|
||||
}
|
||||
|
||||
// 注入AuthCertRepo
|
||||
func (a *authCertAppImpl) InjectAuthCertRepo(repo repository.AuthCert) {
|
||||
a.Repo = repo
|
||||
}
|
||||
|
||||
func (a *authCertAppImpl) GetPageList(condition *entity.AuthCertQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
|
||||
return a.GetRepo().GetPageList(condition, pageParam, toEntity)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user