feat:完善项目
This commit is contained in:
24
app/event/account.go
Normal file
24
app/event/account.go
Normal file
@ -0,0 +1,24 @@
|
||||
package event
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
|
||||
type AccountUserLoginProduce struct{}
|
||||
|
||||
// Handle 帐号登录事件
|
||||
func (this *AccountUserLoginProduce) Handle(arg ...interface{}) {
|
||||
tenantID := arg[0].(uint64)
|
||||
uid := arg[1].(uint64)
|
||||
equipment := arg[2].(string)
|
||||
ip := arg[3].(string)
|
||||
|
||||
mSysUserLoginLogs := model.NewSysUserLoginLog()
|
||||
mSysUserLoginLogs.TenantID = tenantID
|
||||
mSysUserLoginLogs.UID = uid
|
||||
mSysUserLoginLogs.Equipment = equipment
|
||||
mSysUserLoginLogs.IP = ip
|
||||
_ = model.Create(mSysUserLoginLogs)
|
||||
}
|
||||
|
||||
func NewAccountUserLoginProduce() *AccountUserLoginProduce {
|
||||
return &AccountUserLoginProduce{}
|
||||
}
|
Reference in New Issue
Block a user