JM-WechatMini/service/app/oauth2_client.go
2023-11-02 04:34:46 +08:00

19 lines
387 B
Go

package app
import (
"miniapp/global"
"miniapp/model/app"
)
type Oauth2ClientService struct{}
// FinAll 查询所有客户端
func (o *Oauth2ClientService) FinAll(clients *[]app.OAuth2Client) error {
return global.GVA_DB.Find(&clients).Error
}
// FindOne 查询某一个
func (o *Oauth2ClientService) FindOne(c *app.OAuth2Client) error {
return global.GVA_DB.Take(&c, c).Error
}