2022-07-14 11:39:12 +08:00
|
|
|
package api
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"mayfly-go/internal/sys/application"
|
|
|
|
|
"mayfly-go/internal/sys/domain/entity"
|
2023-10-26 17:15:49 +08:00
|
|
|
"mayfly-go/pkg/biz"
|
2022-07-14 11:39:12 +08:00
|
|
|
"mayfly-go/pkg/ginx"
|
2023-01-14 16:29:52 +08:00
|
|
|
"mayfly-go/pkg/req"
|
2022-07-14 11:39:12 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Syslog struct {
|
2024-01-21 22:52:20 +08:00
|
|
|
SyslogApp application.Syslog `inject:""`
|
2022-07-14 11:39:12 +08:00
|
|
|
}
|
|
|
|
|
|
2023-01-14 16:29:52 +08:00
|
|
|
func (r *Syslog) Syslogs(rc *req.Ctx) {
|
2023-07-08 20:05:55 +08:00
|
|
|
queryCond, page := ginx.BindQueryAndPage[*entity.SysLogQuery](rc.GinCtx, new(entity.SysLogQuery))
|
2023-10-26 17:15:49 +08:00
|
|
|
res, err := r.SyslogApp.GetPageList(queryCond, page, new([]entity.SysLog), "create_time DESC")
|
|
|
|
|
biz.ErrIsNil(err)
|
|
|
|
|
rc.ResData = res
|
2022-07-14 11:39:12 +08:00
|
|
|
}
|