改变路由层级,模块化

This commit is contained in:
2023-01-18 15:40:27 +08:00
parent bd25f041a2
commit 0f8c1f989b
102 changed files with 335 additions and 322 deletions
@@ -0,0 +1,10 @@
package request
import "cutego/pkg/base"
type ConfigQuery struct {
base.GlobalQuery
ConfigName string `form:"configName"`
ConfigType string `form:"configType"`
ConfigKey string `form:"configKey"`
}
@@ -0,0 +1,9 @@
package request
import "cutego/pkg/base"
type CronJobQuery struct {
base.GlobalQuery
JobName string `form:"jobName"`
Status string `form:"Status"`
}
@@ -0,0 +1,8 @@
package request
// DeptQuery 部门查询参数结构体 GET请求
type DeptQuery struct {
ParentId int `form:"parentId"`
DeptName string `form:"deptName"`
Status string `form:"status"`
}
@@ -0,0 +1,10 @@
package request
import "cutego/pkg/base"
type DiceDataQuery struct {
base.GlobalQuery
DictType string `form:"dictType"`
DictLabel string `form:"dictLabel"`
Status string `form:"status"`
}
@@ -0,0 +1,10 @@
package request
import "cutego/pkg/base"
type DictTypeQuery struct {
base.GlobalQuery
DictName string `form:"dictName"`
Status string `form:"status"`
DictType string `form:"dictType"`
}
@@ -0,0 +1,9 @@
package request
import "cutego/pkg/base"
type LogQuery struct {
base.GlobalQuery
Uid string `form:"uid"`
Content string `form:"content"`
}
@@ -0,0 +1,9 @@
package request
import "cutego/pkg/base"
// LoginInfoQuery 用户get请求数据参数
type LoginInfoQuery struct {
base.GlobalQuery
UserName string // 筛选用户名称
}
@@ -0,0 +1,7 @@
package request
// LoginBody 登录参数
type LoginBody struct {
UserName string `json:"username"` // 用户名
Password string `json:"password"` // 密码
}
@@ -0,0 +1,12 @@
package request
import "cutego/pkg/base"
// MenuQuery 菜单查询条件封装
type MenuQuery struct {
base.GlobalQuery
MenuName string `json:"menuName" form:"menuName"`
Visible string `json:"visible" form:"visible"`
Status string `json:"status" form:"status"`
UserId int64 `json:"userId" form:"userId"`
}
@@ -0,0 +1,10 @@
package request
import "cutego/pkg/base"
type NoticeQuery struct {
base.GlobalQuery
NoticeTitle string `form:"noticeTitle"`
NoticeType string `form:"noticeType"`
CreateBy string `form:"createBy"`
}
@@ -0,0 +1,10 @@
package request
import "cutego/pkg/base"
type PostQuery struct {
base.GlobalQuery
PostCode string `form:"postCode"`
Status string `form:"status"`
PostName string `form:"postName"`
}
@@ -0,0 +1,17 @@
package request
import "cutego/pkg/base"
// RoleQuery 角色Get请求参数
type RoleQuery struct {
base.GlobalQuery
RoleName string `form:"roleName"` // 角色名称
Status string `form:"status"` // 角色状态
RoleKey string `form:"roleKey"` // 角色Key
}
// RoleBody 角色Post和Put参数
type RoleBody struct {
RoleId int64 `json:"roleId"`
Status string `json:"status"`
}
@@ -0,0 +1,39 @@
package request
import (
"cutego/pkg/base"
"time"
)
// UserQuery 用户get请求数据参数
type UserQuery struct {
base.GlobalQuery
RoleId int64 `form:"roleId"` // 角色id
UserName string `form:"userName"` // 用户名
Status string `form:"status"` // 状态
PhoneNumber string `form:"phoneNumber"` // 手机号
DeptId int64 `form:"deptId"` // 部门id
}
// UserBody 用户接收POST 或者 PUT请求参数
type UserBody struct {
UserId int64 `xorm:"pk autoincr" json:"userId"` // 用户ID
DeptId int64 `json:"deptId"` // 部门ID
UserName string `json:"userName"` // 登录用户名
NickName string `json:"nickName"` // 用户昵称
Email string `json:"email"` // 邮箱
PhoneNumber string `json:"phoneNumber"` // 手机号
Sex string `json:"sex"` // 性别0男1女
Avatar string `json:"avatar"` // 头像路径
Password string `json:"password"` // 密码
Status string `json:"status"` // 状态 0正常1停用
DelFlag string `json:"delFlag"` // 0正常1删除
LoginIp string `json:"loginIp"` // 登录ip
LoginDate time.Time `json:"loginDate"` // 登录时间
CreateTime time.Time `xorm:"created" json:"createTime"` // 创建时间
CreateBy string `json:"createBy"` // 创建人
UpdateTime time.Time `json:"updateTime"` // 更新时间
UpdateBy string `json:"updateBy"` // 更新人
RoleIds []int64 `xorm:"-" json:"roleIds"` // 角色id组
PostIds []int64 `xorm:"-" json:"postIds"` // 岗位id组
}
@@ -0,0 +1,7 @@
package request
// UserRoleBody 用户角色Post和Put参数接收结构体
type UserRoleBody struct {
RoleId int64 `form:"roleId" json:"roleId"`
UserIds []int64 `form:"userIds" json:"userIds"`
}