feat:完善项目信息
This commit is contained in:
@ -2,14 +2,15 @@ package controller
|
||||
|
||||
import (
|
||||
"SciencesServer/app/api/admin/model"
|
||||
"SciencesServer/app/basic/controller"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/app/session"
|
||||
"SciencesServer/tools/ip"
|
||||
)
|
||||
|
||||
type Log struct{ *Platform }
|
||||
type Log struct{ *session.Admin }
|
||||
|
||||
type LogHandle func(session *service.Session) *Log
|
||||
type LogHandle func(session *session.Admin) *Log
|
||||
|
||||
type (
|
||||
// LogForLogin 登录日志
|
||||
@ -20,7 +21,7 @@ type (
|
||||
)
|
||||
|
||||
// Login 登录日志
|
||||
func (c *Log) Login(name string, page, pageSize int) (*ReturnPages, error) {
|
||||
func (c *Log) Login(name string, page, pageSize int) (*controller.ReturnPages, error) {
|
||||
mSysUserLoginLogs := model.NewSysUserLoginLog()
|
||||
|
||||
where := make([]*model2.ModelWhere, 0)
|
||||
@ -47,11 +48,11 @@ func (c *Log) Login(name string, page, pageSize int) (*ReturnPages, error) {
|
||||
SysUserLoginLogInfo: v, IPAddress: string(ipAddress),
|
||||
})
|
||||
}
|
||||
return &ReturnPages{Data: list, Count: count}, nil
|
||||
return &controller.ReturnPages{Data: list, Count: count}, nil
|
||||
}
|
||||
|
||||
func NewLog() LogHandle {
|
||||
return func(session *service.Session) *Log {
|
||||
return &Log{Platform: &Platform{Session: session}}
|
||||
return func(session *session.Admin) *Log {
|
||||
return &Log{Admin: session}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user