mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
feat: 新增系统操作日志&其他优化
This commit is contained in:
21
server/internal/sys/api/syslog.go
Normal file
21
server/internal/sys/api/syslog.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/sys/application"
|
||||
"mayfly-go/internal/sys/domain/entity"
|
||||
"mayfly-go/pkg/ctx"
|
||||
"mayfly-go/pkg/ginx"
|
||||
)
|
||||
|
||||
type Syslog struct {
|
||||
SyslogApp application.Syslog
|
||||
}
|
||||
|
||||
func (r *Syslog) Syslogs(rc *ctx.ReqCtx) {
|
||||
g := rc.GinCtx
|
||||
condition := &entity.Syslog{
|
||||
Type: int8(ginx.QueryInt(g, "type", 0)),
|
||||
CreatorId: uint64(ginx.QueryInt(g, "creatorId", 0)),
|
||||
}
|
||||
rc.ResData = r.SyslogApp.GetPageList(condition, ginx.GetPageParam(g), new([]entity.Syslog), "create_time DESC")
|
||||
}
|
||||
Reference in New Issue
Block a user