fix🐛 资源管理去掉排序字段

This commit is contained in:
wenjianzhang
2020-11-14 22:12:15 +08:00
parent 5714ffde7b
commit a06da857f3
4 changed files with 7 additions and 6 deletions
+1
View File
@@ -16,3 +16,4 @@ config/settings.dev.yml.log
config/settings.b.dev.yml config/settings.b.dev.yml
cmd/migrate/migration/version-local/* cmd/migrate/migration/version-local/*
!cmd/migrate/migration/version-local/doc.go !cmd/migrate/migration/version-local/doc.go
*/.DS_Store
+2 -2
View File
@@ -12,7 +12,7 @@ type SysFileDir struct {
Label string `json:"label" gorm:"type:varchar(255);comment:目录名称"` // 目录名称 Label string `json:"label" gorm:"type:varchar(255);comment:目录名称"` // 目录名称
PId uint `json:"pId" gorm:"type:int(11);comment:上级目录"` // 上级目录 PId uint `json:"pId" gorm:"type:int(11);comment:上级目录"` // 上级目录
Sort string `json:"sort" gorm:"type:bigint(20);comment:排序"` // 排序 //Sort string `json:"sort" gorm:"type:bigint(20);comment:排序"` // 排序
Path string `json:"path" gorm:"type:varchar(255);comment:路径"` // 路径 Path string `json:"path" gorm:"type:varchar(255);comment:路径"` // 路径
} }
@@ -22,7 +22,7 @@ type SysFileDirL struct {
Label string `json:"label" gorm:"type:varchar(255);comment:目录名称"` // 目录名称 Label string `json:"label" gorm:"type:varchar(255);comment:目录名称"` // 目录名称
PId uint `json:"pId" gorm:"type:int(11);comment:上级目录"` // 上级目录 PId uint `json:"pId" gorm:"type:int(11);comment:上级目录"` // 上级目录
Sort string `json:"sort" gorm:"type:bigint(20);comment:排序"` // 排序 //Sort string `json:"sort" gorm:"type:bigint(20);comment:排序"` // 排序
Path string `json:"path" gorm:"type:varchar(255);comment:路径"` // 路径 Path string `json:"path" gorm:"type:varchar(255);comment:路径"` // 路径
Children []SysFileDirL `json:"children" gorm:"-"` // 下级信息 Children []SysFileDirL `json:"children" gorm:"-"` // 下级信息
} }
+3 -3
View File
@@ -17,7 +17,7 @@ type SysFileDirSearch struct {
ID uint `form:"ID" search:"type:exact;column:id;table:sys_file_dir" comment:"标识"` ID uint `form:"ID" search:"type:exact;column:id;table:sys_file_dir" comment:"标识"`
Label string `form:"label" search:"type:exact;column:label;table:sys_file_dir" comment:"目录名称"` Label string `form:"label" search:"type:exact;column:label;table:sys_file_dir" comment:"目录名称"`
PId string `form:"pId" search:"type:exact;column:p_id;table:sys_file_dir" comment:"上级目录"` PId string `form:"pId" search:"type:exact;column:p_id;table:sys_file_dir" comment:"上级目录"`
Sort string `form:"sort" search:"type:exact;column:sort;table:sys_file_dir" comment:"排序"` //Sort string `form:"sort" search:"type:exact;column:sort;table:sys_file_dir" comment:"排序"`
Path string `form:"path" search:"type:exact;column:path;table:sys_file_dir" comment:"路径"` Path string `form:"path" search:"type:exact;column:path;table:sys_file_dir" comment:"路径"`
} }
@@ -43,7 +43,7 @@ type SysFileDirControl struct {
ID uint `uri:"ID" comment:"标识"` // 标识 ID uint `uri:"ID" comment:"标识"` // 标识
Label string `json:"label" comment:"目录名称"` Label string `json:"label" comment:"目录名称"`
PId uint `json:"pId" comment:"上级目录"` PId uint `json:"pId" comment:"上级目录"`
Sort string `json:"sort" comment:"排序"` //Sort string `json:"sort" comment:"排序"`
Path string `json:"path" comment:"路径"` Path string `json:"path" comment:"路径"`
} }
@@ -71,7 +71,7 @@ func (s *SysFileDirControl) GenerateM() (common.ActiveRecord, error) {
Model: gorm.Model{ID: s.ID}, Model: gorm.Model{ID: s.ID},
Label: s.Label, Label: s.Label,
PId: s.PId, PId: s.PId,
Sort: s.Sort, //Sort: s.Sort,
Path: s.Path, Path: s.Path,
}, nil }, nil
} }
+1 -1
View File
@@ -159,7 +159,7 @@ func SysFileDirCall(list *[]models.SysFileDirL, m models.SysFileDirL) models.Sys
mi.ID = listGroup[j].ID mi.ID = listGroup[j].ID
mi.PId = listGroup[j].PId mi.PId = listGroup[j].PId
mi.Label = listGroup[j].Label mi.Label = listGroup[j].Label
mi.Sort = listGroup[j].Sort //mi.Sort = listGroup[j].Sort
mi.CreatedAt = listGroup[j].CreatedAt mi.CreatedAt = listGroup[j].CreatedAt
mi.UpdatedAt = listGroup[j].UpdatedAt mi.UpdatedAt = listGroup[j].UpdatedAt
mi.Children = []models.SysFileDirL{} mi.Children = []models.SysFileDirL{}