Update loginlog.go
This commit is contained in:
1 parent
be66509acd
commit
fb6f5c3585
1 file changed
+1
-2
+1
-2
@@ -3,7 +3,6 @@ package models
|
|||||||
import (
|
import (
|
||||||
orm "go-admin/database"
|
orm "go-admin/database"
|
||||||
"go-admin/utils"
|
"go-admin/utils"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type LoginLog struct {
|
type LoginLog struct {
|
||||||
@@ -100,7 +99,7 @@ func (e *LoginLog) Create() (LoginLog, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *LoginLog) Update(id int64) (update LoginLog, err error) {
|
func (e *LoginLog) Update(id int64) (update LoginLog, err error) {
|
||||||
e.UpdateTime = time.Now().String()
|
e.UpdateTime = utils.GetCurrntTime()
|
||||||
|
|
||||||
if err = orm.Eloquent.Table("sys_loginlog").First(&update, id).Error; err != nil {
|
if err = orm.Eloquent.Table("sys_loginlog").First(&update, id).Error; err != nil {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in new issue
Block a user