前后端一致修复

This commit is contained in:
linwenxiang committed 2021-02-19 16:50:57 +08:00
1 parent a4f8b11925
commit e04b5559bd
19 files changed
+176 -84

No files matched your search

+6 -5
View File
@@ -6,10 +6,11 @@ import (
type SysFileDir struct {
models.Model
Label string `json:"label" gorm:"type:varchar(255);comment:目录名称"` // 目录名称
PId int `json:"pId" gorm:"type:int(11);comment:上级目录"` // 上级目录
Sort string `json:"sort" gorm:"type:bigint(20);comment:排序"` // 排序
Path string `json:"path" gorm:"type:varchar(255);comment:路径"` // 路径
Label string `json:"label" gorm:"type:varchar(255);comment:目录名称"` // 目录名称
PId int `json:"pId" gorm:"type:int(11);comment:上级目录"` // 上级目录
Sort string `json:"sort" gorm:"type:bigint(20);comment:排序"` // 排序
Path string `json:"path" gorm:"type:varchar(255);comment:路径"` // 路径
Children []SysFileDir `json:"children,omitempty" gorm:"-"` // 下级信息
models.ControlBy
models.ModelTime
}
@@ -22,7 +23,7 @@ type SysFileDirL struct {
Path string `json:"path" gorm:"type:varchar(255);comment:路径"` // 路径
models.ControlBy
models.ModelTime
Children []SysFileDirL `json:"children" gorm:"-"` // 下级信息
Children []SysFileDirL `json:"children,omitempty" gorm:"-"` // 下级信息
}
func (SysFileDir) TableName() string { /**/
File renamed without changes.
+1 -1
View File
@@ -106,7 +106,7 @@ func (e *SysContent) Update(id int) (update SysContent, err error) {
//参数1:是要修改的数据
//参数2:是修改的数据
if err = orm.Eloquent.Table(e.TableName()).Model(&update).Updates(&e).Error; err != nil {
if err = orm.Eloquent.Table(e.TableName()).Model(&update).Where("id = ?", id).Updates(&e).Error; err != nil {
return
}
return
+12 -11
View File
@@ -8,18 +8,19 @@ import (
type SysLoginLog struct {
models.Model
Username string `json:"username" gorm:"type:varchar(128);comment:用户名"` //
Status string `json:"status" gorm:"type:varchar(4);comment:状态"` //
Ipaddr string `json:"ipaddr" gorm:"type:varchar(255);comment:ip地址"` //
LoginLocation string `json:"loginLocation" gorm:"type:varchar(255);comment:归属地"` //
Browser string `json:"browser" gorm:"type:varchar(255);comment:浏览器"` //
Os string `json:"os" gorm:"type:varchar(255);comment:系统"` //
Platform string `json:"platform" gorm:"type:varchar(255);comment:固件"` //
LoginTime time.Time `json:"loginTime" gorm:"type:timestamp;comment:登录时间"` //
Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"` //
Msg string `json:"msg" gorm:"type:varchar(255);comment:信息"` //
Username string `json:"username" gorm:"type:varchar(128);comment:用户名"`
Status string `json:"status" gorm:"type:varchar(4);comment:状态"`
Ipaddr string `json:"ipaddr" gorm:"type:varchar(255);comment:ip地址"`
LoginLocation string `json:"loginLocation" gorm:"type:varchar(255);comment:归属地"`
Browser string `json:"browser" gorm:"type:varchar(255);comment:浏览器"`
Os string `json:"os" gorm:"type:varchar(255);comment:系统"`
Platform string `json:"platform" gorm:"type:varchar(255);comment:固件"`
LoginTime time.Time `json:"loginTime" gorm:"type:timestamp;comment:登录时间"`
Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"`
Msg string `json:"msg" gorm:"type:varchar(255);comment:信息"`
CreatedAt time.Time `json:"createdAt" gorm:"comment:创建时间"`
UpdatedAt time.Time `json:"updatedAt" gorm:"comment:最后更新时间"`
models.ControlBy
models.ModelTime
}
func (SysLoginLog) TableName() string {
+20 -19
View File
@@ -8,26 +8,27 @@ import (
type SysOperaLog struct {
models.Model
Title string `json:"title" gorm:"type:varchar(255);comment:操作模块"` //
BusinessType string `json:"businessType" gorm:"type:varchar(128);comment:操作类型"` //
BusinessTypes string `json:"businessTypes" gorm:"type:varchar(128);comment:BusinessTypes"` //
Method string `json:"method" gorm:"type:varchar(128);comment:函数"` //
RequestMethod string `json:"requestMethod" gorm:"type:varchar(128);comment:请求方式"` //
OperatorType string `json:"operatorType" gorm:"type:varchar(128);comment:操作类型"` //
OperName string `json:"operName" gorm:"type:varchar(128);comment:操作者"` //
DeptName string `json:"deptName" gorm:"type:varchar(128);comment:部门名称"` //
OperUrl string `json:"operUrl" gorm:"type:varchar(255);comment:访问地址"` //
OperIp string `json:"operIp" gorm:"type:varchar(128);comment:客户端ip"` //
OperLocation string `json:"operLocation" gorm:"type:varchar(128);comment:访问位置"` //
OperParam string `json:"operParam" gorm:"type:varchar(255);comment:请求参数"` //
Status string `json:"status" gorm:"type:varchar(4);comment:操作状态"` //
OperTime time.Time `json:"operTime" gorm:"type:timestamp;comment:操作时间"` //
JsonResult string `json:"jsonResult" gorm:"type:varchar(255);comment:返回数据"` //
Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"` //
LatencyTime string `json:"latencyTime" gorm:"type:varchar(128);comment:耗时"` //
UserAgent string `json:"userAgent" gorm:"type:varchar(255);comment:ua"` //
Title string `json:"title" gorm:"type:varchar(255);comment:操作模块"`
BusinessType string `json:"businessType" gorm:"type:varchar(128);comment:操作类型"`
BusinessTypes string `json:"businessTypes" gorm:"type:varchar(128);comment:BusinessTypes"`
Method string `json:"method" gorm:"type:varchar(128);comment:函数"`
RequestMethod string `json:"requestMethod" gorm:"type:varchar(128);comment:请求方式"`
OperatorType string `json:"operatorType" gorm:"type:varchar(128);comment:操作类型"`
OperName string `json:"operName" gorm:"type:varchar(128);comment:操作者"`
DeptName string `json:"deptName" gorm:"type:varchar(128);comment:部门名称"`
OperUrl string `json:"operUrl" gorm:"type:varchar(255);comment:访问地址"`
OperIp string `json:"operIp" gorm:"type:varchar(128);comment:客户端ip"`
OperLocation string `json:"operLocation" gorm:"type:varchar(128);comment:访问位置"`
OperParam string `json:"operParam" gorm:"type:varchar(255);comment:请求参数"`
Status string `json:"status" gorm:"type:varchar(4);comment:操作状态"`
OperTime time.Time `json:"operTime" gorm:"type:timestamp;comment:操作时间"`
JsonResult string `json:"jsonResult" gorm:"type:varchar(255);comment:返回数据"`
Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"`
LatencyTime string `json:"latencyTime" gorm:"type:varchar(128);comment:耗时"`
UserAgent string `json:"userAgent" gorm:"type:varchar(255);comment:ua"`
CreatedAt time.Time `json:"createdAt" gorm:"comment:创建时间"`
UpdatedAt time.Time `json:"updatedAt" gorm:"comment:最后更新时间"`
models.ControlBy
models.ModelTime
}
func (SysOperaLog) TableName() string {