修改账号注册方法,以及邮箱协议对接
This commit is contained in:
28
services/browser_instance_service.go
Normal file
28
services/browser_instance_service.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
"go-account-register/models"
|
||||
"go-account-register/utils"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type BrowserInstanceService struct {
|
||||
db *gorm.DB
|
||||
}
|
||||
|
||||
func InitBrowserInstanceService() *BrowserInstanceService {
|
||||
db := utils.GetDB()
|
||||
|
||||
return &BrowserInstanceService{db: db}
|
||||
}
|
||||
|
||||
func (b *BrowserInstanceService) Create(params *models.BrowserInstance) {
|
||||
b.db.Create(params)
|
||||
}
|
||||
|
||||
func (b *BrowserInstanceService) Update(browserId string, params *models.BrowserInstance) {
|
||||
params.UpdateTime = time.Now().Unix()
|
||||
b.db.Model(&models.BrowserInstance{}).Updates(params)
|
||||
}
|
||||
Reference in New Issue
Block a user