mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 07:50:25 +08:00
30 lines
743 B
Go
30 lines
743 B
Go
package application
|
|
|
|
import (
|
|
"mayfly-go/internal/sys/domain/entity"
|
|
"mayfly-go/internal/sys/domain/repository"
|
|
)
|
|
|
|
type Auth interface {
|
|
GetOAuthAccount(condition *entity.OAuthAccount, cols ...string) error
|
|
BindOAuthAccount(e *entity.OAuthAccount) error
|
|
}
|
|
|
|
func newAuthApp(oauthAccountRepo repository.OAuthAccount) Auth {
|
|
return &authAppImpl{
|
|
oauthAccountRepo: oauthAccountRepo,
|
|
}
|
|
}
|
|
|
|
type authAppImpl struct {
|
|
oauthAccountRepo repository.OAuthAccount
|
|
}
|
|
|
|
func (a *authAppImpl) GetOAuthAccount(condition *entity.OAuthAccount, cols ...string) error {
|
|
return a.oauthAccountRepo.GetOAuthAccount(condition, cols...)
|
|
}
|
|
|
|
func (a *authAppImpl) BindOAuthAccount(e *entity.OAuthAccount) error {
|
|
return a.oauthAccountRepo.SaveOAuthAccount(e)
|
|
}
|