mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-13 12:43:45 +08:00
gf2版本同步升级到v2.0.4,修复验证器兼容问题
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminForm
|
||||
|
||||
import (
|
||||
@@ -9,41 +15,41 @@ import (
|
||||
|
||||
// 获取指定配置键的值
|
||||
type ConfigGetValueReq struct {
|
||||
Key string `json:"key" v:"required#配置键不能为空" description:"配置键"`
|
||||
g.Meta `path:"/config/get_value" method:"get" tags:"配置" summary:"获取指定配置键的值"`
|
||||
Key string `json:"key" v:"required#配置键不能为空" dc:"配置键"`
|
||||
}
|
||||
type ConfigGetValueRes struct {
|
||||
Value string `json:"value" description:"配置值"`
|
||||
Value string `json:"value" dc:"配置值"`
|
||||
}
|
||||
|
||||
// 名称是否唯一
|
||||
type ConfigNameUniqueReq struct {
|
||||
Name string `json:"name" v:"required#配置名称不能为空" description:"配置名称"`
|
||||
Id int64 `json:"id" description:"配置ID"`
|
||||
g.Meta `path:"/config/name_unique" method:"get" tags:"配置" summary:"配置名称是否唯一"`
|
||||
Name string `json:"name" v:"required#配置名称不能为空" dc:"配置名称"`
|
||||
Id int64 `json:"id" dc:"配置ID"`
|
||||
}
|
||||
type ConfigNameUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// 查询列表
|
||||
type ConfigListReq struct {
|
||||
g.Meta `path:"/config/list" method:"get" tags:"配置" summary:"获取配置列表"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string `json:"name" description:"配置名称"`
|
||||
g.Meta `path:"/config/list" method:"get" tags:"配置" summary:"获取配置列表"`
|
||||
Name string `json:"name" dc:"配置名称"`
|
||||
}
|
||||
|
||||
type ConfigListRes struct {
|
||||
List []*input.SysConfigListModel `json:"list" description:"数据列表"`
|
||||
List []*input.SysConfigListModel `json:"list" dc:"数据列表"`
|
||||
form.PageRes
|
||||
}
|
||||
|
||||
// 获取指定信息
|
||||
type ConfigViewReq struct {
|
||||
Id string `json:"id" v:"required#配置ID不能为空" description:"配置ID"`
|
||||
g.Meta `path:"/config/view" method:"get" tags:"配置" summary:"获取指定信息"`
|
||||
Id string `json:"id" v:"required#配置ID不能为空" dc:"配置ID"`
|
||||
}
|
||||
type ConfigViewRes struct {
|
||||
*input.SysConfigViewModel
|
||||
@@ -51,23 +57,23 @@ type ConfigViewRes struct {
|
||||
|
||||
// 修改/新增
|
||||
type ConfigEditReq struct {
|
||||
entity.SysConfig
|
||||
g.Meta `path:"/config/edit" method:"post" tags:"配置" summary:"修改/新增配置"`
|
||||
entity.SysConfig
|
||||
}
|
||||
type ConfigEditRes struct{}
|
||||
|
||||
// 删除
|
||||
type ConfigDeleteReq struct {
|
||||
Id interface{} `json:"id" v:"required#配置ID不能为空" description:"配置ID"`
|
||||
g.Meta `path:"/config/delete" method:"post" tags:"配置" summary:"删除配置"`
|
||||
Id interface{} `json:"id" v:"required#配置ID不能为空" dc:"配置ID"`
|
||||
}
|
||||
type ConfigDeleteRes struct{}
|
||||
|
||||
// 最大排序
|
||||
type ConfigMaxSortReq struct {
|
||||
Id int64 `json:"id" description:"配置ID"`
|
||||
g.Meta `path:"/config/max_sort" method:"get" tags:"配置" summary:"配置最大排序"`
|
||||
Id int64 `json:"id" dc:"配置ID"`
|
||||
}
|
||||
type ConfigMaxSortRes struct {
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminForm
|
||||
|
||||
import (
|
||||
@@ -8,17 +14,17 @@ import (
|
||||
|
||||
// 名称是否唯一
|
||||
type DeptNameUniqueReq struct {
|
||||
Name string `json:"name" v:"required#部门名称不能为空" description:"部门名称"`
|
||||
Id int64 `json:"id" description:"部门ID"`
|
||||
Name string `json:"name" v:"required#部门名称不能为空" dc:"部门名称"`
|
||||
Id int64 `json:"id" dc:"部门ID"`
|
||||
g.Meta `path:"/dept/name_unique" method:"get" tags:"部门" summary:"部门名称是否唯一"`
|
||||
}
|
||||
type DeptNameUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// 查询列表树
|
||||
type DeptListTreeReq struct {
|
||||
Id int64 `json:"id" description:"部门ID"`
|
||||
Id int64 `json:"id" dc:"部门ID"`
|
||||
g.Meta `path:"/dept/list_tree" method:"get" tags:"部门" summary:"获取部门列表树"`
|
||||
}
|
||||
|
||||
@@ -26,7 +32,7 @@ type DeptListTreeRes []*input.AdminDeptListTreeModel
|
||||
|
||||
// 查询列表
|
||||
type DeptListReq struct {
|
||||
Name string `json:"name" description:"部门名称"`
|
||||
Name string `json:"name" dc:"部门名称"`
|
||||
g.Meta `path:"/dept/list" method:"get" tags:"部门" summary:"获取部门列表"`
|
||||
}
|
||||
|
||||
@@ -34,7 +40,7 @@ type DeptListRes []*input.AdminDeptListModel
|
||||
|
||||
// 获取指定信息
|
||||
type DeptViewReq struct {
|
||||
Id int64 `json:"id" v:"required#部门ID不能为空" description:"部门ID"`
|
||||
Id int64 `json:"id" v:"required#部门ID不能为空" dc:"部门ID"`
|
||||
g.Meta `path:"/dept/view" method:"get" tags:"部门" summary:"获取指定信息"`
|
||||
}
|
||||
type DeptViewRes struct {
|
||||
@@ -50,16 +56,16 @@ type DeptEditRes struct{}
|
||||
|
||||
// 删除字典类型
|
||||
type DeptDeleteReq struct {
|
||||
Id interface{} `json:"id" v:"required#部门ID不能为空" description:"部门ID"`
|
||||
Id interface{} `json:"id" v:"required#部门ID不能为空" dc:"部门ID"`
|
||||
g.Meta `path:"/dept/delete" method:"post" tags:"部门" summary:"删除部门"`
|
||||
}
|
||||
type DeptDeleteRes struct{}
|
||||
|
||||
// 最大排序
|
||||
type DeptMaxSortReq struct {
|
||||
Id int64 `json:"id" description:"部门ID"`
|
||||
Id int64 `json:"id" dc:"部门ID"`
|
||||
g.Meta `path:"/dept/max_sort" method:"get" tags:"部门" summary:"部门最大排序"`
|
||||
}
|
||||
type DeptMaxSortRes struct {
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminForm
|
||||
|
||||
import (
|
||||
@@ -10,42 +16,42 @@ import (
|
||||
|
||||
// 数据键值是否唯一
|
||||
type DictDataUniqueReq struct {
|
||||
Value string `json:"value" v:"required#数据键值不能为空" description:"数据键值"`
|
||||
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" description:"字典类型"`
|
||||
Id int64 `json:"id" description:"字典数据ID"`
|
||||
g.Meta `path:"/dict_data/unique" method:"get" tags:"字典" summary:"数据键值是否唯一"`
|
||||
Value string `json:"value" v:"required#数据键值不能为空" dc:"数据键值"`
|
||||
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" dc:"字典类型"`
|
||||
Id int64 `json:"id" dc:"字典数据ID"`
|
||||
}
|
||||
type DictDataUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// 查询字典数据最大排序
|
||||
type DictDataMaxSortReq struct {
|
||||
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" description:"字典类型"`
|
||||
g.Meta `path:"/dict_data/max_sort" method:"get" tags:"字典" summary:"查询字典数据最大排序"`
|
||||
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" dc:"字典类型"`
|
||||
}
|
||||
type DictDataMaxSortRes struct {
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
// 修改/新增字典数据
|
||||
type DictDataEditReq struct {
|
||||
entity.SysDictData
|
||||
g.Meta `path:"/dict_data/edit" method:"post" tags:"字典" summary:"修改/新增字典数据"`
|
||||
entity.SysDictData
|
||||
}
|
||||
type DictDataEditRes struct{}
|
||||
|
||||
// 删除字典类型
|
||||
type DictDataDeleteReq struct {
|
||||
Id interface{} `json:"id" v:"required#字典数据ID不能为空" description:"字典数据ID"`
|
||||
g.Meta `path:"/dict_data/delete" method:"post" tags:"字典" summary:"删除字典数据"`
|
||||
Id interface{} `json:"id" v:"required#字典数据ID不能为空" dc:"字典数据ID"`
|
||||
}
|
||||
type DictDataDeleteRes struct{}
|
||||
|
||||
// 获取指定字典数据信息
|
||||
type DictDataViewReq struct {
|
||||
Id string `json:"id" v:"required#字典数据ID不能为空" description:"字典数据ID"`
|
||||
g.Meta `path:"/dict_data/view" method:"get" tags:"字典" summary:"获取指定字典数据信息"`
|
||||
Id string `json:"id" v:"required#字典数据ID不能为空" dc:"字典数据ID"`
|
||||
}
|
||||
type DictDataViewRes struct {
|
||||
*entity.SysDictData
|
||||
@@ -53,19 +59,19 @@ type DictDataViewRes struct {
|
||||
|
||||
// 获取字典数据列表
|
||||
type DictDataListReq struct {
|
||||
form.PageReq
|
||||
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" description:"字典类型"`
|
||||
g.Meta `path:"/dict_data/list" method:"get" tags:"字典" summary:"获取字典数据列表"`
|
||||
form.PageReq
|
||||
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" dc:"字典类型"`
|
||||
}
|
||||
type DictDataListRes struct {
|
||||
List []*entity.SysDictData `json:"list" description:"数据列表"`
|
||||
List []*entity.SysDictData `json:"list" dc:"数据列表"`
|
||||
form.PageRes
|
||||
}
|
||||
|
||||
// 获取指定字典类型的属性数据
|
||||
type DictAttributeReq struct {
|
||||
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" description:"字典类型"`
|
||||
g.Meta `path:"/dict/attribute" method:"get" tags:"字典" summary:"获取指定字典类型的属性数据"`
|
||||
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" dc:"字典类型"`
|
||||
}
|
||||
type DictAttributeRes []*entity.SysDictData
|
||||
|
||||
@@ -73,12 +79,12 @@ type DictAttributeRes []*entity.SysDictData
|
||||
|
||||
// 修改/新增字典类型
|
||||
type DictTypeExportReq struct {
|
||||
g.Meta `path:"/dict_type/export" method:"get" tags:"字典" summary:"导出字典类型"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string `json:"name" description:"字典名称"`
|
||||
Type string `json:"type" description:"字典类型"`
|
||||
g.Meta `path:"/dict_type/export" method:"get" tags:"字典" summary:"导出字典类型"`
|
||||
Name string `json:"name" dc:"字典名称"`
|
||||
Type string `json:"type" dc:"字典类型"`
|
||||
}
|
||||
type DictTypeExportRes struct{}
|
||||
|
||||
@@ -90,36 +96,36 @@ type DictTypeRefreshCacheRes struct{}
|
||||
|
||||
// 获取字典类型列表
|
||||
type DictTypeListReq struct {
|
||||
g.Meta `path:"/dict_type/list" method:"get" tags:"字典" summary:"获取字典类型列表"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string `json:"name" description:"字典名称"`
|
||||
Type string `json:"type" description:"字典类型"`
|
||||
g.Meta `path:"/dict_type/list" method:"get" tags:"字典" summary:"获取字典类型列表"`
|
||||
Name string `json:"name" dc:"字典名称"`
|
||||
Type string `json:"type" dc:"字典类型"`
|
||||
}
|
||||
type DictTypeListRes struct {
|
||||
List []*entity.SysDictType `json:"list" description:"数据列表"`
|
||||
List []*entity.SysDictType `json:"list" dc:"数据列表"`
|
||||
form.PageRes
|
||||
}
|
||||
|
||||
// 修改/新增字典类型
|
||||
type DictTypeEditReq struct {
|
||||
entity.SysDictType
|
||||
g.Meta `path:"/dict_type/edit" method:"post" tags:"字典" summary:"修改/新增字典类型"`
|
||||
entity.SysDictType
|
||||
}
|
||||
type DictTypeEditRes struct{}
|
||||
|
||||
// 删除字典类型
|
||||
type DictTypeDeleteReq struct {
|
||||
Id interface{} `json:"id" v:"required#字典类型ID不能为空" description:"字典类型ID"`
|
||||
g.Meta `path:"/dict_type/delete" method:"post" tags:"字典" summary:"删除字典类型"`
|
||||
Id interface{} `json:"id" v:"required#字典类型ID不能为空" dc:"字典类型ID"`
|
||||
}
|
||||
type DictTypeDeleteRes struct{}
|
||||
|
||||
// 获取指定字典类型信息
|
||||
type DictTypeViewReq struct {
|
||||
Id string `json:"id" v:"required#字典类型ID不能为空" description:"字典类型ID"`
|
||||
g.Meta `path:"/dict_type/view" method:"get" tags:"字典" summary:"获取指定字典类型信息"`
|
||||
Id string `json:"id" v:"required#字典类型ID不能为空" dc:"字典类型ID"`
|
||||
}
|
||||
type DictTypeViewRes struct {
|
||||
*entity.SysDictType
|
||||
@@ -127,10 +133,10 @@ type DictTypeViewRes struct {
|
||||
|
||||
// 类型是否唯一
|
||||
type DictTypeUniqueReq struct {
|
||||
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" description:"字典类型"`
|
||||
Id int64 `json:"id" description:"字典类型ID"`
|
||||
g.Meta `path:"/dict_type/unique" method:"get" tags:"字典" summary:"类型是否唯一"`
|
||||
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" dc:"字典类型"`
|
||||
Id int64 `json:"id" dc:"字典类型ID"`
|
||||
}
|
||||
type DictTypeUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminForm
|
||||
|
||||
import (
|
||||
@@ -14,34 +20,34 @@ type LogClearRes struct{}
|
||||
|
||||
// 导出
|
||||
type LogExportReq struct {
|
||||
g.Meta `path:"/log/export" method:"get" tags:"日志" summary:"导出日志"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
Module string `json:"module" description:"应用端口"`
|
||||
MemberId int `json:"member_id" description:"用户ID"`
|
||||
TakeUpTime int `json:"take_up_time" description:"请求耗时"`
|
||||
Method string `json:"method" description:"请求方式"`
|
||||
Url string `json:"url" description:"请求路径"`
|
||||
Ip string `json:"ip" description:"访问IP"`
|
||||
ErrorCode string `json:"error_code" description:"状态码"`
|
||||
g.Meta `path:"/log/export" method:"get" tags:"日志" summary:"导出日志"`
|
||||
Module string `json:"module" dc:"应用端口"`
|
||||
MemberId int `json:"member_id" dc:"用户ID"`
|
||||
TakeUpTime int `json:"take_up_time" dc:"请求耗时"`
|
||||
Method string `json:"method" dc:"请求方式"`
|
||||
Url string `json:"url" dc:"请求路径"`
|
||||
Ip string `json:"ip" dc:"访问IP"`
|
||||
ErrorCode string `json:"error_code" dc:"状态码"`
|
||||
}
|
||||
type LogExportRes struct{}
|
||||
|
||||
// 获取菜单列表
|
||||
type LogListReq struct {
|
||||
g.Meta `path:"/log/list" method:"get" tags:"日志" summary:"获取日志列表"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
Module string `json:"module" description:"应用端口"`
|
||||
MemberId int `json:"member_id" description:"用户ID"`
|
||||
TakeUpTime int `json:"take_up_time" description:"请求耗时"`
|
||||
Method string `json:"method" description:"请求方式"`
|
||||
Url string `json:"url" description:"请求路径"`
|
||||
Ip string `json:"ip" description:"访问IP"`
|
||||
ErrorCode string `json:"error_code" description:"状态码"`
|
||||
g.Meta `path:"/log/list" method:"get" tags:"日志" summary:"获取日志列表"`
|
||||
Module string `json:"module" dc:"应用端口"`
|
||||
MemberId int `json:"member_id" dc:"用户ID"`
|
||||
TakeUpTime int `json:"take_up_time" dc:"请求耗时"`
|
||||
Method string `json:"method" dc:"请求方式"`
|
||||
Url string `json:"url" dc:"请求路径"`
|
||||
Ip string `json:"ip" dc:"访问IP"`
|
||||
ErrorCode string `json:"error_code" dc:"状态码"`
|
||||
}
|
||||
|
||||
type LogListRes struct {
|
||||
List []*input.LogListModel `json:"list" description:"数据列表"`
|
||||
List []*input.LogListModel `json:"list" dc:"数据列表"`
|
||||
form.PageRes
|
||||
}
|
||||
|
||||
@@ -22,20 +22,20 @@ type LoginCaptchaReq struct {
|
||||
g.Meta `path:"/login/captcha" method:"get" tags:"登录" summary:"获取登录验证码"`
|
||||
}
|
||||
type LoginCaptchaRes struct {
|
||||
Cid string `json:"cid" v:"" description:"验证码ID"`
|
||||
Base64 string `json:"base64" v:"" description:"验证码"`
|
||||
Cid string `json:"cid" dc:"验证码ID"`
|
||||
Base64 string `json:"base64" dc:"验证码"`
|
||||
}
|
||||
|
||||
// 提交登录
|
||||
type LoginReq struct {
|
||||
g.Meta `path:"/login/sign" method:"post" tags:"登录" summary:"提交登录"`
|
||||
Username string `json:"username" v:"required#用户名不能为空" description:"用户名"`
|
||||
Password string `json:"password" v:"required#密码不能为空" description:"密码"`
|
||||
Cid string `json:"cid" v:"required#验证码ID不能为空" description:"验证码ID"`
|
||||
Code string `json:"code" v:"required#验证码不能为空" description:"验证码"`
|
||||
Device string `json:"device" description:"登录设备"`
|
||||
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
|
||||
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
|
||||
Cid string `json:"cid" v:"required#验证码ID不能为空" dc:"验证码ID"`
|
||||
Code string `json:"code" v:"required#验证码不能为空" dc:"验证码"`
|
||||
Device string `json:"device" dc:"登录设备"`
|
||||
}
|
||||
type LoginRes struct {
|
||||
model.Identity
|
||||
Token string `json:"token" v:"" description:"登录token"`
|
||||
Token string `json:"token" dc:"登录token"`
|
||||
}
|
||||
|
||||
@@ -17,18 +17,18 @@ import (
|
||||
|
||||
// 更新会员资料
|
||||
type MemberUpdateProfileReq struct {
|
||||
Mobile int `json:"mobile" description:"手机号"`
|
||||
Email string `json:"email" description:"邮箱"`
|
||||
Realname string `json:"realname" description:"真实姓名"`
|
||||
g.Meta `path:"/member/update_profile" method:"post" tags:"会员" summary:"更新会员资料"`
|
||||
Mobile int `json:"mobile" dc:"手机号"`
|
||||
Email string `json:"email" dc:"邮箱"`
|
||||
Realname string `json:"realname" dc:"真实姓名"`
|
||||
}
|
||||
type MemberUpdateProfileRes struct{}
|
||||
|
||||
// 修改登录密码
|
||||
type MemberUpdatePwdReq struct {
|
||||
OldPassword string `json:"oldPassword" v:"required#原密码不能为空" description:"原密码"`
|
||||
NewPassword string `json:"newPassword" v:"required|length:6,16#新密码不能为空#新密码需在6~16之间" description:"新密码"`
|
||||
g.Meta `path:"/member/update_pwd" method:"post" tags:"会员" summary:"重置密码"`
|
||||
OldPassword string `json:"oldPassword" v:"required#原密码不能为空" dc:"原密码"`
|
||||
NewPassword string `json:"newPassword" v:"required|length:6,16#新密码不能为空#新密码需在6~16之间" dc:"新密码"`
|
||||
}
|
||||
type MemberUpdatePwdRes struct{}
|
||||
|
||||
@@ -37,176 +37,176 @@ type MemberProfileReq struct {
|
||||
g.Meta `path:"/member/profile" method:"get" tags:"会员" summary:"获取登录用户的基本信息"`
|
||||
}
|
||||
type MemberProfileRes struct {
|
||||
PostGroup string `json:"postGroup" description:"岗位名称"`
|
||||
RoleGroup string `json:"roleGroup" description:"角色名称"`
|
||||
User *input.AdminMemberViewModel `json:"user" description:"用户基本信息"`
|
||||
SysDept *input.AdminDeptViewModel `json:"sysDept" description:"部门信息"`
|
||||
SysRoles []*input.AdminRoleListModel `json:"sysRoles" description:"角色列表"`
|
||||
PostIds int64 `json:"postIds" description:"当前岗位"`
|
||||
RoleIds int64 `json:"roleIds" description:"当前角色"`
|
||||
PostGroup string `json:"postGroup" dc:"岗位名称"`
|
||||
RoleGroup string `json:"roleGroup" dc:"角色名称"`
|
||||
User *input.AdminMemberViewModel `json:"user" dc:"用户基本信息"`
|
||||
SysDept *input.AdminDeptViewModel `json:"sysDept" dc:"部门信息"`
|
||||
SysRoles []*input.AdminRoleListModel `json:"sysRoles" dc:"角色列表"`
|
||||
PostIds int64 `json:"postIds" dc:"当前岗位"`
|
||||
RoleIds int64 `json:"roleIds" dc:"当前角色"`
|
||||
}
|
||||
|
||||
// 重置密码
|
||||
type MemberResetPwdReq struct {
|
||||
Password string `json:"password" v:"required#密码不能为空" description:"密码"`
|
||||
Id int64 `json:"id" description:"会员ID"`
|
||||
g.Meta `path:"/member/reset_pwd" method:"post" tags:"会员" summary:"重置密码"`
|
||||
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
|
||||
Id int64 `json:"id" dc:"会员ID"`
|
||||
}
|
||||
type MemberResetPwdRes struct{}
|
||||
|
||||
// 邮箱是否唯一
|
||||
type MemberEmailUniqueReq struct {
|
||||
Email string `json:"email" v:"required#邮箱不能为空" description:"邮箱"`
|
||||
Id int64 `json:"id" description:"会员ID"`
|
||||
g.Meta `path:"/member/email_unique" method:"get" tags:"会员" summary:"邮箱是否唯一"`
|
||||
Email string `json:"email" v:"required#邮箱不能为空" dc:"邮箱"`
|
||||
Id int64 `json:"id" dc:"会员ID"`
|
||||
}
|
||||
type MemberEmailUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// 手机号是否唯一
|
||||
type MemberMobileUniqueReq struct {
|
||||
Mobile string `json:"mobile" v:"required#手机号不能为空" description:"手机号"`
|
||||
Id int64 `json:"id" description:"会员ID"`
|
||||
g.Meta `path:"/member/mobile_unique" method:"get" tags:"会员" summary:"手机号是否唯一"`
|
||||
Mobile string `json:"mobile" v:"required#手机号不能为空" dc:"手机号"`
|
||||
Id int64 `json:"id" dc:"会员ID"`
|
||||
}
|
||||
type MemberMobileUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// 名称是否唯一
|
||||
type MemberNameUniqueReq struct {
|
||||
Username string `json:"username" v:"required#会员名称不能为空" description:"会员名称"`
|
||||
Id int64 `json:"id" description:"会员ID"`
|
||||
g.Meta `path:"/member/name_unique" method:"get" tags:"会员" summary:"会员名称是否唯一"`
|
||||
Username string `json:"username" v:"required#会员名称不能为空" dc:"会员名称"`
|
||||
Id int64 `json:"id" dc:"会员ID"`
|
||||
}
|
||||
type MemberNameUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// 查询列表
|
||||
type MemberListReq struct {
|
||||
g.Meta `path:"/member/list" method:"get" tags:"会员" summary:"获取会员列表"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
DeptId int `json:"dept_id" description:"部门ID"`
|
||||
Mobile int `json:"mobile" description:"手机号"`
|
||||
Username string `json:"username" description:"用户名"`
|
||||
Realname string `json:"realname" description:"真实姓名"`
|
||||
StartTime string `json:"start_time" description:"开始时间"`
|
||||
EndTime string `json:"end_time" description:"结束时间"`
|
||||
Name string `json:"name" description:"岗位名称"`
|
||||
Code string `json:"code" description:"岗位编码"`
|
||||
g.Meta `path:"/member/list" method:"get" tags:"会员" summary:"获取会员列表"`
|
||||
DeptId int `json:"dept_id" dc:"部门ID"`
|
||||
Mobile int `json:"mobile" dc:"手机号"`
|
||||
Username string `json:"username" dc:"用户名"`
|
||||
Realname string `json:"realname" dc:"真实姓名"`
|
||||
StartTime string `json:"start_time" dc:"开始时间"`
|
||||
EndTime string `json:"end_time" dc:"结束时间"`
|
||||
Name string `json:"name" dc:"岗位名称"`
|
||||
Code string `json:"code" dc:"岗位编码"`
|
||||
}
|
||||
|
||||
type MemberListRes struct {
|
||||
List []*input.AdminMemberListModel `json:"list" description:"数据列表"`
|
||||
List []*input.AdminMemberListModel `json:"list" dc:"数据列表"`
|
||||
form.PageRes
|
||||
}
|
||||
|
||||
// 获取指定信息
|
||||
type MemberViewReq struct {
|
||||
Id int64 `json:"id" description:"会员ID"` // v:"required#会员ID不能为空"
|
||||
g.Meta `path:"/member/view" method:"get" tags:"会员" summary:"获取指定信息"`
|
||||
Id int64 `json:"id" dc:"会员ID"` // v:"required#会员ID不能为空"
|
||||
}
|
||||
type MemberViewRes struct {
|
||||
*input.AdminMemberViewModel
|
||||
Posts []*input.AdminPostListModel `json:"posts" description:"可选岗位"`
|
||||
PostIds []int64 `json:"postIds" description:"当前岗位"`
|
||||
Roles []*input.AdminRoleListModel `json:"roles" description:"可选角色"`
|
||||
RoleIds []int64 `json:"roleIds" description:"当前角色"`
|
||||
DeptName string `json:"dept_name" description:"部门名称"`
|
||||
Posts []*input.AdminPostListModel `json:"posts" dc:"可选岗位"`
|
||||
PostIds []int64 `json:"postIds" dc:"当前岗位"`
|
||||
Roles []*input.AdminRoleListModel `json:"roles" dc:"可选角色"`
|
||||
RoleIds []int64 `json:"roleIds" dc:"当前角色"`
|
||||
DeptName string `json:"dept_name" dc:"部门名称"`
|
||||
}
|
||||
|
||||
// 修改/新增
|
||||
type MemberEditReq struct {
|
||||
input.AdminMemberEditInp
|
||||
g.Meta `path:"/member/edit" method:"post" tags:"会员" summary:"修改/新增会员"`
|
||||
input.AdminMemberEditInp
|
||||
}
|
||||
type MemberEditRes struct{}
|
||||
|
||||
// 删除
|
||||
type MemberDeleteReq struct {
|
||||
Id interface{} `json:"id" v:"required#会员ID不能为空" description:"会员ID"`
|
||||
g.Meta `path:"/member/delete" method:"post" tags:"会员" summary:"删除会员"`
|
||||
Id interface{} `json:"id" v:"required#会员ID不能为空" dc:"会员ID"`
|
||||
}
|
||||
type MemberDeleteRes struct{}
|
||||
|
||||
// 最大排序
|
||||
type MemberMaxSortReq struct {
|
||||
Id int64 `json:"id" description:"会员ID"`
|
||||
g.Meta `path:"/member/max_sort" method:"get" tags:"会员" summary:"会员最大排序"`
|
||||
Id int64 `json:"id" dc:"会员ID"`
|
||||
}
|
||||
type MemberMaxSortRes struct {
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
// 获取登录用户信息
|
||||
type MemberInfoReq struct {
|
||||
g.Meta `path:"/member/info" method:"get" tags:"会员" summary:"获取登录用户信息" description:"获取管理后台的登录用户信息"`
|
||||
g.Meta `path:"/member/info" method:"get" tags:"会员" summary:"获取登录用户信息" dc:"获取管理后台的登录用户信息"`
|
||||
}
|
||||
|
||||
type PortalConfigContentOptions struct {
|
||||
TitleRequired bool `json:"titleRequired" titleRequired:""`
|
||||
MoreUrl string `json:"moreUrl" description:"模块地址"`
|
||||
Refresh int `json:"refresh" description:"刷新"`
|
||||
MoreUrl string `json:"moreUrl" dc:"模块地址"`
|
||||
Refresh int `json:"refresh" dc:"刷新"`
|
||||
}
|
||||
|
||||
type PortalConfigContent struct {
|
||||
Id int `json:"id" description:"内容ID"`
|
||||
X int `json:"x" description:""`
|
||||
Y int `json:"y" description:""`
|
||||
W int `json:"w" description:"宽"`
|
||||
H int `json:"h" description:"高"`
|
||||
I int `json:"i" description:""`
|
||||
Key string `json:"key" description:""`
|
||||
IsShowTitle string `json:"isShowTitle" description:""`
|
||||
IsAllowDrag bool `json:"isAllowDrag" description:""`
|
||||
Name string `json:"name" description:""`
|
||||
Type string `json:"type" description:""`
|
||||
Url string `json:"url" description:""`
|
||||
Options []*PortalConfigContentOptions `json:"options" description:""`
|
||||
Moved bool `json:"moved" description:""`
|
||||
Id int `json:"id" dc:"内容ID"`
|
||||
X int `json:"x" dc:""`
|
||||
Y int `json:"y" dc:""`
|
||||
W int `json:"w" dc:"宽"`
|
||||
H int `json:"h" dc:"高"`
|
||||
I int `json:"i" dc:""`
|
||||
Key string `json:"key" dc:""`
|
||||
IsShowTitle string `json:"isShowTitle" dc:""`
|
||||
IsAllowDrag bool `json:"isAllowDrag" dc:""`
|
||||
Name string `json:"name" dc:""`
|
||||
Type string `json:"type" dc:""`
|
||||
Url string `json:"url" dc:""`
|
||||
Options []*PortalConfigContentOptions `json:"options" dc:""`
|
||||
Moved bool `json:"moved" dc:""`
|
||||
}
|
||||
|
||||
type PortalConfig struct {
|
||||
CreateByName string `json:"createByName" description:"创建者名称"`
|
||||
CreateDeptName string `json:"createDeptName" description:"创建部门名称"`
|
||||
ImportErrInfo string `json:"importErrInfo" description:"导出错误信息"`
|
||||
Id string `json:"id" description:"用户ID"`
|
||||
SearchValue string `json:"searchValue" description:"搜索内容"`
|
||||
CreateBy string `json:"createBy" description:"创建者名称"`
|
||||
CreateDept string `json:"createDept" description:"创建部门名称"`
|
||||
CreateTime *gtime.Time `json:"createTime" description:"创建时间"`
|
||||
UpdateBy string `json:"updateBy" description:"更新者名称"`
|
||||
UpdateTime *gtime.Time `json:"updateTime" description:"更新时间"`
|
||||
UpdateIp string `json:"updateIp" description:"更新iP"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Version string `json:"version" description:"版本号"`
|
||||
DelFlag string `json:"delFlag" description:"删除标签"`
|
||||
HandleType string `json:"handleType" description:""`
|
||||
Params string `json:"params" description:""`
|
||||
Name string `json:"name" description:"配置名称"`
|
||||
Code string `json:"code" description:"配置代码"`
|
||||
ApplicationRange string `json:"applicationRange" description:""`
|
||||
IsDefault string `json:"isDefault" description:"是否默认"`
|
||||
ResourceId string `json:"resourceId" description:""`
|
||||
ResourceName string `json:"resourceName" description:""`
|
||||
SystemDefinedId string `json:"systemDefinedId" description:""`
|
||||
Sort string `json:"sort" description:"排序"`
|
||||
SaveType string `json:"saveType" description:""`
|
||||
Status string `json:"status" description:"状态"`
|
||||
RecordLog string `json:"recordLog" description:""`
|
||||
PortalConfigContent string `json:"content" description:"配置内容"`
|
||||
CreateByName string `json:"createByName" dc:"创建者名称"`
|
||||
CreateDeptName string `json:"createDeptName" dc:"创建部门名称"`
|
||||
ImportErrInfo string `json:"importErrInfo" dc:"导出错误信息"`
|
||||
Id string `json:"id" dc:"用户ID"`
|
||||
SearchValue string `json:"searchValue" dc:"搜索内容"`
|
||||
CreateBy string `json:"createBy" dc:"创建者名称"`
|
||||
CreateDept string `json:"createDept" dc:"创建部门名称"`
|
||||
CreateTime *gtime.Time `json:"createTime" dc:"创建时间"`
|
||||
UpdateBy string `json:"updateBy" dc:"更新者名称"`
|
||||
UpdateTime *gtime.Time `json:"updateTime" dc:"更新时间"`
|
||||
UpdateIp string `json:"updateIp" dc:"更新iP"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
Version string `json:"version" dc:"版本号"`
|
||||
DelFlag string `json:"delFlag" dc:"删除标签"`
|
||||
HandleType string `json:"handleType" dc:""`
|
||||
Params string `json:"params" dc:""`
|
||||
Name string `json:"name" dc:"配置名称"`
|
||||
Code string `json:"code" dc:"配置代码"`
|
||||
ApplicationRange string `json:"applicationRange" dc:""`
|
||||
IsDefault string `json:"isDefault" dc:"是否默认"`
|
||||
ResourceId string `json:"resourceId" dc:""`
|
||||
ResourceName string `json:"resourceName" dc:""`
|
||||
SystemDefinedId string `json:"systemDefinedId" dc:""`
|
||||
Sort string `json:"sort" dc:"排序"`
|
||||
SaveType string `json:"saveType" dc:""`
|
||||
Status string `json:"status" dc:"状态"`
|
||||
RecordLog string `json:"recordLog" dc:""`
|
||||
PortalConfigContent string `json:"content" dc:"配置内容"`
|
||||
}
|
||||
|
||||
type MemberInfoRes struct {
|
||||
DefaultPortalConfig []*PortalConfig `json:"defaultPortalConfig" description:"默认用户配置"`
|
||||
LincenseInfo string `json:"lincenseInfo" description:"应用版本号"`
|
||||
Permissions []string `json:"permissions"description:"权限"`
|
||||
Roles []string `json:"roles" description:"角色"`
|
||||
SysNoticeList []*entity.AdminNotice `json:"sysNoticeList" description:"系统公告"`
|
||||
UserPortalConfig []*PortalConfig `json:"userPortalConfig" description:"用户配置"`
|
||||
User model.Identity `json:"user" description:"用户信息"`
|
||||
DefaultPortalConfig []*PortalConfig `json:"defaultPortalConfig" dc:"默认用户配置"`
|
||||
LincenseInfo string `json:"lincenseInfo" dc:"应用版本号"`
|
||||
Permissions []string `json:"permissions"dc:"权限"`
|
||||
Roles []string `json:"roles" dc:"角色"`
|
||||
SysNoticeList []*entity.AdminNotice `json:"sysNoticeList" dc:"系统公告"`
|
||||
UserPortalConfig []*PortalConfig `json:"userPortalConfig" dc:"用户配置"`
|
||||
User model.Identity `json:"user" dc:"用户信息"`
|
||||
}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminForm
|
||||
|
||||
import (
|
||||
@@ -9,51 +15,51 @@ import (
|
||||
|
||||
// 菜单最大排序
|
||||
type MenuMaxSortReq struct {
|
||||
Id int64 `json:"id" description:"菜单ID"`
|
||||
g.Meta `path:"/menu/max_sort" method:"get" tags:"菜单" summary:"菜单最大排序"`
|
||||
Id int64 `json:"id" dc:"菜单ID"`
|
||||
}
|
||||
type MenuMaxSortRes struct {
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
// 菜单编码是否唯一
|
||||
type MenuCodeUniqueReq struct {
|
||||
Code string `json:"code" v:"required#菜单编码不能为空" description:"菜单编码"`
|
||||
Id int64 `json:"id" description:"菜单ID"`
|
||||
g.Meta `path:"/menu/code_unique" method:"get" tags:"菜单" summary:"菜单编码是否唯一"`
|
||||
Code string `json:"code" v:"required#菜单编码不能为空" dc:"菜单编码"`
|
||||
Id int64 `json:"id" dc:"菜单ID"`
|
||||
}
|
||||
type MenuCodeUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// 菜单名称是否唯一
|
||||
type MenuNameUniqueReq struct {
|
||||
Name string `json:"name" v:"required#菜单名称不能为空" description:"菜单名称"`
|
||||
Id int64 `json:"id" description:"菜单ID"`
|
||||
g.Meta `path:"/menu/name_unique" method:"get" tags:"菜单" summary:"菜单名称是否唯一"`
|
||||
Name string `json:"name" v:"required#菜单名称不能为空" dc:"菜单名称"`
|
||||
Id int64 `json:"id" dc:"菜单ID"`
|
||||
}
|
||||
type MenuNameUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// 修改/新增字典数据
|
||||
type MenuEditReq struct {
|
||||
entity.AdminMenu
|
||||
g.Meta `path:"/menu/edit" method:"post" tags:"菜单" summary:"修改/新增菜单"`
|
||||
entity.AdminMenu
|
||||
}
|
||||
type MenuEditRes struct{}
|
||||
|
||||
// 删除字典类型
|
||||
type MenuDeleteReq struct {
|
||||
Id interface{} `json:"id" v:"required#菜单ID不能为空" description:"菜单ID"`
|
||||
g.Meta `path:"/menu/delete" method:"post" tags:"菜单" summary:"删除菜单"`
|
||||
Id interface{} `json:"id" v:"required#菜单ID不能为空" dc:"菜单ID"`
|
||||
}
|
||||
type MenuDeleteRes struct{}
|
||||
|
||||
// 获取指定字典数据信息
|
||||
type MenuViewReq struct {
|
||||
Id string `json:"id" v:"required#菜单ID不能为空" description:"菜单ID"`
|
||||
g.Meta `path:"/menu/view" method:"get" tags:"菜单" summary:"获取指定菜单信息"`
|
||||
Id string `json:"id" v:"required#菜单ID不能为空" dc:"菜单ID"`
|
||||
}
|
||||
type MenuViewRes struct {
|
||||
*entity.AdminMenu
|
||||
@@ -61,32 +67,32 @@ type MenuViewRes struct {
|
||||
|
||||
// 获取菜单列表
|
||||
type MenuListReq struct {
|
||||
form.PageReq
|
||||
Pid int64 `json:"pid" description:"父ID"`
|
||||
g.Meta `path:"/menu/list" method:"get" tags:"菜单" summary:"获取菜单列表"`
|
||||
form.PageReq
|
||||
Pid int64 `json:"pid" dc:"父ID"`
|
||||
}
|
||||
|
||||
type MenuListRes struct {
|
||||
List []*entity.AdminMenu `json:"list" description:"数据列表"`
|
||||
List []*entity.AdminMenu `json:"list" dc:"数据列表"`
|
||||
form.PageRes
|
||||
}
|
||||
|
||||
// 查询菜单列表
|
||||
type MenuSearchListReq struct {
|
||||
Name string `json:"name" description:"菜单名称"`
|
||||
form.StatusReq
|
||||
g.Meta `path:"/menu/search_list" method:"get" tags:"菜单" summary:"获取菜单列表"`
|
||||
Name string `json:"name" dc:"菜单名称"`
|
||||
form.StatusReq
|
||||
}
|
||||
|
||||
type MenuSearchListRes []*model.TreeMenu
|
||||
|
||||
// 查询角色菜单列表
|
||||
type MenuRoleListReq struct {
|
||||
RoleId string `json:"role_id" description:"角色ID"`
|
||||
g.Meta `path:"/menu/role_list" method:"get" tags:"菜单" summary:"查询角色菜单列表"`
|
||||
RoleId string `json:"role_id" dc:"角色ID"`
|
||||
}
|
||||
|
||||
type MenuRoleListRes struct {
|
||||
Menus []*model.LabelTreeMenu `json:"menus" description:"菜单列表"`
|
||||
CheckedKeys []int64 `json:"checkedKeys" description:"选择的菜单ID"`
|
||||
Menus []*model.LabelTreeMenu `json:"menus" dc:"菜单列表"`
|
||||
CheckedKeys []int64 `json:"checkedKeys" dc:"选择的菜单ID"`
|
||||
}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminForm
|
||||
|
||||
import (
|
||||
@@ -9,32 +15,32 @@ import (
|
||||
|
||||
// 名称是否唯一
|
||||
type NoticeNameUniqueReq struct {
|
||||
Title string `json:"name" v:"required#公告名称不能为空" description:"公告名称"`
|
||||
Id int64 `json:"id" description:"公告ID"`
|
||||
g.Meta `path:"/notice/name_unique" method:"get" tags:"公告" summary:"公告名称是否唯一"`
|
||||
Title string `json:"name" v:"required#公告名称不能为空" dc:"公告名称"`
|
||||
Id int64 `json:"id" dc:"公告ID"`
|
||||
}
|
||||
type NoticeNameUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// 查询列表
|
||||
type NoticeListReq struct {
|
||||
g.Meta `path:"/notice/list" method:"get" tags:"公告" summary:"获取公告列表"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string `json:"name" description:"公告名称"`
|
||||
g.Meta `path:"/notice/list" method:"get" tags:"公告" summary:"获取公告列表"`
|
||||
Name string `json:"name" dc:"公告名称"`
|
||||
}
|
||||
|
||||
type NoticeListRes struct {
|
||||
List []*input.AdminNoticeListModel `json:"list" description:"数据列表"`
|
||||
List []*input.AdminNoticeListModel `json:"list" dc:"数据列表"`
|
||||
form.PageRes
|
||||
}
|
||||
|
||||
// 获取指定信息
|
||||
type NoticeViewReq struct {
|
||||
Id string `json:"id" v:"required#公告ID不能为空" description:"公告ID"`
|
||||
g.Meta `path:"/notice/view" method:"get" tags:"公告" summary:"获取指定信息"`
|
||||
Id string `json:"id" v:"required#公告ID不能为空" dc:"公告ID"`
|
||||
}
|
||||
type NoticeViewRes struct {
|
||||
*input.AdminNoticeViewModel
|
||||
@@ -42,23 +48,23 @@ type NoticeViewRes struct {
|
||||
|
||||
// 修改/新增
|
||||
type NoticeEditReq struct {
|
||||
entity.AdminNotice
|
||||
g.Meta `path:"/notice/edit" method:"post" tags:"公告" summary:"修改/新增公告"`
|
||||
entity.AdminNotice
|
||||
}
|
||||
type NoticeEditRes struct{}
|
||||
|
||||
// 删除
|
||||
type NoticeDeleteReq struct {
|
||||
Id interface{} `json:"id" v:"required#公告ID不能为空" description:"公告ID"`
|
||||
g.Meta `path:"/notice/delete" method:"post" tags:"公告" summary:"删除公告"`
|
||||
Id interface{} `json:"id" v:"required#公告ID不能为空" dc:"公告ID"`
|
||||
}
|
||||
type NoticeDeleteRes struct{}
|
||||
|
||||
// 最大排序
|
||||
type NoticeMaxSortReq struct {
|
||||
Id int64 `json:"id" description:"公告ID"`
|
||||
g.Meta `path:"/notice/max_sort" method:"get" tags:"公告" summary:"公告最大排序"`
|
||||
Id int64 `json:"id" dc:"公告ID"`
|
||||
}
|
||||
type NoticeMaxSortRes struct {
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminForm
|
||||
|
||||
import (
|
||||
@@ -9,22 +15,22 @@ import (
|
||||
|
||||
// 修改/新增字典数据
|
||||
type PostEditReq struct {
|
||||
entity.AdminPost
|
||||
g.Meta `path:"/post/edit" method:"post" tags:"岗位" summary:"修改/新增岗位"`
|
||||
entity.AdminPost
|
||||
}
|
||||
type PostEditRes struct{}
|
||||
|
||||
// 删除字典类型
|
||||
type PostDeleteReq struct {
|
||||
Id interface{} `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"`
|
||||
g.Meta `path:"/post/delete" method:"post" tags:"岗位" summary:"删除岗位"`
|
||||
Id interface{} `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"`
|
||||
}
|
||||
type PostDeleteRes struct{}
|
||||
|
||||
// 最大排序
|
||||
type PostMaxSortReq struct {
|
||||
Id int64 `json:"id" description:"岗位ID"`
|
||||
g.Meta `path:"/post/max_sort" method:"get" tags:"岗位" summary:"岗位最大排序"`
|
||||
Id int64 `json:"id" description:"岗位ID"`
|
||||
}
|
||||
type PostMaxSortRes struct {
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
@@ -32,12 +38,12 @@ type PostMaxSortRes struct {
|
||||
|
||||
// 获取列表
|
||||
type PostListReq struct {
|
||||
g.Meta `path:"/post/list" method:"get" tags:"岗位" summary:"获取岗位列表"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string `json:"name" description:"岗位名称"`
|
||||
Code string `json:"code" description:"岗位编码"`
|
||||
g.Meta `path:"/post/list" method:"get" tags:"岗位" summary:"获取岗位列表"`
|
||||
Name string `json:"name" description:"岗位名称"`
|
||||
Code string `json:"code" description:"岗位编码"`
|
||||
}
|
||||
|
||||
type PostListRes struct {
|
||||
@@ -47,8 +53,8 @@ type PostListRes struct {
|
||||
|
||||
// 获取指定信息
|
||||
type PostViewReq struct {
|
||||
Id string `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"`
|
||||
g.Meta `path:"/post/view" method:"get" tags:"岗位" summary:"获取指定信息"`
|
||||
Id string `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"`
|
||||
}
|
||||
type PostViewRes struct {
|
||||
*input.AdminPostViewModel
|
||||
@@ -56,9 +62,9 @@ type PostViewRes struct {
|
||||
|
||||
// 编码是否唯一
|
||||
type PostCodeUniqueReq struct {
|
||||
g.Meta `path:"/post/code_unique" method:"get" tags:"岗位" summary:"岗位编码是否唯一"`
|
||||
Code string `json:"code" v:"required#岗位编码不能为空" description:"岗位编码"`
|
||||
Id int64 `json:"id" description:"岗位ID"`
|
||||
g.Meta `path:"/post/code_unique" method:"get" tags:"岗位" summary:"岗位编码是否唯一"`
|
||||
}
|
||||
type PostCodeUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
@@ -66,9 +72,9 @@ type PostCodeUniqueRes struct {
|
||||
|
||||
// 名称是否唯一
|
||||
type PostNameUniqueReq struct {
|
||||
g.Meta `path:"/post/name_unique" method:"get" tags:"岗位" summary:"岗位名称是否唯一"`
|
||||
Name string `json:"name" v:"required#岗位名称不能为空" description:"岗位名称"`
|
||||
Id int64 `json:"id" description:"岗位ID"`
|
||||
g.Meta `path:"/post/name_unique" method:"get" tags:"岗位" summary:"岗位名称是否唯一"`
|
||||
}
|
||||
type PostNameUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
|
||||
@@ -14,6 +14,7 @@ import (
|
||||
|
||||
// 查询列表
|
||||
type RoleMemberListReq struct {
|
||||
g.Meta `path:"/role/member_list" method:"get" tags:"角色" summary:"获取角色下的会员列表"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
@@ -26,7 +27,6 @@ type RoleMemberListReq struct {
|
||||
EndTime string `json:"end_time" description:"结束时间"`
|
||||
Name string `json:"name" description:"岗位名称"`
|
||||
Code string `json:"code" description:"岗位编码"`
|
||||
g.Meta `path:"/role/member_list" method:"get" tags:"角色" summary:"获取角色下的会员列表"`
|
||||
}
|
||||
|
||||
type RoleMemberListRes struct {
|
||||
@@ -36,6 +36,7 @@ type RoleMemberListRes struct {
|
||||
|
||||
// 查询列表
|
||||
type RoleListReq struct {
|
||||
g.Meta `path:"/role/list" method:"get" tags:"角色" summary:"获取角色列表"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
@@ -47,7 +48,6 @@ type RoleListReq struct {
|
||||
EndTime string `json:"end_time" description:"结束时间"`
|
||||
Name string `json:"name" description:"岗位名称"`
|
||||
Code string `json:"code" description:"岗位编码"`
|
||||
g.Meta `path:"/role/list" method:"get" tags:"角色" summary:"获取角色列表"`
|
||||
}
|
||||
|
||||
type RoleListRes struct {
|
||||
|
||||
@@ -13,22 +13,22 @@ import (
|
||||
|
||||
// 获取lang信息
|
||||
type BaseLangReq struct {
|
||||
g.Meta `path:"/base/lang" method:"get" tags:"基础" summary:"获取lang信息"`
|
||||
L string `json:"l" v:"required#语言不能为空" description:"语言"`
|
||||
g.Meta `path:"/base/lang" method:"get" tags:"基础接口" summary:"获取lang信息"`
|
||||
L string `json:"l" v:"required#语言不能为空" dc:"语言"`
|
||||
}
|
||||
type BaseLangRes struct {
|
||||
}
|
||||
|
||||
// 获取登录验证码
|
||||
type IpLocationReq struct {
|
||||
g.Meta `path:"/base/ip_location" method:"get" tags:"基础" summary:"获取IP归属地信息"`
|
||||
Ip string `json:"ip" v:"required#ip不能为空" description:"ipv4地址"`
|
||||
g.Meta `path:"/base/ip_location" method:"get" tags:"基础接口" summary:"获取IP归属地信息"`
|
||||
Ip string `json:"ip" v:"required#ip不能为空" dc:"ipv4地址"`
|
||||
}
|
||||
type IpLocationRes struct {
|
||||
com.IpLocationData
|
||||
}
|
||||
|
||||
type ExportReq struct {
|
||||
g.Meta `path:"/base/export" method:"get" tags:"字典" summary:"导出字典类型"`
|
||||
g.Meta `path:"/base/export" method:"get" tags:"字典接口" summary:"导出字典类型"`
|
||||
}
|
||||
type ExportRes struct{}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package apiForm
|
||||
|
||||
import (
|
||||
@@ -7,7 +13,7 @@ import (
|
||||
|
||||
// 获取指定字典类型的属性数据
|
||||
type DictAttributeReq struct {
|
||||
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" description:"字典类型"`
|
||||
g.Meta `path:"/dict/attribute" method:"get" tags:"字典" summary:"获取指定字典类型的属性数据"`
|
||||
g.Meta `path:"/dict/attribute" method:"get" tags:"字典接口" summary:"获取指定字典类型的属性数据"`
|
||||
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" dc:"字典类型"`
|
||||
}
|
||||
type DictAttributeRes []*entity.SysDictData
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package apiForm
|
||||
|
||||
import (
|
||||
@@ -8,40 +14,40 @@ import (
|
||||
|
||||
// 清空日志
|
||||
type LogClearReq struct {
|
||||
g.Meta `path:"/log/clear" method:"post" tags:"日志" summary:"清空日志"`
|
||||
g.Meta `path:"/log/clear" method:"post" tags:"日志接口" summary:"清空日志"`
|
||||
}
|
||||
type LogClearRes struct{}
|
||||
|
||||
// 导出
|
||||
type LogExportReq struct {
|
||||
g.Meta `path:"/log/export" method:"get" tags:"日志接口" summary:"导出日志"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
Module string `json:"module" description:"应用端口"`
|
||||
MemberId int `json:"member_id" description:"用户ID"`
|
||||
TakeUpTime int `json:"take_up_time" description:"请求耗时"`
|
||||
Method string `json:"method" description:"请求方式"`
|
||||
Url string `json:"url" description:"请求路径"`
|
||||
Ip string `json:"ip" description:"访问IP"`
|
||||
ErrorCode string `json:"error_code" description:"状态码"`
|
||||
g.Meta `path:"/log/export" method:"get" tags:"日志" summary:"导出日志"`
|
||||
Module string `json:"module" dc:"应用端口"`
|
||||
MemberId int `json:"member_id" dc:"用户ID"`
|
||||
TakeUpTime int `json:"take_up_time" dc:"请求耗时"`
|
||||
Method string `json:"method" dc:"请求方式"`
|
||||
Url string `json:"url" dc:"请求路径"`
|
||||
Ip string `json:"ip" dc:"访问IP"`
|
||||
ErrorCode string `json:"error_code" dc:"状态码"`
|
||||
}
|
||||
type LogExportRes struct{}
|
||||
|
||||
// 获取菜单列表
|
||||
type LogListReq struct {
|
||||
g.Meta `path:"/log/list" method:"get" tags:"日志接口" summary:"获取日志列表"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
Module string `json:"module" description:"应用端口"`
|
||||
MemberId int `json:"member_id" description:"用户ID"`
|
||||
TakeUpTime int `json:"take_up_time" description:"请求耗时"`
|
||||
Method string `json:"method" description:"请求方式"`
|
||||
Url string `json:"url" description:"请求路径"`
|
||||
Ip string `json:"ip" description:"访问IP"`
|
||||
ErrorCode string `json:"error_code" description:"状态码"`
|
||||
g.Meta `path:"/log/list" method:"get" tags:"日志" summary:"获取日志列表"`
|
||||
Module string `json:"module" dc:"应用端口"`
|
||||
MemberId int `json:"member_id" dc:"用户ID"`
|
||||
TakeUpTime int `json:"take_up_time" dc:"请求耗时"`
|
||||
Method string `json:"method" dc:"请求方式"`
|
||||
Url string `json:"url" dc:"请求路径"`
|
||||
Ip string `json:"ip" dc:"访问IP"`
|
||||
ErrorCode string `json:"error_code" dc:"状态码"`
|
||||
}
|
||||
|
||||
type LogListRes struct {
|
||||
List []*input.LogListModel `json:"list" description:"数据列表"`
|
||||
List []*input.LogListModel `json:"list" dc:"数据列表"`
|
||||
form.PageRes
|
||||
}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package apiForm
|
||||
|
||||
import (
|
||||
@@ -7,31 +13,31 @@ import (
|
||||
|
||||
// 注销登录
|
||||
type LoginLogoutReq struct {
|
||||
g.Meta `path:"/login/logout" method:"get" tags:"登录" summary:"注销登录"`
|
||||
g.Meta `path:"/login/logout" method:"get" tags:"登录接口" summary:"注销登录"`
|
||||
}
|
||||
type LoginLogoutRes struct{}
|
||||
|
||||
// 登录效验
|
||||
type LoginCheckReq struct {
|
||||
g.Meta `path:"/login/check" method:"get" tags:"登录" summary:"登录效验"`
|
||||
g.Meta `path:"/login/check" method:"get" tags:"登录接口" summary:"登录效验"`
|
||||
}
|
||||
type LoginCheckRes struct {
|
||||
IsValidCodeLogin bool `json:"isValidCodeLogin" description:"是否验证码"`
|
||||
Message string `json:"message" description:"消息"`
|
||||
Result string `json:"result" description:"响应"`
|
||||
// Sessionid string `json:"sessionid" description:"sessionid"`
|
||||
IsValidCodeLogin bool `json:"isValidCodeLogin" dc:"是否验证码"`
|
||||
Message string `json:"message" dc:"消息"`
|
||||
Result string `json:"result" dc:"响应"`
|
||||
// Sessionid string `json:"sessionid" dc:"sessionid"`
|
||||
}
|
||||
|
||||
// 提交登录
|
||||
type LoginReq struct {
|
||||
g.Meta `path:"/login/sign" method:"post" tags:"登录" summary:"提交登录"`
|
||||
Username string `json:"username" v:"required#用户名不能为空" description:"用户名"`
|
||||
Password string `json:"password" v:"required#密码不能为空" description:"密码"`
|
||||
Cid string `json:"cid" v:"required#验证码ID不能为空" description:"验证码ID"`
|
||||
Code string `json:"code" v:"required#验证码不能为空" description:"验证码"`
|
||||
Device string `json:"device" description:"登录设备"`
|
||||
g.Meta `path:"/login/sign" method:"post" tags:"登录接口" summary:"提交登录"`
|
||||
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
|
||||
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
|
||||
Cid string `json:"cid" v:"required#验证码ID不能为空" dc:"验证码ID"`
|
||||
Code string `json:"code" v:"required#验证码不能为空" dc:"验证码"`
|
||||
Device string `json:"device" dc:"登录设备"`
|
||||
}
|
||||
type LoginRes struct {
|
||||
model.Identity
|
||||
Token string `json:"token" v:"" description:"登录token"`
|
||||
Token string `json:"token" dc:"登录token"`
|
||||
}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package apiForm
|
||||
|
||||
import (
|
||||
@@ -7,14 +13,14 @@ import (
|
||||
|
||||
// 获取登录用户的基本信息
|
||||
type MemberProfileReq struct {
|
||||
g.Meta `path:"/member/profile" method:"get" tags:"会员" summary:"获取登录用户的基本信息"`
|
||||
g.Meta `path:"/member/profile" method:"get" tags:"会员接口" summary:"获取登录用户的基本信息"`
|
||||
}
|
||||
type MemberProfileRes struct {
|
||||
PostGroup string `json:"postGroup" description:"岗位名称"`
|
||||
RoleGroup string `json:"roleGroup" description:"角色名称"`
|
||||
User *input.AdminMemberViewModel `json:"user" description:"用户基本信息"`
|
||||
SysDept *input.AdminDeptViewModel `json:"sysDept" description:"部门信息"`
|
||||
SysRoles []*input.AdminRoleListModel `json:"sysRoles" description:"角色列表"`
|
||||
PostIds int64 `json:"postIds" description:"当前岗位"`
|
||||
RoleIds int64 `json:"roleIds" description:"当前角色"`
|
||||
PostGroup string `json:"postGroup" dc:"岗位名称"`
|
||||
RoleGroup string `json:"roleGroup" dc:"角色名称"`
|
||||
User *input.AdminMemberViewModel `json:"user" dc:"用户基本信息"`
|
||||
SysDept *input.AdminDeptViewModel `json:"sysDept" dc:"部门信息"`
|
||||
SysRoles []*input.AdminRoleListModel `json:"sysRoles" dc:"角色列表"`
|
||||
PostIds int64 `json:"postIds" dc:"当前岗位"`
|
||||
RoleIds int64 `json:"roleIds" dc:"当前角色"`
|
||||
}
|
||||
|
||||
@@ -8,21 +8,21 @@ package form
|
||||
|
||||
// 分页
|
||||
type PageReq struct {
|
||||
Page int `json:"page" example:"10" d:"1" v:"min:1#页码最小值不能低于1" description:"当前页码"`
|
||||
Limit int `json:"limit" example:"1" d:"10" v:"min:1|max:100#|每页数量最小值不能低于1|最大值不能大于100" description:"每页数量"`
|
||||
Page int `json:"page" example:"10" d:"1" v:"min:1#页码最小值不能低于1" dc:"当前页码"`
|
||||
Limit int `json:"limit" example:"1" d:"10" v:"min:1|max:100#|每页数量最小值不能低于1|最大值不能大于100" dc:"每页数量"`
|
||||
}
|
||||
type PageRes struct {
|
||||
PageReq
|
||||
TotalCount int `json:"total_count" example:"0" description:"全部数据量"`
|
||||
TotalCount int `json:"total_count" example:"0" dc:"全部数据量"`
|
||||
}
|
||||
|
||||
// 时间查询
|
||||
type RangeDateReq struct {
|
||||
StartTime string `json:"start_time" v:"date#开始日期格式不正确" description:"开始日期"`
|
||||
EndTime string `json:"end_time" v:"date#结束日期格式不正确" description:"结束日期"`
|
||||
StartTime string `json:"start_time" v:"date#开始日期格式不正确" dc:"开始日期"`
|
||||
EndTime string `json:"end_time" v:"date#结束日期格式不正确" dc:"结束日期"`
|
||||
}
|
||||
|
||||
// 状态查询
|
||||
type StatusReq struct {
|
||||
Status int `json:"status" v:"in:0,1,2,3#状态可选范围:0~3" description:"状态"`
|
||||
Status int `json:"status" v:"in:0,1,2,3#状态可选范围:0~3" dc:"状态"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user