feat: 新增系统操作日志&其他优化

This commit is contained in:
meilin.huang
2022-07-14 11:39:12 +08:00
parent 1c18a01bf6
commit db554ebdc9
38 changed files with 6783 additions and 1388 deletions

View File

@@ -0,0 +1,25 @@
package entity
import "time"
// 系统操作日志
type Syslog struct {
Id uint64 `json:"id"`
CreateTime time.Time `json:"createTime"`
CreatorId uint64 `json:"creatorId"`
Creator string `json:"creator"`
Type int8 `json:"type"`
Description string `json:"description"`
ReqParam string `json:"reqParam"` // 请求参数
Resp string `json:"resp"` // 响应结构
}
func (a *Syslog) TableName() string {
return "t_sys_log"
}
const (
SyslogTypeNorman int8 = 1 // 正常状态
SyslogTypeError int8 = 2 // 错误状态
)

View File

@@ -0,0 +1,12 @@
package repository
import (
"mayfly-go/internal/sys/domain/entity"
"mayfly-go/pkg/model"
)
type Syslog interface {
GetPageList(condition *entity.Syslog, pageParam *model.PageParam, toEntity interface{}, orderBy ...string) *model.PageResult
Insert(log *entity.Syslog)
}