format🥚 代码格式化

This commit is contained in:
zhangwenjian
2021-05-31 18:10:23 +08:00
parent a7cc943b8e
commit a54d4ba0c1
96 changed files with 143 additions and 151 deletions
+3 -5
View File
@@ -16,8 +16,8 @@ type SysApiSearch struct {
}
type SysApiOrder struct {
TitleOrder string `search:"type:order;column:title;table:sys_api" form:"titleOrder"`
PathOrder string `search:"type:order;column:path;table:sys_api" form:"pathOrder"`
TitleOrder string `search:"type:order;column:title;table:sys_api" form:"titleOrder"`
PathOrder string `search:"type:order;column:path;table:sys_api" form:"pathOrder"`
CreatedAtOrder string `search:"type:order;column:created_at;table:sys_api" form:"createdAtOrder"`
}
@@ -25,7 +25,6 @@ func (m *SysApiSearch) GetNeedSearch() interface{} {
return *m
}
type SysApiControl struct {
Id int `uri:"id" comment:"编码"` // 编码
Handle string `json:"handle" comment:"handle"`
@@ -64,7 +63,6 @@ func (s *SysApiById) GetId() interface{} {
return s.Id
}
func (s *SysApiById) Generate() dto.Control {
o := *s
return &o
@@ -72,4 +70,4 @@ func (s *SysApiById) Generate() dto.Control {
func (s *SysApiById) GenerateM() (common.ActiveRecord, error) {
return &models.SysApi{}, nil
}
}
+3 -2
View File
@@ -61,7 +61,7 @@ func (s *SysConfigControl) GetId() interface{} {
// GetSetSysConfigReq 增、改使用的结构体
type GetSetSysConfigReq struct {
ConfigKey string `json:"configKey" comment:""`
ConfigKey string `json:"configKey" comment:""`
ConfigValue string `json:"configValue" comment:""`
}
@@ -69,6 +69,7 @@ type GetSetSysConfigReq struct {
func (s *GetSetSysConfigReq) Generate(model *models.SysConfig) {
model.ConfigValue = s.ConfigValue
}
type UpdateSetSysConfigReq map[string]string
// SysConfigByKeyReq 根据Key获取配置
@@ -98,4 +99,4 @@ func (s *SysConfigById) GetId() interface{} {
return s.Ids
}
return s.Id
}
}
+1 -2
View File
@@ -99,7 +99,6 @@ func (s *SysDeptById) GetId() interface{} {
return s.Id
}
func (s *SysDeptById) GenerateM() (*models.SysDept, error) {
return &models.SysDept{}, nil
}
@@ -108,4 +107,4 @@ type DeptLabel struct {
Id int `gorm:"-" json:"id"`
Label string `gorm:"-" json:"label"`
Children []DeptLabel `gorm:"-" json:"children"`
}
}
+1 -1
View File
@@ -106,4 +106,4 @@ func (s *SysDictDataById) Generate() dto.Control {
func (s *SysDictDataById) GenerateM() (common.ActiveRecord, error) {
return &models.SysDictData{}, nil
}
}
+1 -1
View File
@@ -83,4 +83,4 @@ func (s *SysDictTypeById) GetId() interface{} {
func (s *SysDictTypeById) GenerateM() (common.ActiveRecord, error) {
return &models.SysDictType{}, nil
}
}
+1 -1
View File
@@ -115,4 +115,4 @@ func (s *SysLoginLogById) Generate() *SysLoginLogById {
func (s *SysLoginLogById) GenerateM() (*models.SysLoginLog, error) {
return &models.SysLoginLog{}, nil
}
}
+1 -3
View File
@@ -24,7 +24,6 @@ func (m *SysMenuSearch) GetNeedSearch() interface{} {
return *m
}
// SysMenuControl 增、改使用的结构体
type SysMenuControl struct {
MenuId int `uri:"id" comment:"编码"` // 编码
@@ -97,7 +96,6 @@ type SysMenuById struct {
common.ControlBy
}
func (s *SysMenuById) Generate() *SysMenuById {
cp := *s
return &cp
@@ -128,4 +126,4 @@ type MenuRole struct {
type SelectRole struct {
RoleId int `uri:"roleId"`
}
}
+1 -1
View File
@@ -120,4 +120,4 @@ func (s *SysOperaLogById) Bind(ctx *gin.Context) error {
func (s *SysOperaLogById) SetUpdateBy(id int) {
}
}
+2 -2
View File
@@ -31,7 +31,7 @@ type SysRoleOrder struct {
RoleIdOrder string `search:"type:order;column:role_id;table:sys_role" form:"roleIdOrder"`
RoleNameOrder string `search:"type:order;column:role_name;table:sys_role" form:"roleNameOrder"`
RoleSortOrder string `search:"type:order;column:role_sort;table:sys_role" form:"usernameOrder"`
StatusOrder string `search:"type:order;column:status;table:sys_role" form:"statusOrder"`
StatusOrder string `search:"type:order;column:status;table:sys_role" form:"statusOrder"`
CreatedAtOrder string `search:"type:order;column:created_at;table:sys_role" form:"createdAtOrder"`
}
@@ -147,4 +147,4 @@ type RoleDataScopeReq struct {
type DeptIdList struct {
DeptId int `json:"DeptId"`
}
}
+1 -1
View File
@@ -89,4 +89,4 @@ func (s *SysSettingById) Bind(ctx *gin.Context) error {
func (s *SysSettingById) GenerateM() (*models.SysSetting, error) {
return &models.SysSetting{}, nil
}
}
+2 -2
View File
@@ -25,7 +25,7 @@ type SysUserSearch struct {
type SysUserOrder struct {
UserIdOrder string `search:"type:order;column:user_id;table:sys_user" form:"userIdOrder"`
UsernameOrder string `search:"type:order;column:username;table:sys_user" form:"usernameOrder"`
StatusOrder string `search:"type:order;column:status;table:sys_user" form:"statusOrder"`
StatusOrder string `search:"type:order;column:status;table:sys_user" form:"statusOrder"`
CreatedAtOrder string `search:"type:order;column:created_at;table:sys_user" form:"createdAtOrder"`
}
@@ -93,4 +93,4 @@ func (s *SysUserById) GenerateM() (common.ActiveRecord, error) {
type PassWord struct {
NewPassword string `json:"newPassword" binding:"required"`
OldPassword string `json:"oldPassword" binding:"required"`
}
}