Merge branch 'dev' of https://github.com/go-admin-team/go-admin into go-admin-team-dev

This commit is contained in:
zhangwenjian
2020-12-21 23:01:37 +08:00
46 changed files with 459 additions and 3627 deletions
+14 -13
View File
@@ -1,22 +1,23 @@
package dto
import (
"github.com/gin-gonic/gin"
"go-admin/app/admin/models"
"go-admin/common/dto"
"go-admin/common/log"
common "go-admin/common/models"
"go-admin/tools"
"github.com/gin-gonic/gin"
)
type SysFileDirSearch struct {
dto.Pagination `search:"-"`
ID int `form:"ID" search:"type:exact;column:id;table:sys_file_dir" comment:"标识"`
ID int `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:"目录名称"`
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:"排序"`
Path string `form:"path" search:"type:exact;column:path;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:"路径"`
}
func (m *SysFileDirSearch) GetNeedSearch() interface{} {
@@ -38,13 +39,13 @@ func (m *SysFileDirSearch) Generate() dto.Index {
}
type SysFileDirControl struct {
ID int `uri:"ID" comment:"标识"` // 标识
Label string `json:"label" comment:"目录名称"`
PId int `json:"pId" comment:"上级目录"`
Sort string `json:"sort" comment:"排序"`
Path string `json:"path" comment:"路径"`
CreateBy int `json:"-"`
UpdateBy int `json:"-"`
ID int `uri:"ID" comment:"标识"` // 标识
Label string `json:"label" comment:"目录名称"`
PId int `json:"pId" comment:"上级目录"`
Sort string `json:"sort" comment:"排序"`
Path string `json:"path" comment:"路径"`
CreateBy int `json:"-"`
UpdateBy int `json:"-"`
}
func (s *SysFileDirControl) Bind(ctx *gin.Context) error {
@@ -71,8 +72,8 @@ func (s *SysFileDirControl) GenerateM() (common.ActiveRecord, error) {
Model: common.Model{ID: s.ID},
Label: s.Label,
PId: s.PId,
Sort: s.Sort,
Path: s.Path,
//Sort: s.Sort,
Path: s.Path,
}, nil
}