修改账号注册方法,以及邮箱协议对接

This commit is contained in:
zyj
2025-09-24 18:22:25 +08:00
parent 002419a7ed
commit 81ed379cf3
21 changed files with 1090 additions and 8 deletions

27
services/proxy_service.go Normal file
View File

@@ -0,0 +1,27 @@
package services
import (
"go-account-register/models"
"go-account-register/utils"
"gorm.io/gorm"
)
type ProxyService struct {
db *gorm.DB
}
func InitProxyService() *ProxyService {
db := utils.GetDB()
return &ProxyService{db: db}
}
func (p *ProxyService) GetInfo() *models.Proxy {
var proxy models.Proxy
result := p.db.Model(&models.Proxy{}).Order("RAND()").Limit(1).Find(&proxy)
if result.Error != nil {
return nil
}
return &proxy
}