fix 路由分组、缓存应用前缀、代码生成文件选择覆盖、操作日志记录参数截取、重新打开页面头像不显示

This commit is contained in:
yxh 2024-03-18 10:20:23 +08:00
parent e75c7a55ff
commit 6f5d3f9120
149 changed files with 350 additions and 245 deletions

View File

@ -12,15 +12,15 @@ import (
) )
type CaptchaReq struct { type CaptchaReq struct {
g.Meta `path:"/get" tags:"验证码" method:"get" summary:"获取验证码"` g.Meta `path:"/get" tags:"通用接口/通用接口/验证码" method:"get" summary:"获取验证码"`
} }
type CaptchaV2Req struct { type CaptchaV2Req struct {
g.Meta `path:"/v2" tags:"验证码" method:"get" summary:"获取v2验证码"` g.Meta `path:"/v2" tags:"通用接口/通用接口/验证码" method:"get" summary:"获取v2验证码"`
} }
type CheckCaptchaV2Req struct { type CheckCaptchaV2Req struct {
g.Meta `path:"/v2Check" tags:"验证码" method:"post" summary:"检查v2验证码"` g.Meta `path:"/v2Check" tags:"通用接口/验证码" method:"post" summary:"检查v2验证码"`
Key string `json:"key"` Key string `json:"key"`
Dots string `json:"dots"` Dots string `json:"dots"`
} }

View File

@ -7,7 +7,7 @@ import (
// 上传文件 // 上传文件
type BigUploadReq struct { type BigUploadReq struct {
g.Meta `path:"/bigUpload/upload" tags:"后台大文件上传" method:"post" summary:"上传文件"` g.Meta `path:"/bigUpload/upload" tags:"系统后台/后台大文件上传" method:"post" summary:"上传文件"`
upload_chunk.UploadReq upload_chunk.UploadReq
} }
@ -17,7 +17,7 @@ type BigUploadRes struct {
// 上传文件检查 // 上传文件检查
type BigUploadCheckReq struct { type BigUploadCheckReq struct {
g.Meta `path:"/bigUpload/upload" tags:"后台大文件上传" method:"get" summary:"上传文件检查"` g.Meta `path:"/bigUpload/upload" tags:"系统后台/后台大文件上传" method:"get" summary:"上传文件检查"`
upload_chunk.UploadReq upload_chunk.UploadReq
} }
@ -29,7 +29,7 @@ type BigUploadCheckRes struct {
// 上传文件合并 // 上传文件合并
type BigUploadMergeReq struct { type BigUploadMergeReq struct {
g.Meta `path:"/bigUpload/uploadMerge" tags:"后台大文件上传" method:"post" summary:"上传文件合并"` g.Meta `path:"/bigUpload/uploadMerge" tags:"系统后台/后台大文件上传" method:"post" summary:"上传文件合并"`
upload_chunk.UploadReq upload_chunk.UploadReq
} }

View File

@ -13,7 +13,7 @@ import (
) )
type CacheRemoveReq struct { type CacheRemoveReq struct {
g.Meta `path:"/cache/remove" tags:"缓存管理" method:"delete" summary:"清除缓存"` g.Meta `path:"/cache/remove" tags:"系统后台/缓存管理" method:"delete" summary:"清除缓存"`
commonApi.Author commonApi.Author
} }

View File

@ -15,7 +15,7 @@ import (
) )
type PersonalInfoReq struct { type PersonalInfoReq struct {
g.Meta `path:"/personal/getPersonalInfo" tags:"用户管理" method:"get" summary:"登录用户信息"` g.Meta `path:"/personal/getPersonalInfo" tags:"系统后台/用户管理" method:"get" summary:"登录用户信息"`
commonApi.Author commonApi.Author
} }
@ -40,7 +40,7 @@ type SetPersonalReq struct {
// PersonalEditReq 修改个人 // PersonalEditReq 修改个人
type PersonalEditReq struct { type PersonalEditReq struct {
g.Meta `path:"/personal/edit" tags:"用户管理" method:"put" summary:"修改个人资料"` g.Meta `path:"/personal/edit" tags:"系统后台/用户管理" method:"put" summary:"修改个人资料"`
*SetPersonalReq *SetPersonalReq
commonApi.Author commonApi.Author
} }
@ -52,7 +52,7 @@ type PersonalEditRes struct {
} }
type PersonalResetPwdReq struct { type PersonalResetPwdReq struct {
g.Meta `path:"/personal/resetPwd" tags:"用户管理" method:"put" summary:"重置个人密码"` g.Meta `path:"/personal/resetPwd" tags:"系统后台/用户管理" method:"put" summary:"重置个人密码"`
Password string `p:"password" v:"required|password#密码不能为空|密码以字母开头只能包含字母、数字和下划线长度在6~18之间"` Password string `p:"password" v:"required|password#密码不能为空|密码以字母开头只能包含字母、数字和下划线长度在6~18之间"`
commonApi.Author commonApi.Author
} }

View File

@ -15,7 +15,7 @@ import (
) )
type RuleSearchReq struct { type RuleSearchReq struct {
g.Meta `path:"/menu/list" tags:"菜单管理" method:"get" summary:"菜单列表"` g.Meta `path:"/menu/list" tags:"系统后台/菜单管理" method:"get" summary:"菜单列表"`
commonApi.Author commonApi.Author
Title string `p:"menuName" ` Title string `p:"menuName" `
Component string `p:"component"` Component string `p:"component"`
@ -27,7 +27,7 @@ type RuleListRes struct {
} }
type RuleAddReq struct { type RuleAddReq struct {
g.Meta `path:"/menu/add" tags:"菜单管理" method:"post" summary:"添加菜单"` g.Meta `path:"/menu/add" tags:"系统后台/菜单管理" method:"post" summary:"添加菜单"`
commonApi.Author commonApi.Author
MenuType uint `p:"menuType" v:"min:0|max:2#菜单类型最小值为:min|菜单类型最大值为:max"` MenuType uint `p:"menuType" v:"min:0|max:2#菜单类型最小值为:min|菜单类型最大值为:max"`
Pid uint `p:"parentId" v:"min:0"` Pid uint `p:"parentId" v:"min:0"`
@ -53,7 +53,7 @@ type RuleAddRes struct {
} }
type RuleGetParamsReq struct { type RuleGetParamsReq struct {
g.Meta `path:"/menu/getParams" tags:"菜单管理" method:"get" summary:"获取添加、编辑菜单相关参数"` g.Meta `path:"/menu/getParams" tags:"系统后台/菜单管理" method:"get" summary:"获取添加、编辑菜单相关参数"`
commonApi.Author commonApi.Author
} }
@ -64,7 +64,7 @@ type RuleGetParamsRes struct {
} }
type RuleInfoReq struct { type RuleInfoReq struct {
g.Meta `path:"/menu/get" tags:"菜单管理" method:"get" summary:"获取菜单信息"` g.Meta `path:"/menu/get" tags:"系统后台/菜单管理" method:"get" summary:"获取菜单信息"`
commonApi.Author commonApi.Author
Id uint `p:"required#菜单id必须"` Id uint `p:"required#菜单id必须"`
} }
@ -76,7 +76,7 @@ type RuleInfoRes struct {
} }
type RuleUpdateReq struct { type RuleUpdateReq struct {
g.Meta `path:"/menu/update" tags:"菜单管理" method:"put" summary:"修改菜单"` g.Meta `path:"/menu/update" tags:"系统后台/菜单管理" method:"put" summary:"修改菜单"`
commonApi.Author commonApi.Author
Id uint `p:"id" v:"required#id必须"` Id uint `p:"id" v:"required#id必须"`
MenuType uint `p:"menuType" v:"min:0|max:2#菜单类型最小值为:min|菜单类型最大值为:max"` MenuType uint `p:"menuType" v:"min:0|max:2#菜单类型最小值为:min|菜单类型最大值为:max"`
@ -103,7 +103,7 @@ type RuleUpdateRes struct {
} }
type RuleDeleteReq struct { type RuleDeleteReq struct {
g.Meta `path:"/menu/delete" tags:"菜单管理" method:"delete" summary:"删除菜单"` g.Meta `path:"/menu/delete" tags:"系统后台/菜单管理" method:"delete" summary:"删除菜单"`
commonApi.Author commonApi.Author
Ids []int `p:"ids" v:"required#菜单id必须"` Ids []int `p:"ids" v:"required#菜单id必须"`
} }

View File

@ -30,7 +30,7 @@ type BigFileForm struct {
} }
type BigFileGetReq struct { type BigFileGetReq struct {
g.Meta `path:"/bigFile/get" tags:"大文件管理" method:"get" summary:"获取大文件信息"` g.Meta `path:"/bigFile/get" tags:"系统后台/大文件管理" method:"get" summary:"获取大文件信息"`
Id uint64 `p:"id"` Id uint64 `p:"id"`
} }
@ -40,7 +40,7 @@ type BigFileGetRes struct {
} }
type BigFileAddReq struct { type BigFileAddReq struct {
g.Meta `path:"/bigFile/add" tags:"大文件管理" method:"post" summary:"大文件新增"` g.Meta `path:"/bigFile/add" tags:"系统后台/大文件管理" method:"post" summary:"大文件新增"`
BigFileForm BigFileForm
} }
@ -48,7 +48,7 @@ type BigFileAddRes struct {
} }
type BigFileEditReq struct { type BigFileEditReq struct {
g.Meta `path:"/bigFile/edit" tags:"大文件管理" method:"put" summary:"大文件新增"` g.Meta `path:"/bigFile/edit" tags:"系统后台/大文件管理" method:"put" summary:"大文件新增"`
Id uint64 `p:"id" v:"required|min:1#主键ID不能为空|主键ID参数错误"` Id uint64 `p:"id" v:"required|min:1#主键ID不能为空|主键ID参数错误"`
Name string `p:"name" v:"required#标题必须"` Name string `p:"name" v:"required#标题必须"`
Describe string `p:"describe"` Describe string `p:"describe"`
@ -58,7 +58,7 @@ type BigFileEditRes struct {
} }
type BigFileDeleteReq struct { type BigFileDeleteReq struct {
g.Meta `path:"/bigFile/delete" tags:"大文件管理" method:"delete" summary:"大文件删除"` g.Meta `path:"/bigFile/delete" tags:"系统后台/大文件管理" method:"delete" summary:"大文件删除"`
Ids []uint64 `p:"ids"` Ids []uint64 `p:"ids"`
} }

View File

@ -14,7 +14,7 @@ import (
) )
type ConfigSearchReq struct { type ConfigSearchReq struct {
g.Meta `path:"/config/list" tags:"系统参数管理" method:"get" summary:"系统参数列表"` g.Meta `path:"/config/list" tags:"系统后台/系统参数管理" method:"get" summary:"系统参数列表"`
ConfigName string `p:"configName"` //参数名称 ConfigName string `p:"configName"` //参数名称
ConfigKey string `p:"configKey"` //参数键名 ConfigKey string `p:"configKey"` //参数键名
ConfigType string `p:"configType"` //状态 ConfigType string `p:"configType"` //状态
@ -36,7 +36,7 @@ type ConfigReq struct {
} }
type ConfigAddReq struct { type ConfigAddReq struct {
g.Meta `path:"/config/add" tags:"系统参数管理" method:"post" summary:"添加系统参数"` g.Meta `path:"/config/add" tags:"系统后台/系统参数管理" method:"post" summary:"添加系统参数"`
*ConfigReq *ConfigReq
} }
@ -44,7 +44,7 @@ type ConfigAddRes struct {
} }
type ConfigGetReq struct { type ConfigGetReq struct {
g.Meta `path:"/config/get" tags:"系统参数管理" method:"get" summary:"获取系统参数"` g.Meta `path:"/config/get" tags:"系统后台/系统参数管理" method:"get" summary:"获取系统参数"`
Id int `p:"id"` Id int `p:"id"`
} }
@ -54,7 +54,7 @@ type ConfigGetRes struct {
} }
type ConfigEditReq struct { type ConfigEditReq struct {
g.Meta `path:"/config/edit" tags:"系统参数管理" method:"put" summary:"修改系统参数"` g.Meta `path:"/config/edit" tags:"系统后台/系统参数管理" method:"put" summary:"修改系统参数"`
ConfigId int64 `p:"configId" v:"required|min:1#主键ID不能为空|主键ID参数错误"` ConfigId int64 `p:"configId" v:"required|min:1#主键ID不能为空|主键ID参数错误"`
*ConfigReq *ConfigReq
} }
@ -63,7 +63,7 @@ type ConfigEditRes struct {
} }
type ConfigDeleteReq struct { type ConfigDeleteReq struct {
g.Meta `path:"/config/delete" tags:"系统参数管理" method:"delete" summary:"删除系统参数"` g.Meta `path:"/config/delete" tags:"系统后台/系统参数管理" method:"delete" summary:"删除系统参数"`
Ids []int `p:"ids"` Ids []int `p:"ids"`
} }

View File

@ -14,7 +14,7 @@ import (
) )
type DeptSearchReq struct { type DeptSearchReq struct {
g.Meta `path:"/dept/list" tags:"部门管理" method:"get" summary:"部门列表"` g.Meta `path:"/dept/list" tags:"系统后台/部门管理" method:"get" summary:"部门列表"`
DeptName string `p:"deptName"` DeptName string `p:"deptName"`
Status string `p:"status"` Status string `p:"status"`
} }
@ -25,7 +25,7 @@ type DeptSearchRes struct {
} }
type DeptAddReq struct { type DeptAddReq struct {
g.Meta `path:"/dept/add" tags:"部门管理" method:"post" summary:"添加部门"` g.Meta `path:"/dept/add" tags:"系统后台/部门管理" method:"post" summary:"添加部门"`
ParentID int `p:"parentId" v:"required#父级不能为空"` ParentID int `p:"parentId" v:"required#父级不能为空"`
DeptName string `p:"deptName" v:"required#部门名称不能为空"` DeptName string `p:"deptName" v:"required#部门名称不能为空"`
OrderNum int `p:"orderNum" v:"required#排序不能为空"` OrderNum int `p:"orderNum" v:"required#排序不能为空"`
@ -39,7 +39,7 @@ type DeptAddRes struct {
} }
type DeptEditReq struct { type DeptEditReq struct {
g.Meta `path:"/dept/edit" tags:"部门管理" method:"put" summary:"修改部门"` g.Meta `path:"/dept/edit" tags:"系统后台/部门管理" method:"put" summary:"修改部门"`
DeptId int `p:"deptId" v:"required#deptId不能为空"` DeptId int `p:"deptId" v:"required#deptId不能为空"`
ParentID int `p:"parentId" v:"required#父级不能为空"` ParentID int `p:"parentId" v:"required#父级不能为空"`
DeptName string `p:"deptName" v:"required#部门名称不能为空"` DeptName string `p:"deptName" v:"required#部门名称不能为空"`
@ -54,7 +54,7 @@ type DeptEditRes struct {
} }
type DeptDeleteReq struct { type DeptDeleteReq struct {
g.Meta `path:"/dept/delete" tags:"部门管理" method:"delete" summary:"删除部门"` g.Meta `path:"/dept/delete" tags:"系统后台/部门管理" method:"delete" summary:"删除部门"`
Id uint64 `p:"id" v:"required#id不能为空"` Id uint64 `p:"id" v:"required#id不能为空"`
} }
@ -62,7 +62,7 @@ type DeptDeleteRes struct {
} }
type DeptTreeSelectReq struct { type DeptTreeSelectReq struct {
g.Meta `path:"/dept/treeSelect" tags:"部门管理" method:"get" summary:"获取部门树形菜单"` g.Meta `path:"/dept/treeSelect" tags:"系统后台/部门管理" method:"get" summary:"获取部门树形菜单"`
} }
type DeptTreeSelectRes struct { type DeptTreeSelectRes struct {

View File

@ -16,7 +16,7 @@ import (
// GetDictReq 获取字典信息请求参数 // GetDictReq 获取字典信息请求参数
type GetDictReq struct { type GetDictReq struct {
g.Meta `path:"/dict/data/getDictData" tags:"字典管理" method:"get" summary:"获取字典数据公共方法"` g.Meta `path:"/dict/data/getDictData" tags:"系统后台/字典管理" method:"get" summary:"获取字典数据公共方法"`
commonApi.Author commonApi.Author
DictType string `p:"dictType" v:"required#字典类型不能为空"` DictType string `p:"dictType" v:"required#字典类型不能为空"`
DefaultValue string `p:"defaultValue"` DefaultValue string `p:"defaultValue"`
@ -31,7 +31,7 @@ type GetDictRes struct {
// DictDataSearchReq 分页请求参数 // DictDataSearchReq 分页请求参数
type DictDataSearchReq struct { type DictDataSearchReq struct {
g.Meta `path:"/dict/data/list" tags:"字典管理" method:"get" summary:"字典数据列表"` g.Meta `path:"/dict/data/list" tags:"系统后台/字典管理" method:"get" summary:"字典数据列表"`
DictType string `p:"dictType"` //字典类型 DictType string `p:"dictType"` //字典类型
DictLabel string `p:"dictLabel"` //字典标签 DictLabel string `p:"dictLabel"` //字典标签
Status string `p:"status"` //状态 Status string `p:"status"` //状态
@ -58,7 +58,7 @@ type DictDataReq struct {
} }
type DictDataAddReq struct { type DictDataAddReq struct {
g.Meta `path:"/dict/data/add" tags:"字典管理" method:"post" summary:"添加字典数据"` g.Meta `path:"/dict/data/add" tags:"系统后台/字典管理" method:"post" summary:"添加字典数据"`
*DictDataReq *DictDataReq
} }
@ -66,7 +66,7 @@ type DictDataAddRes struct {
} }
type DictDataGetReq struct { type DictDataGetReq struct {
g.Meta `path:"/dict/data/get" tags:"字典管理" method:"get" summary:"获取字典数据"` g.Meta `path:"/dict/data/get" tags:"系统后台/字典管理" method:"get" summary:"获取字典数据"`
DictCode uint `p:"dictCode"` DictCode uint `p:"dictCode"`
} }
@ -76,7 +76,7 @@ type DictDataGetRes struct {
} }
type DictDataEditReq struct { type DictDataEditReq struct {
g.Meta `path:"/dict/data/edit" tags:"字典管理" method:"put" summary:"修改字典数据"` g.Meta `path:"/dict/data/edit" tags:"系统后台/字典管理" method:"put" summary:"修改字典数据"`
DictCode int `p:"dictCode" v:"required|min:1#主键ID不能为空|主键ID不能小于1"` DictCode int `p:"dictCode" v:"required|min:1#主键ID不能为空|主键ID不能小于1"`
*DictDataReq *DictDataReq
} }
@ -85,7 +85,7 @@ type DictDataEditRes struct {
} }
type DictDataDeleteReq struct { type DictDataDeleteReq struct {
g.Meta `path:"/dict/data/delete" tags:"字典管理" method:"delete" summary:"删除字典数据"` g.Meta `path:"/dict/data/delete" tags:"系统后台/字典管理" method:"delete" summary:"删除字典数据"`
Ids []int `p:"ids"` Ids []int `p:"ids"`
} }

View File

@ -15,7 +15,7 @@ import (
) )
type DictTypeSearchReq struct { type DictTypeSearchReq struct {
g.Meta `path:"/dict/type/list" tags:"字典管理" method:"get" summary:"字典类型列表"` g.Meta `path:"/dict/type/list" tags:"系统后台/字典管理" method:"get" summary:"字典类型列表"`
DictName string `p:"dictName"` //字典名称 DictName string `p:"dictName"` //字典名称
DictType string `p:"dictType"` //字典类型 DictType string `p:"dictType"` //字典类型
Status string `p:"status"` //字典状态 Status string `p:"status"` //字典状态
@ -29,7 +29,7 @@ type DictTypeSearchRes struct {
} }
type DictTypeAddReq struct { type DictTypeAddReq struct {
g.Meta `path:"/dict/type/add" tags:"字典管理" method:"post" summary:"添加字典类型"` g.Meta `path:"/dict/type/add" tags:"系统后台/字典管理" method:"post" summary:"添加字典类型"`
DictName string `p:"dictName" v:"required#字典名称不能为空"` DictName string `p:"dictName" v:"required#字典名称不能为空"`
DictType string `p:"dictType" v:"required#字典类型不能为空"` DictType string `p:"dictType" v:"required#字典类型不能为空"`
Status uint `p:"status" v:"required|in:0,1#状态不能为空|状态只能为0或1"` Status uint `p:"status" v:"required|in:0,1#状态不能为空|状态只能为0或1"`
@ -40,7 +40,7 @@ type DictTypeAddRes struct {
} }
type DictTypeGetReq struct { type DictTypeGetReq struct {
g.Meta `path:"/dict/type/get" tags:"字典管理" method:"get" summary:"获取字典类型"` g.Meta `path:"/dict/type/get" tags:"系统后台/字典管理" method:"get" summary:"获取字典类型"`
DictId uint `p:"dictId" v:"required#类型id不能为空"` DictId uint `p:"dictId" v:"required#类型id不能为空"`
} }
@ -50,7 +50,7 @@ type DictTypeGetRes struct {
} }
type DictTypeEditReq struct { type DictTypeEditReq struct {
g.Meta `path:"/dict/type/edit" tags:"字典管理" method:"put" summary:"修改字典类型"` g.Meta `path:"/dict/type/edit" tags:"系统后台/字典管理" method:"put" summary:"修改字典类型"`
DictId int64 `p:"dictId" v:"required|min:1#主键ID不能为空|主键ID必须为大于0的值"` DictId int64 `p:"dictId" v:"required|min:1#主键ID不能为空|主键ID必须为大于0的值"`
DictName string `p:"dictName" v:"required#字典名称不能为空"` DictName string `p:"dictName" v:"required#字典名称不能为空"`
DictType string `p:"dictType" v:"required#字典类型不能为空"` DictType string `p:"dictType" v:"required#字典类型不能为空"`
@ -62,7 +62,7 @@ type DictTypeEditRes struct {
} }
type DictTypeDeleteReq struct { type DictTypeDeleteReq struct {
g.Meta `path:"/dict/type/delete" tags:"字典管理" method:"delete" summary:"删除字典类型"` g.Meta `path:"/dict/type/delete" tags:"系统后台/字典管理" method:"delete" summary:"删除字典类型"`
DictIds []int `p:"dictIds" v:"required#字典类型id不能为空"` DictIds []int `p:"dictIds" v:"required#字典类型id不能为空"`
} }
@ -70,7 +70,7 @@ type DictTypeDeleteRes struct {
} }
type DictTypeAllReq struct { type DictTypeAllReq struct {
g.Meta `path:"/dict/type/optionSelect" tags:"字典管理" method:"get" summary:"获取字典选择框列表"` g.Meta `path:"/dict/type/optionSelect" tags:"系统后台/字典管理" method:"get" summary:"获取字典选择框列表"`
} }
type DictTYpeAllRes struct { type DictTYpeAllRes struct {

View File

@ -7,19 +7,19 @@ import (
) )
type DbInitIsInitReq struct { type DbInitIsInitReq struct {
g.Meta `path:"/dbInit/isInit" tags:"系统初始化" method:"get" summary:"系统初始化"` g.Meta `path:"/dbInit/isInit" tags:"系统后台/系统初始化" method:"get" summary:"系统初始化"`
} }
type DbInitIsInitRes bool type DbInitIsInitRes bool
type DbInitGetEnvInfoReq struct { type DbInitGetEnvInfoReq struct {
g.Meta `path:"/dbInit/getEnvInfo" tags:"系统初始化" method:"get" summary:"获取环境信息"` g.Meta `path:"/dbInit/getEnvInfo" tags:"系统后台/系统初始化" method:"get" summary:"获取环境信息"`
} }
type DbInitGetEnvInfoRes g.Map type DbInitGetEnvInfoRes g.Map
type DbInitCreateDbReq struct { type DbInitCreateDbReq struct {
g.Meta `path:"/dbInit/createDb" tags:"系统初始化" method:"post" summary:"创建配置文件"` g.Meta `path:"/dbInit/createDb" tags:"系统后台/系统初始化" method:"post" summary:"创建配置文件"`
DbHost string `json:"dbHost" p:"dbHost" v:"required#数据库地址必须"` DbHost string `json:"dbHost" p:"dbHost" v:"required#数据库地址必须"`
DbPort int `json:"dbPort" p:"dbPort" v:"required#数据库端口必须"` DbPort int `json:"dbPort" p:"dbPort" v:"required#数据库端口必须"`
DbUser string `json:"dbUser" p:"dbUser" v:"required#数据库用户名称必须"` DbUser string `json:"dbUser" p:"dbUser" v:"required#数据库用户名称必须"`

View File

@ -19,7 +19,7 @@ import (
// SysJobSearchReq 分页请求参数 // SysJobSearchReq 分页请求参数
type SysJobSearchReq struct { type SysJobSearchReq struct {
g.Meta `path:"/list" tags:"定时任务" method:"get" summary:"定时任务列表"` g.Meta `path:"/list" tags:"系统后台/定时任务" method:"get" summary:"定时任务列表"`
JobName string `p:"jobName"` //任务名称 JobName string `p:"jobName"` //任务名称
JobGroup string `p:"jobGroup"` //任务组名 JobGroup string `p:"jobGroup"` //任务组名
Status string `p:"status" v:"status@integer#状态需为整数"` //状态 Status string `p:"status" v:"status@integer#状态需为整数"` //状态
@ -36,7 +36,7 @@ type SysJobSearchRes struct {
// SysJobAddReq 添加操作请求参数 // SysJobAddReq 添加操作请求参数
type SysJobAddReq struct { type SysJobAddReq struct {
g.Meta `path:"/add" tags:"定时任务" method:"post" summary:"定时任务添加"` g.Meta `path:"/add" tags:"系统后台/定时任务" method:"post" summary:"定时任务添加"`
commonApi.Author commonApi.Author
JobName string `p:"jobName" v:"required#任务名称不能为空"` JobName string `p:"jobName" v:"required#任务名称不能为空"`
JobParams string `p:"jobParams" ` JobParams string `p:"jobParams" `
@ -56,7 +56,7 @@ type SysJobAddRes struct {
// SysJobEditReq 修改操作请求参数 // SysJobEditReq 修改操作请求参数
type SysJobEditReq struct { type SysJobEditReq struct {
g.Meta `path:"/edit" tags:"定时任务" method:"put" summary:"定时任务修改"` g.Meta `path:"/edit" tags:"系统后台/定时任务" method:"put" summary:"定时任务修改"`
commonApi.Author commonApi.Author
JobId uint64 `p:"jobId" v:"required#主键ID不能为空"` JobId uint64 `p:"jobId" v:"required#主键ID不能为空"`
JobName string `p:"jobName" v:"required#任务名称不能为空"` JobName string `p:"jobName" v:"required#任务名称不能为空"`
@ -77,7 +77,7 @@ type SysJobEditRes struct {
// SysJobGetReq 获取一条数据请求 // SysJobGetReq 获取一条数据请求
type SysJobGetReq struct { type SysJobGetReq struct {
g.Meta `path:"/get" tags:"定时任务" method:"get" summary:"获取定时任务信息"` g.Meta `path:"/get" tags:"系统后台/定时任务" method:"get" summary:"获取定时任务信息"`
commonApi.Author commonApi.Author
JobId uint64 `p:"jobId" v:"required#主键必须"` //通过主键获取 JobId uint64 `p:"jobId" v:"required#主键必须"` //通过主键获取
} }
@ -90,7 +90,7 @@ type SysJobGetRes struct {
// SysJobDeleteReq 删除数据请求 // SysJobDeleteReq 删除数据请求
type SysJobDeleteReq struct { type SysJobDeleteReq struct {
g.Meta `path:"/delete" tags:"定时任务" method:"delete" summary:"删除定时任务"` g.Meta `path:"/delete" tags:"系统后台/定时任务" method:"delete" summary:"删除定时任务"`
commonApi.Author commonApi.Author
JobIds []uint64 `p:"jobIds" v:"required#主键必须"` //通过主键删除 JobIds []uint64 `p:"jobIds" v:"required#主键必须"` //通过主键删除
} }
@ -101,7 +101,7 @@ type SysJobDeleteRes struct {
} }
type SysJobStartReq struct { type SysJobStartReq struct {
g.Meta `path:"/start" tags:"定时任务" method:"put" summary:"启动任务"` g.Meta `path:"/start" tags:"系统后台/定时任务" method:"put" summary:"启动任务"`
commonApi.Author commonApi.Author
JobId uint64 `p:"jobId" v:"required#jobId必须"` JobId uint64 `p:"jobId" v:"required#jobId必须"`
} }
@ -111,7 +111,7 @@ type SysJobStartRes struct {
} }
type SysJobStopReq struct { type SysJobStopReq struct {
g.Meta `path:"/stop" tags:"定时任务" method:"put" summary:"停止任务"` g.Meta `path:"/stop" tags:"系统后台/定时任务" method:"put" summary:"停止任务"`
commonApi.Author commonApi.Author
JobId uint64 `p:"jobId" v:"required#jobId必须"` JobId uint64 `p:"jobId" v:"required#jobId必须"`
} }
@ -121,7 +121,7 @@ type SysJobStopRes struct {
} }
type SysJobRunReq struct { type SysJobRunReq struct {
g.Meta `path:"/run" tags:"定时任务" method:"put" summary:"运行任务"` g.Meta `path:"/run" tags:"系统后台/定时任务" method:"put" summary:"运行任务"`
commonApi.Author commonApi.Author
JobId uint64 `p:"jobId" v:"required#jobId必须"` JobId uint64 `p:"jobId" v:"required#jobId必须"`
} }
@ -131,7 +131,7 @@ type SysJobRunRes struct {
} }
type SysJobLogListReq struct { type SysJobLogListReq struct {
g.Meta `path:"/logs" tags:"定时任务" method:"get" summary:"执行日志"` g.Meta `path:"/logs" tags:"系统后台/定时任务" method:"get" summary:"执行日志"`
commonApi.Author commonApi.Author
commonApi.PageReq commonApi.PageReq
TargetName string `p:"targetName" v:"required#targetName必须"` TargetName string `p:"targetName" v:"required#targetName必须"`
@ -144,7 +144,7 @@ type SysJobLogListRes struct {
} }
type SysJobLogDeleteReq struct { type SysJobLogDeleteReq struct {
g.Meta `path:"/deleteLogs" tags:"定时任务" method:"delete" summary:"删除执行日志"` g.Meta `path:"/deleteLogs" tags:"系统后台/定时任务" method:"delete" summary:"删除执行日志"`
commonApi.Author commonApi.Author
LogIds []uint64 `p:"logIds" v:"required#主键必须"` LogIds []uint64 `p:"logIds" v:"required#主键必须"`
} }

View File

@ -14,7 +14,7 @@ import (
) )
type UserLoginReq struct { type UserLoginReq struct {
g.Meta `path:"/login" tags:"登录" method:"post" summary:"用户登录"` g.Meta `path:"/login" tags:"系统后台/登录" method:"post" summary:"用户登录"`
Username string `p:"username" v:"required#用户名不能为空"` Username string `p:"username" v:"required#用户名不能为空"`
Password string `p:"password" v:"required#密码不能为空"` Password string `p:"password" v:"required#密码不能为空"`
VerifyCode string `p:"verifyCode"` VerifyCode string `p:"verifyCode"`
@ -30,7 +30,7 @@ type UserLoginRes struct {
} }
type UserLoginOutReq struct { type UserLoginOutReq struct {
g.Meta `path:"/logout" tags:"登录" method:"get" summary:"退出登录"` g.Meta `path:"/logout" tags:"系统后台/登录" method:"get" summary:"退出登录"`
commonApi.Author commonApi.Author
} }

View File

@ -15,7 +15,7 @@ import (
// LoginLogSearchReq 查询列表请求参数 // LoginLogSearchReq 查询列表请求参数
type LoginLogSearchReq struct { type LoginLogSearchReq struct {
g.Meta `path:"/loginLog/list" tags:"登录日志管理" method:"get" summary:"日志列表"` g.Meta `path:"/loginLog/list" tags:"系统后台/登录日志管理" method:"get" summary:"日志列表"`
LoginName string `p:"userName"` //登陆名 LoginName string `p:"userName"` //登陆名
Status string `p:"status"` //状态 Status string `p:"status"` //状态
Ipaddr string `p:"ipaddr"` //登录地址 Ipaddr string `p:"ipaddr"` //登录地址
@ -32,7 +32,7 @@ type LoginLogSearchRes struct {
} }
type LoginLogDelReq struct { type LoginLogDelReq struct {
g.Meta `path:"/loginLog/delete" tags:"登录日志管理" method:"delete" summary:"删除日志"` g.Meta `path:"/loginLog/delete" tags:"系统后台/登录日志管理" method:"delete" summary:"删除日志"`
Ids []int `p:"ids" v:"required#ids必须"` Ids []int `p:"ids" v:"required#ids必须"`
} }
@ -40,7 +40,7 @@ type LoginLogDelRes struct {
} }
type LoginLogClearReq struct { type LoginLogClearReq struct {
g.Meta `path:"/loginLog/clear" tags:"登录日志管理" method:"delete" summary:"清除日志"` g.Meta `path:"/loginLog/clear" tags:"系统后台/登录日志管理" method:"delete" summary:"清除日志"`
} }
type LoginLogClearRes struct { type LoginLogClearRes struct {

View File

@ -5,7 +5,7 @@ import (
) )
type MonitorSearchReq struct { type MonitorSearchReq struct {
g.Meta `path:"/monitor/server" tags:"服务监控" method:"get" summary:"服务监控"` g.Meta `path:"/monitor/server" tags:"系统后台/服务监控" method:"get" summary:"服务监控"`
} }
type MonitorSearchRes g.Map type MonitorSearchRes g.Map

View File

@ -17,7 +17,7 @@ import (
// SysNoticeSearchReq 分页请求参数 // SysNoticeSearchReq 分页请求参数
type SysNoticeSearchReq struct { type SysNoticeSearchReq struct {
g.Meta `path:"/list" tags:"通知私信" method:"get" summary:"通知公告列表(管理)"` g.Meta `path:"/list" tags:"系统后台/通知私信" method:"get" summary:"通知公告列表(管理)"`
commonApi.Author commonApi.Author
model.SysNoticeSearchReq model.SysNoticeSearchReq
} }
@ -30,7 +30,7 @@ type SysNoticeSearchRes struct {
// SysNoticeSearchReq 分页请求参数 // SysNoticeSearchReq 分页请求参数
type SysNoticeShowSearchReq struct { type SysNoticeShowSearchReq struct {
g.Meta `path:"/listShow" tags:"通知私信" method:"get" summary:"通知公告列表(浏览)"` g.Meta `path:"/listShow" tags:"系统后台/通知私信" method:"get" summary:"通知公告列表(浏览)"`
commonApi.Author commonApi.Author
model.SysNoticeSearchReq model.SysNoticeSearchReq
} }
@ -43,7 +43,7 @@ type SysNoticeShowSearchRes struct {
// SysNoticeAddReq 添加操作请求参数 // SysNoticeAddReq 添加操作请求参数
type SysNoticeAddReq struct { type SysNoticeAddReq struct {
g.Meta `path:"/add" tags:"通知私信" method:"post" summary:"通知公告添加"` g.Meta `path:"/add" tags:"系统后台/通知私信" method:"post" summary:"通知公告添加"`
commonApi.Author commonApi.Author
*model.SysNoticeAddReq *model.SysNoticeAddReq
} }
@ -55,7 +55,7 @@ type SysNoticeAddRes struct {
// SysNoticeEditReq 修改操作请求参数 // SysNoticeEditReq 修改操作请求参数
type SysNoticeEditReq struct { type SysNoticeEditReq struct {
g.Meta `path:"/edit" tags:"通知私信" method:"put" summary:"通知公告修改"` g.Meta `path:"/edit" tags:"系统后台/通知私信" method:"put" summary:"通知公告修改"`
commonApi.Author commonApi.Author
*model.SysNoticeEditReq *model.SysNoticeEditReq
} }
@ -67,7 +67,7 @@ type SysNoticeEditRes struct {
// SysNoticeGetReq 获取一条数据请求 // SysNoticeGetReq 获取一条数据请求
type SysNoticeGetReq struct { type SysNoticeGetReq struct {
g.Meta `path:"/get" tags:"通知私信" method:"get" summary:"获取通知公告信息"` g.Meta `path:"/get" tags:"系统后台/通知私信" method:"get" summary:"获取通知公告信息"`
commonApi.Author commonApi.Author
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取 Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
} }
@ -80,7 +80,7 @@ type SysNoticeGetRes struct {
// SysNoticeDeleteReq 删除数据请求 // SysNoticeDeleteReq 删除数据请求
type SysNoticeDeleteReq struct { type SysNoticeDeleteReq struct {
g.Meta `path:"/delete" tags:"通知私信" method:"delete" summary:"删除通知公告"` g.Meta `path:"/delete" tags:"系统后台/通知私信" method:"delete" summary:"删除通知公告"`
commonApi.Author commonApi.Author
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除 Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
} }
@ -91,7 +91,7 @@ type SysNoticeDeleteRes struct {
} }
type SysNoticeIndexDataReq struct { type SysNoticeIndexDataReq struct {
g.Meta `path:"getIndexData" tags:"通知私信" method:"get" summary:"获取首页通知预览数据"` g.Meta `path:"getIndexData" tags:"系统后台/通知私信" method:"get" summary:"获取首页通知预览数据"`
commonApi.Author commonApi.Author
} }
type SysNoticeIndexDataRes struct { type SysNoticeIndexDataRes struct {
@ -99,7 +99,7 @@ type SysNoticeIndexDataRes struct {
*model.SysNoticeIndexRes *model.SysNoticeIndexRes
} }
type SysNoticeUnReadCountReq struct { type SysNoticeUnReadCountReq struct {
g.Meta `path:"unReadCount" tags:"通知私信" method:"get" summary:"获取未读数量"` g.Meta `path:"unReadCount" tags:"系统后台/通知私信" method:"get" summary:"获取未读数量"`
commonApi.Author commonApi.Author
} }
type SysNoticeUnReadCountRes struct { type SysNoticeUnReadCountRes struct {
@ -109,7 +109,7 @@ type SysNoticeUnReadCountRes struct {
// SysNoticeShowSearchReq 通知展示分页请求参数 // SysNoticeShowSearchReq 通知展示分页请求参数
type SysNoticeUserSearchReq struct { type SysNoticeUserSearchReq struct {
g.Meta `path:"/userList" tags:"通知私信" method:"get" summary:"获取待指定的用户"` g.Meta `path:"/userList" tags:"系统后台/通知私信" method:"get" summary:"获取待指定的用户"`
commonApi.Author commonApi.Author
UserNickName string `p:"userNickname"` UserNickName string `p:"userNickname"`
} }
@ -122,7 +122,7 @@ type SysNoticeUserSearchRes struct {
// SysNoticeShowSearchReq 通知展示分页请求参数 // SysNoticeShowSearchReq 通知展示分页请求参数
type SysNoticeUserReadReq struct { type SysNoticeUserReadReq struct {
g.Meta `path:"/userList" tags:"通知私信" method:"get" summary:"获取待指定的用户"` g.Meta `path:"/userList" tags:"系统后台/通知私信" method:"get" summary:"获取待指定的用户"`
commonApi.Author commonApi.Author
string `p:"userNickName"` string `p:"userNickName"`
} }

View File

@ -17,7 +17,7 @@ import (
// SysNoticeReadSearchReq 分页请求参数 // SysNoticeReadSearchReq 分页请求参数
type SysNoticeReadSearchReq struct { type SysNoticeReadSearchReq struct {
g.Meta `path:"/list" tags:"已读记录" method:"get" summary:"已读记录列表"` g.Meta `path:"/list" tags:"系统后台/已读记录" method:"get" summary:"已读记录列表"`
commonApi.Author commonApi.Author
model.SysNoticeReadSearchReq model.SysNoticeReadSearchReq
} }
@ -30,7 +30,7 @@ type SysNoticeReadSearchRes struct {
// SysNoticeReadAddReq 添加操作请求参数 // SysNoticeReadAddReq 添加操作请求参数
type SysNoticeReadAddReq struct { type SysNoticeReadAddReq struct {
g.Meta `path:"/add" tags:"已读记录" method:"post" summary:"已读记录添加"` g.Meta `path:"/add" tags:"系统后台/已读记录" method:"post" summary:"已读记录添加"`
commonApi.Author commonApi.Author
*model.SysNoticeReadAddReq *model.SysNoticeReadAddReq
} }
@ -42,7 +42,7 @@ type SysNoticeReadAddRes struct {
// SysNoticeReadAddReq 添加操作请求参数 // SysNoticeReadAddReq 添加操作请求参数
type SysNoticeReadNoticeAddReq struct { type SysNoticeReadNoticeAddReq struct {
g.Meta `path:"/readNotice" tags:"已读记录" method:"post" summary:"已读记录"` g.Meta `path:"/readNotice" tags:"系统后台/已读记录" method:"post" summary:"已读记录"`
commonApi.Author commonApi.Author
*model.SysNoticeReadNoticeReq *model.SysNoticeReadNoticeReq
} }
@ -54,7 +54,7 @@ type SysNoticeReadNoticeAddRes struct {
// SysNoticeReadEditReq 修改操作请求参数 // SysNoticeReadEditReq 修改操作请求参数
type SysNoticeReadEditReq struct { type SysNoticeReadEditReq struct {
g.Meta `path:"/edit" tags:"已读记录" method:"put" summary:"已读记录修改"` g.Meta `path:"/edit" tags:"系统后台/已读记录" method:"put" summary:"已读记录修改"`
commonApi.Author commonApi.Author
*model.SysNoticeReadEditReq *model.SysNoticeReadEditReq
} }
@ -66,7 +66,7 @@ type SysNoticeReadEditRes struct {
// SysNoticeReadGetReq 获取一条数据请求 // SysNoticeReadGetReq 获取一条数据请求
type SysNoticeReadGetReq struct { type SysNoticeReadGetReq struct {
g.Meta `path:"/get" tags:"已读记录" method:"get" summary:"获取已读记录信息"` g.Meta `path:"/get" tags:"系统后台/已读记录" method:"get" summary:"获取已读记录信息"`
commonApi.Author commonApi.Author
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取 Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
} }
@ -79,7 +79,7 @@ type SysNoticeReadGetRes struct {
// SysNoticeReadDeleteReq 删除数据请求 // SysNoticeReadDeleteReq 删除数据请求
type SysNoticeReadDeleteReq struct { type SysNoticeReadDeleteReq struct {
g.Meta `path:"/delete" tags:"已读记录" method:"delete" summary:"删除已读记录"` g.Meta `path:"/delete" tags:"系统后台/已读记录" method:"delete" summary:"删除已读记录"`
commonApi.Author commonApi.Author
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除 Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
} }

View File

@ -15,7 +15,7 @@ import (
// SysOperLogSearchReq 分页请求参数 // SysOperLogSearchReq 分页请求参数
type SysOperLogSearchReq struct { type SysOperLogSearchReq struct {
g.Meta `path:"/operLog/list" tags:"操作日志" method:"get" summary:"操作日志列表"` g.Meta `path:"/operLog/list" tags:"系统后台/操作日志" method:"get" summary:"操作日志列表"`
Title string `p:"title"` //系统模块 Title string `p:"title"` //系统模块
RequestMethod string `p:"requestMethod"` //请求方式 RequestMethod string `p:"requestMethod"` //请求方式
OperName string `p:"operName"` //操作人员 OperName string `p:"operName"` //操作人员
@ -32,7 +32,7 @@ type SysOperLogSearchRes struct {
// SysOperLogGetReq 获取一条数据请求 // SysOperLogGetReq 获取一条数据请求
type SysOperLogGetReq struct { type SysOperLogGetReq struct {
g.Meta `path:"/operLog/get" tags:"操作日志" method:"get" summary:"获取操作日志信息"` g.Meta `path:"/operLog/get" tags:"系统后台/操作日志" method:"get" summary:"获取操作日志信息"`
commonApi.Author commonApi.Author
OperId uint64 `p:"operId" v:"required#主键必须"` //通过主键获取 OperId uint64 `p:"operId" v:"required#主键必须"` //通过主键获取
} }
@ -45,7 +45,7 @@ type SysOperLogGetRes struct {
// SysOperLogDeleteReq 删除数据请求 // SysOperLogDeleteReq 删除数据请求
type SysOperLogDeleteReq struct { type SysOperLogDeleteReq struct {
g.Meta `path:"/operLog/delete" tags:"操作日志" method:"delete" summary:"删除操作日志"` g.Meta `path:"/operLog/delete" tags:"系统后台/操作日志" method:"delete" summary:"删除操作日志"`
commonApi.Author commonApi.Author
OperIds []uint64 `p:"operIds" v:"required#主键必须"` //通过主键删除 OperIds []uint64 `p:"operIds" v:"required#主键必须"` //通过主键删除
} }
@ -56,7 +56,7 @@ type SysOperLogDeleteRes struct {
} }
type SysOperLogClearReq struct { type SysOperLogClearReq struct {
g.Meta `path:"/operLog/clear" tags:"操作日志" method:"delete" summary:"清除日志"` g.Meta `path:"/operLog/clear" tags:"系统后台/操作日志" method:"delete" summary:"清除日志"`
commonApi.Author commonApi.Author
} }

View File

@ -14,7 +14,7 @@ import (
) )
type PostSearchReq struct { type PostSearchReq struct {
g.Meta `path:"/post/list" tags:"岗位管理" method:"get" summary:"岗位列表"` g.Meta `path:"/post/list" tags:"系统后台/岗位管理" method:"get" summary:"岗位列表"`
PostCode string `p:"postCode"` //岗位编码 PostCode string `p:"postCode"` //岗位编码
PostName string `p:"postName"` //岗位名称 PostName string `p:"postName"` //岗位名称
Status string `p:"status"` //状态 Status string `p:"status"` //状态
@ -28,7 +28,7 @@ type PostSearchRes struct {
} }
type PostAddReq struct { type PostAddReq struct {
g.Meta `path:"/post/add" tags:"岗位管理" method:"post" summary:"添加岗位"` g.Meta `path:"/post/add" tags:"系统后台/岗位管理" method:"post" summary:"添加岗位"`
PostCode string `p:"postCode" v:"required#岗位编码不能为空"` PostCode string `p:"postCode" v:"required#岗位编码不能为空"`
PostName string `p:"postName" v:"required#岗位名称不能为空"` PostName string `p:"postName" v:"required#岗位名称不能为空"`
PostSort int `p:"postSort" v:"required#岗位排序不能为空"` PostSort int `p:"postSort" v:"required#岗位排序不能为空"`
@ -40,7 +40,7 @@ type PostAddRes struct {
} }
type PostEditReq struct { type PostEditReq struct {
g.Meta `path:"/post/edit" tags:"岗位管理" method:"put" summary:"修改岗位"` g.Meta `path:"/post/edit" tags:"系统后台/岗位管理" method:"put" summary:"修改岗位"`
PostId int64 `p:"postId" v:"required#id必须"` PostId int64 `p:"postId" v:"required#id必须"`
PostCode string `p:"postCode" v:"required#岗位编码不能为空"` PostCode string `p:"postCode" v:"required#岗位编码不能为空"`
PostName string `p:"postName" v:"required#岗位名称不能为空"` PostName string `p:"postName" v:"required#岗位名称不能为空"`
@ -53,7 +53,7 @@ type PostEditRes struct {
} }
type PostDeleteReq struct { type PostDeleteReq struct {
g.Meta `path:"/post/delete" tags:"岗位管理" method:"delete" summary:"删除岗位"` g.Meta `path:"/post/delete" tags:"系统后台/岗位管理" method:"delete" summary:"删除岗位"`
Ids []int `p:"ids"` Ids []int `p:"ids"`
} }

View File

@ -16,7 +16,7 @@ import (
) )
type RoleListReq struct { type RoleListReq struct {
g.Meta `path:"/role/list" tags:"角色管理" method:"get" summary:"角色列表"` g.Meta `path:"/role/list" tags:"系统后台/角色管理" method:"get" summary:"角色列表"`
RoleName string `p:"roleName"` //参数名称 RoleName string `p:"roleName"` //参数名称
Status string `p:"roleStatus"` //状态 Status string `p:"roleStatus"` //状态
commonApi.PageReq commonApi.PageReq
@ -29,7 +29,7 @@ type RoleListRes struct {
} }
type RoleGetParamsReq struct { type RoleGetParamsReq struct {
g.Meta `path:"/role/getParams" tags:"角色管理" method:"get" summary:"角色编辑参数"` g.Meta `path:"/role/getParams" tags:"系统后台/角色管理" method:"get" summary:"角色编辑参数"`
} }
type RoleGetParamsRes struct { type RoleGetParamsRes struct {
@ -39,7 +39,7 @@ type RoleGetParamsRes struct {
} }
type RoleAddReq struct { type RoleAddReq struct {
g.Meta `path:"/role/add" tags:"角色管理" method:"post" summary:"添加角色"` g.Meta `path:"/role/add" tags:"系统后台/角色管理" method:"post" summary:"添加角色"`
Pid uint `p:"pid"` Pid uint `p:"pid"`
Name string `p:"name" v:"required#角色名称不能为空"` Name string `p:"name" v:"required#角色名称不能为空"`
Status uint `p:"status" ` Status uint `p:"status" `
@ -47,25 +47,26 @@ type RoleAddReq struct {
Remark string `p:"remark" ` Remark string `p:"remark" `
MenuIds []uint `p:"menuIds"` MenuIds []uint `p:"menuIds"`
CreatedBy uint64 CreatedBy uint64
model.EffectiveTimeInfo
} }
type RoleAddRes struct { type RoleAddRes struct {
} }
type RoleGetReq struct { type RoleGetReq struct {
g.Meta `path:"/role/get" tags:"角色管理" method:"get" summary:"获取角色信息"` g.Meta `path:"/role/get" tags:"系统后台/角色管理" method:"get" summary:"获取角色信息"`
commonApi.Author commonApi.Author
Id uint `p:"id" v:"required#角色id不能为空""` Id uint `p:"id" v:"required#角色id不能为空""`
} }
type RoleGetRes struct { type RoleGetRes struct {
g.Meta `mime:"application/json"` g.Meta `mime:"application/json"`
Role *entity.SysRole `json:"role"` Role *model.RoleInfoRes `json:"role"`
MenuIds []int `json:"menuIds"` MenuIds []int `json:"menuIds"`
} }
type RoleEditReq struct { type RoleEditReq struct {
g.Meta `path:"/role/edit" tags:"角色管理" method:"put" summary:"修改角色"` g.Meta `path:"/role/edit" tags:"系统后台/角色管理" method:"put" summary:"修改角色"`
commonApi.Author commonApi.Author
Id int64 `p:"id" v:"required#角色id必须"` Id int64 `p:"id" v:"required#角色id必须"`
Pid uint `p:"pid"` Pid uint `p:"pid"`
@ -74,21 +75,23 @@ type RoleEditReq struct {
ListOrder uint `p:"listOrder" ` ListOrder uint `p:"listOrder" `
Remark string `p:"remark" ` Remark string `p:"remark" `
MenuIds []uint `p:"menuIds"` MenuIds []uint `p:"menuIds"`
model.EffectiveTimeInfo
} }
type RoleEditRes struct { type RoleEditRes struct {
} }
type RoleDeleteReq struct { type RoleDeleteReq struct {
g.Meta `path:"/role/delete" tags:"角色管理" method:"delete" summary:"删除角色"` g.Meta `path:"/role/delete" tags:"系统后台/角色管理" method:"delete" summary:"删除角色"`
Ids []int64 `p:"ids" v:"required#角色id不能为空"` Ids []int64 `p:"ids" v:"required#角色id不能为空"`
} }
type RoleDeleteRes struct { type RoleDeleteRes struct {
g.Meta `mime:"application/json"`
} }
type RoleDeptTreeSelectReq struct { type RoleDeptTreeSelectReq struct {
g.Meta `path:"/role/deptTreeSelect" tags:"角色管理" method:"get" summary:"获取角色数据权限"` g.Meta `path:"/role/deptTreeSelect" tags:"系统后台/角色管理" method:"get" summary:"获取部门树"`
commonApi.Author commonApi.Author
RoleId int64 `p:"roleId" v:"required#角色id必须"` RoleId int64 `p:"roleId" v:"required#角色id必须"`
} }
@ -99,9 +102,20 @@ type RoleDeptTreeSelectRes struct {
CheckedKeys []int64 `json:"checkedKeys"` CheckedKeys []int64 `json:"checkedKeys"`
} }
type RoleMenuTreeSelectReq struct {
g.Meta `path:"/role/menuTreeSelect" tags:"系统后台/角色管理" method:"get" summary:"获取菜单树"`
commonApi.Author
RoleId int64 `p:"roleId" v:"required#角色id必须"`
}
type RoleMenuTreeSelectRes struct {
g.Meta `mime:"application/json"`
Rules []*model.SysAuthRuleTreeRes `json:"rules"`
}
// DataScopeReq 角色数据授权参数 // DataScopeReq 角色数据授权参数
type DataScopeReq struct { type DataScopeReq struct {
g.Meta `path:"/role/dataScope" tags:"角色管理" method:"put" summary:"角色数据授权"` g.Meta `path:"/role/dataScope" tags:"系统后台/角色管理" method:"put" summary:"角色数据授权"`
RoleId uint `p:"roleId" v:"required#角色ID不能为空"` RoleId uint `p:"roleId" v:"required#角色ID不能为空"`
DataScope uint `p:"dataScope" v:"required#权限范围不能为空"` DataScope uint `p:"dataScope" v:"required#权限范围不能为空"`
DeptIds []uint `p:"deptIds"` DeptIds []uint `p:"deptIds"`

View File

@ -8,7 +8,7 @@ import (
) )
type UserMenusReq struct { type UserMenusReq struct {
g.Meta `path:"/user/getUserMenus" tags:"用户管理" method:"get" summary:"获取用户菜单"` g.Meta `path:"/user/getUserMenus" tags:"系统后台/用户管理" method:"get" summary:"获取用户菜单"`
commonApi.Author commonApi.Author
} }
@ -16,11 +16,12 @@ type UserMenusRes struct {
g.Meta `mime:"application/json"` g.Meta `mime:"application/json"`
MenuList []*model.UserMenus `json:"menuList"` MenuList []*model.UserMenus `json:"menuList"`
Permissions []string `json:"permissions"` Permissions []string `json:"permissions"`
UserInfo *model.LoginUserRes `json:"userInfo"`
} }
// UserSearchReq 用户搜索请求参数 // UserSearchReq 用户搜索请求参数
type UserSearchReq struct { type UserSearchReq struct {
g.Meta `path:"/user/list" tags:"用户管理" method:"get" summary:"用户列表"` g.Meta `path:"/user/list" tags:"系统后台/用户管理" method:"get" summary:"用户列表"`
DeptId string `p:"deptId"` //部门id DeptId string `p:"deptId"` //部门id
RoleId uint `p:"roleId"` RoleId uint `p:"roleId"`
Mobile string `p:"mobile"` Mobile string `p:"mobile"`
@ -37,7 +38,7 @@ type UserSearchRes struct {
} }
type UserGetParamsReq struct { type UserGetParamsReq struct {
g.Meta `path:"/user/params" tags:"用户管理" method:"get" summary:"用户维护参数获取"` g.Meta `path:"/user/params" tags:"系统后台/用户管理" method:"get" summary:"用户维护参数获取"`
} }
type UserGetParamsRes struct { type UserGetParamsRes struct {
@ -63,7 +64,7 @@ type SetUserReq struct {
// UserAddReq 添加用户参数 // UserAddReq 添加用户参数
type UserAddReq struct { type UserAddReq struct {
g.Meta `path:"/user/add" tags:"用户管理" method:"post" summary:"添加用户"` g.Meta `path:"/user/add" tags:"系统后台/用户管理" method:"post" summary:"添加用户"`
*SetUserReq *SetUserReq
UserName string `p:"userName" v:"required#用户账号不能为空"` UserName string `p:"userName" v:"required#用户账号不能为空"`
Password string `p:"password" v:"required|password#密码不能为空|密码以字母开头只能包含字母、数字和下划线长度在6~18之间"` Password string `p:"password" v:"required|password#密码不能为空|密码以字母开头只能包含字母、数字和下划线长度在6~18之间"`
@ -75,7 +76,7 @@ type UserAddRes struct {
// UserEditReq 修改用户参数 // UserEditReq 修改用户参数
type UserEditReq struct { type UserEditReq struct {
g.Meta `path:"/user/edit" tags:"用户管理" method:"put" summary:"修改用户"` g.Meta `path:"/user/edit" tags:"系统后台/用户管理" method:"put" summary:"修改用户"`
*SetUserReq *SetUserReq
UserId int64 `p:"userId" v:"required#用户id不能为空"` UserId int64 `p:"userId" v:"required#用户id不能为空"`
} }
@ -84,7 +85,7 @@ type UserEditRes struct {
} }
type UserGetEditReq struct { type UserGetEditReq struct {
g.Meta `path:"/user/getEdit" tags:"用户管理" method:"get" summary:"获取用户信息"` g.Meta `path:"/user/getEdit" tags:"系统后台/用户管理" method:"get" summary:"获取用户信息"`
Id uint64 `p:"id"` Id uint64 `p:"id"`
} }
@ -97,7 +98,7 @@ type UserGetEditRes struct {
// UserResetPwdReq 重置用户密码状态参数 // UserResetPwdReq 重置用户密码状态参数
type UserResetPwdReq struct { type UserResetPwdReq struct {
g.Meta `path:"/user/resetPwd" tags:"用户管理" method:"put" summary:"重置用户密码"` g.Meta `path:"/user/resetPwd" tags:"系统后台/用户管理" method:"put" summary:"重置用户密码"`
Id uint64 `p:"userId" v:"required#用户id不能为空"` Id uint64 `p:"userId" v:"required#用户id不能为空"`
Password string `p:"password" v:"required|password#密码不能为空|密码以字母开头只能包含字母、数字和下划线长度在6~18之间"` Password string `p:"password" v:"required|password#密码不能为空|密码以字母开头只能包含字母、数字和下划线长度在6~18之间"`
} }
@ -107,7 +108,7 @@ type UserResetPwdRes struct {
// UserStatusReq 设置用户状态参数 // UserStatusReq 设置用户状态参数
type UserStatusReq struct { type UserStatusReq struct {
g.Meta `path:"/user/setStatus" tags:"用户管理" method:"put" summary:"设置用户状态"` g.Meta `path:"/user/setStatus" tags:"系统后台/用户管理" method:"put" summary:"设置用户状态"`
Id uint64 `p:"userId" v:"required#用户id不能为空"` Id uint64 `p:"userId" v:"required#用户id不能为空"`
UserStatus uint `p:"status" v:"required#用户状态不能为空"` UserStatus uint `p:"status" v:"required#用户状态不能为空"`
} }
@ -116,7 +117,7 @@ type UserStatusRes struct {
} }
type UserDeleteReq struct { type UserDeleteReq struct {
g.Meta `path:"/user/delete" tags:"用户管理" method:"delete" summary:"删除用户"` g.Meta `path:"/user/delete" tags:"系统后台/用户管理" method:"delete" summary:"删除用户"`
Ids []int `p:"ids" v:"required#ids不能为空"` Ids []int `p:"ids" v:"required#ids不能为空"`
} }
@ -124,7 +125,7 @@ type UserDeleteRes struct {
} }
type UserSelectorReq struct { type UserSelectorReq struct {
g.Meta `path:"/user/selector" tags:"用户管理" method:"get" summary:"获取用户选择器"` g.Meta `path:"/user/selector" tags:"系统后台/用户管理" method:"get" summary:"获取用户选择器"`
DeptId string `p:"deptId"` //部门id DeptId string `p:"deptId"` //部门id
RoleId uint `p:"roleId"` RoleId uint `p:"roleId"`
Mobile string `p:"mobile"` Mobile string `p:"mobile"`
@ -141,7 +142,7 @@ type UserSelectorRes struct {
} }
type UserByIdsReq struct { type UserByIdsReq struct {
g.Meta `path:"/user/getUserByIds" tags:"用户管理" method:"get" summary:"根据ids获取用户"` g.Meta `path:"/user/getUserByIds" tags:"系统后台/用户管理" method:"get" summary:"根据ids获取用户"`
Ids []int `p:"ids" v:"required#ids不能为空"` Ids []int `p:"ids" v:"required#ids不能为空"`
commonApi.PageReq commonApi.PageReq
commonApi.Author commonApi.Author

View File

@ -15,7 +15,7 @@ import (
// SysUserOnlineSearchReq 列表搜索参数 // SysUserOnlineSearchReq 列表搜索参数
type SysUserOnlineSearchReq struct { type SysUserOnlineSearchReq struct {
g.Meta `path:"/online/list" tags:"在线用户管理" method:"get" summary:"列表"` g.Meta `path:"/online/list" tags:"系统后台/在线用户管理" method:"get" summary:"列表"`
Username string `p:"userName"` Username string `p:"userName"`
Ip string `p:"ipaddr"` Ip string `p:"ipaddr"`
commonApi.PageReq commonApi.PageReq
@ -30,7 +30,7 @@ type SysUserOnlineSearchRes struct {
} }
type SysUserOnlineForceLogoutReq struct { type SysUserOnlineForceLogoutReq struct {
g.Meta `path:"/online/forceLogout" tags:"在线用户管理" method:"delete" summary:"强制用户退出登录"` g.Meta `path:"/online/forceLogout" tags:"系统后台/在线用户管理" method:"delete" summary:"强制用户退出登录"`
commonApi.Author commonApi.Author
Ids []int `p:"ids" v:"required#ids不能为空"` Ids []int `p:"ids" v:"required#ids不能为空"`
} }

View File

@ -16,7 +16,7 @@ import (
// ToolsGenTableSearchReq 列表分页请求参数 // ToolsGenTableSearchReq 列表分页请求参数
type ToolsGenTableSearchReq struct { type ToolsGenTableSearchReq struct {
g.Meta `path:"/tools/gen/tableList" tags:"代码生成" method:"get" summary:"获取数据表"` g.Meta `path:"/tools/gen/tableList" tags:"系统后台/代码生成" method:"get" summary:"获取数据表"`
TableName string `p:"tableName"` //表名称 TableName string `p:"tableName"` //表名称
TableComment string `p:"tableComment"` //表描述 TableComment string `p:"tableComment"` //表描述
commonApi.PageReq commonApi.PageReq
@ -32,7 +32,7 @@ type ToolsGenTableSearchRes struct {
// ToolsGenTableImportSearchReq 要导入的表列表数据 // ToolsGenTableImportSearchReq 要导入的表列表数据
type ToolsGenTableImportSearchReq struct { type ToolsGenTableImportSearchReq struct {
g.Meta `path:"/tools/gen/dataList" tags:"代码生成" method:"get" summary:"获取需要导入的数据表"` g.Meta `path:"/tools/gen/dataList" tags:"系统后台/代码生成" method:"get" summary:"获取需要导入的数据表"`
TableName string `p:"tableName"` //表名称 TableName string `p:"tableName"` //表名称
TableComment string `p:"tableComment"` //表描述 TableComment string `p:"tableComment"` //表描述
commonApi.PageReq commonApi.PageReq
@ -41,19 +41,19 @@ type ToolsGenTableImportSearchReq struct {
// ToolsGenTableImportTableReq 导入表数据操作 // ToolsGenTableImportTableReq 导入表数据操作
type ToolsGenTableImportTableReq struct { type ToolsGenTableImportTableReq struct {
g.Meta `path:"/tools/gen/importTableSave" tags:"代码生成" method:"post" summary:"导入表结构操作"` g.Meta `path:"/tools/gen/importTableSave" tags:"系统后台/代码生成" method:"post" summary:"导入表结构操作"`
commonApi.Author commonApi.Author
Tables []string `p:"tables" v:"required#表名必须指定"` Tables []string `p:"tables" v:"required#表名必须指定"`
} }
type ToolsGenTableDeleteReq struct { type ToolsGenTableDeleteReq struct {
g.Meta `path:"/tools/gen/tableDelete" tags:"代码生成" method:"delete" summary:"删除已导入的表"` g.Meta `path:"/tools/gen/tableDelete" tags:"系统后台/代码生成" method:"delete" summary:"删除已导入的表"`
commonApi.Author commonApi.Author
Ids []int `p:"ids" v:"required#删除的id必须"` Ids []int `p:"ids" v:"required#删除的id必须"`
} }
type ToolsGenTableEditReq struct { type ToolsGenTableEditReq struct {
g.Meta `path:"/tools/gen/columnList" tags:"代码生成" method:"get" summary:"生成数据编辑"` g.Meta `path:"/tools/gen/columnList" tags:"系统后台/代码生成" method:"get" summary:"生成数据编辑"`
commonApi.Author commonApi.Author
TableId int64 `p:"tableId" v:"required#tableId字段必须"` TableId int64 `p:"tableId" v:"required#tableId字段必须"`
} }
@ -67,7 +67,7 @@ type ToolsGenTableEditRes struct {
// ToolsGenRelationTableReq 获取关联表数据 // ToolsGenRelationTableReq 获取关联表数据
type ToolsGenRelationTableReq struct { type ToolsGenRelationTableReq struct {
g.Meta `path:"/tools/gen/relationTable" tags:"代码生成" method:"get" summary:"获取关联表数据"` g.Meta `path:"/tools/gen/relationTable" tags:"系统后台/代码生成" method:"get" summary:"获取关联表数据"`
TableName string `p:"tableName"` //表名称 TableName string `p:"tableName"` //表名称
TableComment string `p:"tableComment"` //表描述 TableComment string `p:"tableComment"` //表描述
commonApi.PageReq commonApi.PageReq
@ -83,7 +83,7 @@ type ToolsGenRelationTableRes struct {
// ToolsGenTableColumnsEditReq 生成信息修改参数 // ToolsGenTableColumnsEditReq 生成信息修改参数
type ToolsGenTableColumnsEditReq struct { type ToolsGenTableColumnsEditReq struct {
g.Meta `path:"/tools/gen/editSave" tags:"代码生成" method:"post" summary:"生成信息修改保存"` g.Meta `path:"/tools/gen/editSave" tags:"系统后台/代码生成" method:"post" summary:"生成信息修改保存"`
commonApi.Author commonApi.Author
TableId int64 `p:"tableId" v:"required#主键ID不能为空"` TableId int64 `p:"tableId" v:"required#主键ID不能为空"`
TableName string `p:"tableName" v:"required#表名称不能为空"` TableName string `p:"tableName" v:"required#表名称不能为空"`
@ -92,7 +92,7 @@ type ToolsGenTableColumnsEditReq struct {
FunctionAuthor string `p:"functionAuthor" v:"required#作者不能为空"` FunctionAuthor string `p:"functionAuthor" v:"required#作者不能为空"`
TplCategory string `p:"tplCategory"` TplCategory string `p:"tplCategory"`
PackageName string `p:"packageName" v:"required#生成包路径不能为空"` PackageName string `p:"packageName" v:"required#生成包路径不能为空"`
ModuleName string `p:"moduleName" v:"required#生成模块名不能为空"` ModuleName string `p:"moduleName"`
BusinessName string `p:"businessName" v:"required#生成业务名不能为空"` BusinessName string `p:"businessName" v:"required#生成业务名不能为空"`
FunctionName string `p:"functionName" v:"required#生成功能名不能为空"` FunctionName string `p:"functionName" v:"required#生成功能名不能为空"`
Remark string `p:"remark"` Remark string `p:"remark"`
@ -109,6 +109,7 @@ type ToolsGenTableColumnsEditReq struct {
ExcelImp string `p:"excelImp"` ExcelImp string `p:"excelImp"`
UseSnowId string `p:"useSnowId"` UseSnowId string `p:"useSnowId"`
UseVirtual string `p:"useVirtual"` UseVirtual string `p:"useVirtual"`
OverwriteInfo []*entity.OverwriteInfo `p:"overwriteInfo"`
} }
type ToolsGenTableColumnsEditRes struct { type ToolsGenTableColumnsEditRes struct {
@ -116,7 +117,7 @@ type ToolsGenTableColumnsEditRes struct {
} }
type ToolsGenTablePreviewReq struct { type ToolsGenTablePreviewReq struct {
g.Meta `path:"/tools/gen/preview" tags:"代码生成" method:"get" summary:"代码预览"` g.Meta `path:"/tools/gen/preview" tags:"系统后台/代码生成" method:"get" summary:"代码预览"`
TableId int64 `p:"tableId" v:"required#表ID必须"` TableId int64 `p:"tableId" v:"required#表ID必须"`
} }
@ -126,7 +127,7 @@ type ToolsGenTablePreviewRes struct {
} }
type ToolsGenTableBatchGenCodeReq struct { type ToolsGenTableBatchGenCodeReq struct {
g.Meta `path:"/tools/gen/batchGenCode" tags:"代码生成" method:"post" summary:"代码生成"` g.Meta `path:"/tools/gen/batchGenCode" tags:"系统后台/代码生成" method:"post" summary:"代码生成"`
Ids []int `p:"ids" v:"required#ids必须且不能为空"` Ids []int `p:"ids" v:"required#ids必须且不能为空"`
} }
@ -135,7 +136,7 @@ type ToolsGenTableBatchGenCodeRes struct {
} }
type ToolsGenTableSyncTableReq struct { type ToolsGenTableSyncTableReq struct {
g.Meta `path:"/tools/gen/syncTable" tags:"代码生成" method:"post" summary:"同步表结构"` g.Meta `path:"/tools/gen/syncTable" tags:"系统后台/代码生成" method:"post" summary:"同步表结构"`
commonApi.Author commonApi.Author
TableId int64 `p:"tableId" v:"required#表ID必须"` TableId int64 `p:"tableId" v:"required#表ID必须"`
} }

View File

@ -13,12 +13,12 @@ import (
) )
type UEditorConfigReq struct { type UEditorConfigReq struct {
g.Meta `path:"/uEditor/action" tags:"UEditor" method:"get" summary:"获取UEditor配置"` g.Meta `path:"/uEditor/action" tags:"系统后台/UEditor" method:"get" summary:"获取UEditor配置"`
UEditorReq UEditorReq
} }
type UEditorUpFileReq struct { type UEditorUpFileReq struct {
g.Meta `path:"/uEditor/action" tags:"UEditor" method:"post" summary:"UEditor上传"` g.Meta `path:"/uEditor/action" tags:"系统后台/UEditor" method:"post" summary:"UEditor上传"`
UEditorReq UEditorReq
} }

View File

@ -7,13 +7,13 @@ import (
// 单图上传 // 单图上传
type UploadSingleImgReq struct { type UploadSingleImgReq struct {
g.Meta `path:"/upload/singleImg" tags:"后台文件上传" method:"post" summary:"上传图片"` g.Meta `path:"/upload/singleImg" tags:"系统后台/后台文件上传" method:"post" summary:"上传图片"`
File *ghttp.UploadFile `p:"file" type:"file" dc:"选择上传文件" v:"required#上传文件必须"` File *ghttp.UploadFile `p:"file" type:"file" dc:"选择上传文件" v:"required#上传文件必须"`
} }
// 单文件上传 // 单文件上传
type UploadSingleFileReq struct { type UploadSingleFileReq struct {
g.Meta `path:"/upload/singleFile" tags:"后台文件上传" method:"post" summary:"上传文件"` g.Meta `path:"/upload/singleFile" tags:"系统后台/后台文件上传" method:"post" summary:"上传文件"`
File *ghttp.UploadFile `p:"file" type:"file" dc:"选择上传文件" v:"required#上传文件必须"` File *ghttp.UploadFile `p:"file" type:"file" dc:"选择上传文件" v:"required#上传文件必须"`
} }
@ -24,13 +24,13 @@ type UploadSingleRes struct {
// 多图上传 // 多图上传
type UploadMultipleImgReq struct { type UploadMultipleImgReq struct {
g.Meta `path:"/upload/multipleImg" tags:"后台文件上传" method:"post" summary:"上传多图片"` g.Meta `path:"/upload/multipleImg" tags:"系统后台/后台文件上传" method:"post" summary:"上传多图片"`
File ghttp.UploadFiles `p:"file" type:"file" dc:"选择上传文件" v:"required#上传文件必须"` File ghttp.UploadFiles `p:"file" type:"file" dc:"选择上传文件" v:"required#上传文件必须"`
} }
// 多文件上传 // 多文件上传
type UploadMultipleFileReq struct { type UploadMultipleFileReq struct {
g.Meta `path:"/upload/multipleFile" tags:"后台文件上传" method:"post" summary:"上传多文件"` g.Meta `path:"/upload/multipleFile" tags:"系统后台/后台文件上传" method:"post" summary:"上传多文件"`
File ghttp.UploadFiles `p:"file" type:"file" dc:"选择上传文件" v:"required#上传文件必须"` File ghttp.UploadFiles `p:"file" type:"file" dc:"选择上传文件" v:"required#上传文件必须"`
} }

View File

@ -13,7 +13,7 @@ import (
) )
type DemoReq struct { type DemoReq struct {
g.Meta `path:"/demo" tags:"微信小程序测试" method:"get" summary:"测试"` g.Meta `path:"/demo" tags:"微信接口/小程序测试" method:"get" summary:"测试"`
common.Author common.Author
} }

View File

@ -14,7 +14,7 @@ import (
) )
type WxUrlReq struct { type WxUrlReq struct {
g.Meta `path:"/wxUrl" tags:"微信小程序登陆" method:"get" summary:"获取微信小程序url"` g.Meta `path:"/wxUrl" tags:"微信接口/小程序登陆" method:"get" summary:"获取微信小程序url"`
} }
type WxUrlRes struct { type WxUrlRes struct {
@ -23,7 +23,7 @@ type WxUrlRes struct {
} }
type WxLoginReq struct { type WxLoginReq struct {
g.Meta `path:"/wxLogin" tags:"微信小程序登陆" method:"post" summary:"微信登录"` g.Meta `path:"/wxLogin" tags:"微信接口/小程序登陆" method:"post" summary:"微信登录"`
Code string `p:"code" v:"required#code必须"` Code string `p:"code" v:"required#code必须"`
PhoneCode string `p:"phoneCode"` PhoneCode string `p:"phoneCode"`
} }
@ -35,10 +35,9 @@ type WxLoginRes struct {
} }
type UserLoginOutReq struct { type UserLoginOutReq struct {
g.Meta `path:"/logout" tags:"微信小程序登陆" method:"get" summary:"退出登录"` g.Meta `path:"/logout" tags:"微信接口/小程序登陆" method:"get" summary:"退出登录"`
commonApi.Author commonApi.Author
} }
type UserLoginOutRes struct { type UserLoginOutRes struct {
} }

2
go.mod
View File

@ -20,7 +20,7 @@ require (
github.com/shirou/gopsutil/v3 v3.23.2 github.com/shirou/gopsutil/v3 v3.23.2
github.com/sony/sonyflake v1.2.0 github.com/sony/sonyflake v1.2.0
github.com/tencentyun/cos-go-sdk-v5 v0.7.34 github.com/tencentyun/cos-go-sdk-v5 v0.7.34
github.com/tiger1103/gfast-cache v1.0.4 github.com/tiger1103/gfast-cache v1.0.5
github.com/tiger1103/gfast-token v1.0.6 github.com/tiger1103/gfast-token v1.0.6
github.com/wenlng/go-captcha v1.2.5 github.com/wenlng/go-captcha v1.2.5
github.com/xuri/excelize/v2 v2.7.1 github.com/xuri/excelize/v2 v2.7.1

4
go.sum
View File

@ -230,8 +230,8 @@ github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tiger1103/gfast-cache v1.0.4 h1:4SGmyDBMJeUUJ6dLiCGhRW76xT+uMvvQrBE6FLDW/3s= github.com/tiger1103/gfast-cache v1.0.5 h1:trKKR1uAtvwmIy/5lyVH8MHHyf3xsLYWJ+eM5ULrKos=
github.com/tiger1103/gfast-cache v1.0.4/go.mod h1:vnTD3ilVtcDgMdmNnd0EWYc+QZ4FinHchb1ke4jqPA8= github.com/tiger1103/gfast-cache v1.0.5/go.mod h1:vnTD3ilVtcDgMdmNnd0EWYc+QZ4FinHchb1ke4jqPA8=
github.com/tiger1103/gfast-token v1.0.6 h1:iRoj83KRPN3ZJbPrNpWjkSOjyBPDhndmTWoJvH7QxlI= github.com/tiger1103/gfast-token v1.0.6 h1:iRoj83KRPN3ZJbPrNpWjkSOjyBPDhndmTWoJvH7QxlI=
github.com/tiger1103/gfast-token v1.0.6/go.mod h1:oJZqtEwe8yXCk0GrlbYH87jIpwRdePjWBtr1AwMjr9o= github.com/tiger1103/gfast-token v1.0.6/go.mod h1:oJZqtEwe8yXCk0GrlbYH87jIpwRdePjWBtr1AwMjr9o=
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=

View File

@ -8,15 +8,18 @@
package consts package consts
const ( const (
// CachePrefix 应用缓存数据前缀
CachePrefix = "APP:"
CacheModelMem = "memory" CacheModelMem = "memory"
CacheModelRedis = "redis" CacheModelRedis = "redis"
CacheModelDist = "dist" CacheModelDist = "dist"
// CacheSysDict 字典缓存菜单KEY // CacheSysDict 字典缓存菜单KEY
CacheSysDict = "sysDict" CacheSysDict = CachePrefix + "sysDict"
// CacheSysDictTag 字典缓存标签 // CacheSysDictTag 字典缓存标签
CacheSysDictTag = "sysDictTag" CacheSysDictTag = CachePrefix + "sysDictTag"
// CacheSysConfigTag 系统参数配置 // CacheSysConfigTag 系统参数配置
CacheSysConfigTag = "sysConfigTag" CacheSysConfigTag = CachePrefix + "sysConfigTag"
) )

View File

@ -61,7 +61,7 @@ func (s *sSysDictData) GetDictWithDataByType(ctx context.Context, dictType, defa
value = dict value = dict
return return
}, 0, consts.CacheSysDictTag) }, 0, consts.CacheSysDictTag)
if iDict != nil { if !iDict.IsEmpty() {
err = gconv.Struct(iDict, &dict) err = gconv.Struct(iDict, &dict)
if err != nil { if err != nil {
return return

View File

@ -7,23 +7,25 @@
package consts package consts
import commonConsts "github.com/tiger1103/gfast/v3/internal/app/common/consts"
const ( const (
// CacheSysAuthMenu 缓存菜单key // CacheSysAuthMenu 缓存菜单key
CacheSysAuthMenu = "sysAuthMenu" CacheSysAuthMenu = commonConsts.CachePrefix + "sysAuthMenu"
// CacheSysDept 缓存部门key // CacheSysDept 缓存部门key
CacheSysDept = "sysDept" CacheSysDept = commonConsts.CachePrefix + "sysDept"
// CacheSysRole 角色缓存key // CacheSysRole 角色缓存key
CacheSysRole = "sysRole" CacheSysRole = commonConsts.CachePrefix + "sysRole"
// CacheSysWebSet 站点配置缓存key // CacheSysWebSet 站点配置缓存key
CacheSysWebSet = "sysWebSet" CacheSysWebSet = commonConsts.CachePrefix + "sysWebSet"
// CacheSysCmsMenu cms缓存key // CacheSysCmsMenu cms缓存key
CacheSysCmsMenu = "sysCmsMenu" CacheSysCmsMenu = commonConsts.CachePrefix + "sysCmsMenu"
// CacheSysAuthTag 权限缓存TAG标签 // CacheSysAuthTag 权限缓存TAG标签
CacheSysAuthTag = "sysAuthTag" CacheSysAuthTag = commonConsts.CachePrefix + "sysAuthTag"
// CacheSysModelTag 模型缓存标签 // CacheSysModelTag 模型缓存标签
CacheSysModelTag = "sysModelTag" CacheSysModelTag = commonConsts.CachePrefix + "sysModelTag"
// CacheSysCmsTag cms缓存标签 // CacheSysCmsTag cms缓存标签
CacheSysCmsTag = "sysCmsTag" CacheSysCmsTag = commonConsts.CachePrefix + "sysCmsTag"
) )

View File

@ -24,17 +24,18 @@ type cacheController struct {
BaseController BaseController
} }
func(c *cacheController)Remove(ctx context.Context,req *system.CacheRemoveReq)(res *system.CacheRemoveRes,err error){ func (c *cacheController) Remove(ctx context.Context, req *system.CacheRemoveReq) (res *system.CacheRemoveRes, err error) {
service.Cache().RemoveByTag(ctx,commonConsts.CacheSysDictTag) service.Cache().RemoveByTag(ctx, commonConsts.CacheSysDictTag)
service.Cache().RemoveByTag(ctx,commonConsts.CacheSysConfigTag) service.Cache().RemoveByTag(ctx, commonConsts.CacheSysConfigTag)
service.Cache().RemoveByTag(ctx,consts.CacheSysAuthTag) service.Cache().RemoveByTag(ctx, consts.CacheSysAuthTag)
cacheRedis := g.Cfg().MustGet(ctx,"system.cache.model").String() cacheRedis := g.Cfg().MustGet(ctx, "system.cache.model").String()
if cacheRedis == commonConsts.CacheModelRedis { if cacheRedis == commonConsts.CacheModelRedis {
cursor := 0 cursor := 0
cachePrefix:=g.Cfg().MustGet(ctx,"system.cache.prefix").String() cachePrefix := g.Cfg().MustGet(ctx, "system.cache.prefix").String()
cachePrefix += commonConsts.CachePrefix
for { for {
var v *gvar.Var var v *gvar.Var
v, err = g.Redis().Do(ctx,"scan", cursor, "match", cachePrefix+"*", "count", "100") v, err = g.Redis().Do(ctx, "scan", cursor, "match", cachePrefix+"*", "count", "100")
if err != nil { if err != nil {
return return
} }
@ -45,7 +46,7 @@ func(c *cacheController)Remove(ctx context.Context,req *system.CacheRemoveReq)(r
return return
} }
for _, d := range dataSlice { for _, d := range dataSlice {
_, err = g.Redis().Do(ctx,"del", d) _, err = g.Redis().Do(ctx, "del", d)
if err != nil { if err != nil {
return return
} }

View File

@ -10,6 +10,7 @@ package controller
import ( import (
"context" "context"
"github.com/tiger1103/gfast/v3/api/v1/system" "github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
"github.com/tiger1103/gfast/v3/internal/app/system/service" "github.com/tiger1103/gfast/v3/internal/app/system/service"
) )
@ -69,12 +70,23 @@ func (c *roleController) Delete(ctx context.Context, req *system.RoleDeleteReq)
return return
} }
// DeptTreeSelect 获取数据权限 // DeptTreeSelect 获取角色授权部门数据
func (c *roleController) DeptTreeSelect(ctx context.Context, req *system.RoleDeptTreeSelectReq) (res *system.RoleDeptTreeSelectRes, err error) { func (c *roleController) DeptTreeSelect(ctx context.Context, req *system.RoleDeptTreeSelectReq) (res *system.RoleDeptTreeSelectRes, err error) {
res, err = service.SysRole().RoleDeptTreeSelect(ctx, req.RoleId) res, err = service.SysRole().RoleDeptTreeSelect(ctx, req.RoleId)
return return
} }
// MenuTreeSelect 获取角色授权接口数据
func (c *roleController) MenuTreeSelect(ctx context.Context, req *system.RoleMenuTreeSelectReq) (res *system.RoleMenuTreeSelectRes, err error) {
var list []*model.SysAuthRuleInfoRes
res = &system.RoleMenuTreeSelectRes{
Rules: make([]*model.SysAuthRuleTreeRes, 0),
}
list, err = service.SysAuthRule().GetMenuListSearch(ctx, &system.RuleSearchReq{})
res.Rules = service.SysAuthRule().GetMenuListTree(0, list)
return
}
// RoleDataScope 设置角色数据权限 // RoleDataScope 设置角色数据权限
func (c *roleController) RoleDataScope(ctx context.Context, req *system.DataScopeReq) (res *system.DataScopeRes, err error) { func (c *roleController) RoleDataScope(ctx context.Context, req *system.DataScopeReq) (res *system.DataScopeRes, err error) {
err = service.SysRole().RoleDataScope(ctx, req) err = service.SysRole().RoleDataScope(ctx, req)

View File

@ -21,12 +21,14 @@ func (c *userController) GetUserMenus(ctx context.Context, req *system.UserMenus
var ( var (
permissions []string permissions []string
menuList []*model.UserMenus menuList []*model.UserMenus
loginUser = service.Context().GetLoginUser(ctx)
) )
userId := service.Context().GetUserId(ctx) userId := loginUser.Id
menuList, permissions, err = service.SysUser().GetAdminRules(ctx, userId) menuList, permissions, err = service.SysUser().GetAdminRules(ctx, userId)
res = &system.UserMenusRes{ res = &system.UserMenusRes{
MenuList: menuList, MenuList: menuList,
Permissions: permissions, Permissions: permissions,
UserInfo: loginUser.LoginUserRes,
} }
return return
} }

View File

@ -29,6 +29,7 @@ type SysRoleColumns struct {
CreatedAt string // 创建时间 CreatedAt string // 创建时间
UpdatedAt string // 更新时间 UpdatedAt string // 更新时间
CreatedBy string // 创建人 CreatedBy string // 创建人
EffectiveTime string //角色有效日期
} }
// sysRoleColumns holds the columns for table sys_role. // sysRoleColumns holds the columns for table sys_role.
@ -43,6 +44,7 @@ var sysRoleColumns = SysRoleColumns{
CreatedAt: "created_at", CreatedAt: "created_at",
UpdatedAt: "updated_at", UpdatedAt: "updated_at",
CreatedBy: "created_by", CreatedBy: "created_by",
EffectiveTime:"effective_time",
} }
// NewSysRoleDao creates and returns a new DAO object for table data access. // NewSysRoleDao creates and returns a new DAO object for table data access.

View File

@ -42,6 +42,7 @@ type ToolsGenTableColumns struct {
ExcelImp string // 是否有导入excel功能 ExcelImp string // 是否有导入excel功能
UseSnowId string //主键是否使用雪花ID UseSnowId string //主键是否使用雪花ID
UseVirtual string // 树表是否使用虚拟表 UseVirtual string // 树表是否使用虚拟表
OverwriteInfo string // 覆盖文件信息
} }
// toolsGenTableColumns holds the columns for table tools_gen_table. // toolsGenTableColumns holds the columns for table tools_gen_table.
@ -68,6 +69,7 @@ var toolsGenTableColumns = ToolsGenTableColumns{
ExcelImp: "excel_imp", ExcelImp: "excel_imp",
UseSnowId: "use_snow_id", UseSnowId: "use_snow_id",
UseVirtual: "use_virtual", UseVirtual: "use_virtual",
OverwriteInfo:"overwrite_info",
} }
// NewToolsGenTableDao creates and returns a new DAO object for table data access. // NewToolsGenTableDao creates and returns a new DAO object for table data access.

View File

@ -71,7 +71,7 @@ func (s *sSysAuthRule) GetMenuList(ctx context.Context) (list []*model.SysAuthRu
cache := commonService.Cache() cache := commonService.Cache()
//从缓存获取 //从缓存获取
iList := cache.GetOrSetFuncLock(ctx, consts.CacheSysAuthMenu, s.getMenuListFromDb, 0, consts.CacheSysAuthTag) iList := cache.GetOrSetFuncLock(ctx, consts.CacheSysAuthMenu, s.getMenuListFromDb, 0, consts.CacheSysAuthTag)
if iList != nil { if !iList.IsEmpty() {
err = gconv.Struct(iList, &list) err = gconv.Struct(iList, &list)
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
} }

View File

@ -65,7 +65,7 @@ func (s *sSysDept) GetFromCache(ctx context.Context) (list []*entity.SysDept, er
value = list value = list
return return
}, 0, consts.CacheSysAuthTag) }, 0, consts.CacheSysAuthTag)
if iList != nil { if !iList.IsEmpty() {
err = gconv.Struct(iList, &list) err = gconv.Struct(iList, &list)
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
} }

View File

@ -15,6 +15,7 @@ import (
"github.com/gogf/gf/v2/os/grpool" "github.com/gogf/gf/v2/os/grpool"
"github.com/gogf/gf/v2/os/gtime" "github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/text/gstr" "github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/tiger1103/gfast/v3/api/v1/system" "github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/consts" "github.com/tiger1103/gfast/v3/internal/app/system/consts"
"github.com/tiger1103/gfast/v3/internal/app/system/dao" "github.com/tiger1103/gfast/v3/internal/app/system/dao"
@ -105,7 +106,7 @@ func (s *sOperateLog) operationLogAdd(ctx context.Context, data *model.SysOperLo
OperIp: data.ClientIp, OperIp: data.ClientIp,
OperLocation: libUtils.GetCityByIp(data.ClientIp), OperLocation: libUtils.GetCityByIp(data.ClientIp),
OperTime: gtime.Now(), OperTime: gtime.Now(),
OperParam: data.Params, OperParam: gstr.SubStrRune(gconv.String(data.Params), 0, 60000),
} }
rawQuery := data.Url.RawQuery rawQuery := data.Url.RawQuery
if rawQuery != "" { if rawQuery != "" {

View File

@ -18,6 +18,7 @@ import (
commonService "github.com/tiger1103/gfast/v3/internal/app/common/service" commonService "github.com/tiger1103/gfast/v3/internal/app/common/service"
"github.com/tiger1103/gfast/v3/internal/app/system/consts" "github.com/tiger1103/gfast/v3/internal/app/system/consts"
"github.com/tiger1103/gfast/v3/internal/app/system/dao" "github.com/tiger1103/gfast/v3/internal/app/system/dao"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
"github.com/tiger1103/gfast/v3/internal/app/system/model/do" "github.com/tiger1103/gfast/v3/internal/app/system/model/do"
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity" "github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
"github.com/tiger1103/gfast/v3/internal/app/system/service" "github.com/tiger1103/gfast/v3/internal/app/system/service"
@ -76,7 +77,7 @@ func (s *sSysRole) GetRoleList(ctx context.Context) (list []*entity.SysRole, err
cache := commonService.Cache() cache := commonService.Cache()
//从缓存获取 //从缓存获取
iList := cache.GetOrSetFuncLock(ctx, consts.CacheSysRole, s.getRoleListFromDb, 0, consts.CacheSysAuthTag) iList := cache.GetOrSetFuncLock(ctx, consts.CacheSysRole, s.getRoleListFromDb, 0, consts.CacheSysAuthTag)
if iList != nil { if !iList.IsEmpty() {
err = gconv.Struct(iList, &list) err = gconv.Struct(iList, &list)
} }
return return
@ -129,7 +130,15 @@ func (s *sSysRole) AddRole(ctx context.Context, req *system.RoleAddReq) (err err
err = g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) error { err = g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
err = g.Try(ctx, func(ctx context.Context) { err = g.Try(ctx, func(ctx context.Context) {
req.CreatedBy = service.Context().GetUserId(ctx) req.CreatedBy = service.Context().GetUserId(ctx)
roleId, e := dao.SysRole.Ctx(ctx).TX(tx).InsertAndGetId(req) roleId, e := dao.SysRole.Ctx(ctx).TX(tx).InsertAndGetId(do.SysRole{
Pid: req.Pid,
Status: req.Status,
ListOrder: req.ListOrder,
Name: req.Name,
Remark: req.Remark,
CreatedBy: req.CreatedBy,
EffectiveTime: req.EffectiveTimeInfo,
})
liberr.ErrIsNil(ctx, e, "添加角色失败") liberr.ErrIsNil(ctx, e, "添加角色失败")
//过滤ruleIds 把没有权限的过滤掉 //过滤ruleIds 把没有权限的过滤掉
req.MenuIds, err = s.filterAccessRuleIds(ctx, req.MenuIds) req.MenuIds, err = s.filterAccessRuleIds(ctx, req.MenuIds)
@ -145,14 +154,19 @@ func (s *sSysRole) AddRole(ctx context.Context, req *system.RoleAddReq) (err err
return return
} }
func (s *sSysRole) Get(ctx context.Context, id uint) (res *entity.SysRole, err error) { func (s *sSysRole) Get(ctx context.Context, id uint) (res *model.RoleInfoRes, err error) {
err = g.Try(ctx, func(ctx context.Context) { err = g.Try(ctx, func(ctx context.Context) {
//判断是否具有此角色的权限 //判断是否具有此角色的权限
if !s.hasManageAccess(ctx, id, true) { if !s.hasManageAccess(ctx, id, true) {
liberr.ErrIsNil(ctx, errors.New("没有查看这个角色的权限")) liberr.ErrIsNil(ctx, errors.New("没有查看这个角色的权限"))
} }
err = dao.SysRole.Ctx(ctx).WherePri(id).Scan(&res) res = new(model.RoleInfoRes)
err = dao.SysRole.Ctx(ctx).WherePri(id).Scan(&res.SysRole)
liberr.ErrIsNil(ctx, err, "获取角色信息失败") liberr.ErrIsNil(ctx, err, "获取角色信息失败")
err = gconv.Struct(res.SysRole.EffectiveTime, &res.EffectiveTimeInfo)
if err != nil {
res.EffectiveTimeInfo = new(model.EffectiveTimeInfo)
}
}) })
return return
} }
@ -223,6 +237,7 @@ func (s *sSysRole) EditRole(ctx context.Context, req *system.RoleEditReq) (err e
ListOrder: req.ListOrder, ListOrder: req.ListOrder,
Name: req.Name, Name: req.Name,
Remark: req.Remark, Remark: req.Remark,
EffectiveTime: req.EffectiveTimeInfo,
}).Update() }).Update()
liberr.ErrIsNil(ctx, e, "修改角色失败") liberr.ErrIsNil(ctx, e, "修改角色失败")
//过滤ruleIds 把没有权限的过滤掉 //过滤ruleIds 把没有权限的过滤掉

View File

@ -424,12 +424,18 @@ func (s *sToolsGenTable) SaveEdit(ctx context.Context, req *system.ToolsGenTable
} }
if req.PackageName != "" { if req.PackageName != "" {
table.PackageName = req.PackageName table.PackageName = req.PackageName
//从包名中获取模块名
lastIndex := gstr.PosR(table.PackageName, "/")
if lastIndex != -1 {
table.ModuleName = gstr.SubStr(table.PackageName, lastIndex+1)
}
} }
if req.Remark != "" { if req.Remark != "" {
table.Remark = req.Remark table.Remark = req.Remark
} }
if req.Overwrite != "" { if req.Overwrite != "" {
table.Overwrite = gconv.Bool(req.Overwrite) table.Overwrite = gconv.Bool(req.Overwrite)
table.OverwriteInfo = req.OverwriteInfo
} }
if req.SortColumn != "" { if req.SortColumn != "" {
table.SortColumn = req.SortColumn table.SortColumn = req.SortColumn
@ -1084,60 +1090,64 @@ func (s *sToolsGenTable) GenCode(ctx context.Context, ids []int) (err error) {
packageName := extendData.PackageName packageName := extendData.PackageName
businessName := gstr.CaseCamelLower(extendData.BusinessName) businessName := gstr.CaseCamelLower(extendData.BusinessName)
modulePath := gstr.StrEx(extendData.PackageName, "internal/app/") modulePath := gstr.StrEx(extendData.PackageName, "internal/app/")
overwriteInfo := gmap.NewStrAnyMap()
for _, ov := range extendData.OverwriteInfo {
overwriteInfo.Set(ov.Key, ov.Value)
}
for key, code := range genData { for key, code := range genData {
switch key { switch key {
case "api": case "api":
path := strings.Join([]string{curDir, "/", apiName, "/", modulePath, "/", extendData.BusinessName, ".go"}, "") path := strings.Join([]string{curDir, "/", apiName, "/", modulePath, "/", extendData.BusinessName, ".go"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("api")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "controller": case "controller":
path := strings.Join([]string{curDir, "/", packageName, "/controller/", extendData.BusinessName, ".go"}, "") path := strings.Join([]string{curDir, "/", packageName, "/controller/", extendData.BusinessName, ".go"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("controller")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "dao": case "dao":
path := strings.Join([]string{curDir, "/", packageName, "/dao/", extendData.BusinessName, ".go"}, "") path := strings.Join([]string{curDir, "/", packageName, "/dao/", extendData.BusinessName, ".go"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("dao")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "dao_internal": case "dao_internal":
path := strings.Join([]string{curDir, "/", packageName, "/dao/internal/", extendData.BusinessName, ".go"}, "") path := strings.Join([]string{curDir, "/", packageName, "/dao/internal/", extendData.BusinessName, ".go"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("dao_internal")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "logic": case "logic":
path := strings.Join([]string{curDir, "/", packageName, "/logic/", businessName, "/", extendData.BusinessName, ".go"}, "") path := strings.Join([]string{curDir, "/", packageName, "/logic/", businessName, "/", extendData.BusinessName, ".go"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("logic")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "model": case "model":
path := strings.Join([]string{curDir, "/", packageName, "/model/", extendData.BusinessName, ".go"}, "") path := strings.Join([]string{curDir, "/", packageName, "/model/", extendData.BusinessName, ".go"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("model")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "model_do": case "model_do":
path := strings.Join([]string{curDir, "/", packageName, "/model/do/", extendData.BusinessName, ".go"}, "") path := strings.Join([]string{curDir, "/", packageName, "/model/do/", extendData.BusinessName, ".go"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("model_do")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "model_entity": case "model_entity":
path := strings.Join([]string{curDir, "/", packageName, "/model/entity/", extendData.BusinessName, ".go"}, "") path := strings.Join([]string{curDir, "/", packageName, "/model/entity/", extendData.BusinessName, ".go"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("model_entity")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "router": case "router":
if !gstr.ContainsI(packageName, "system") { // system 模块不生成router文件 if !gstr.ContainsI(packageName, "system") { // system 模块不生成router文件
path := strings.Join([]string{curDir, "/", packageName, "/router/router", ".go"}, "") path := strings.Join([]string{curDir, "/", packageName, "/router/router", ".go"}, "")
err = s.createFile(path, code, false) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("router")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
} }
case "router_func": case "router_func":
path := strings.Join([]string{curDir, "/", packageName, "/router/", extendData.BusinessName, ".go"}, "") path := strings.Join([]string{curDir, "/", packageName, "/router/", extendData.BusinessName, ".go"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("router_func")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "service": case "service":
path := strings.Join([]string{curDir, "/", packageName, "/service/", extendData.BusinessName, ".go"}, "") path := strings.Join([]string{curDir, "/", packageName, "/service/", extendData.BusinessName, ".go"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("service")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "sql": case "sql":
path := strings.Join([]string{curDir, "/resource/data/gen_sql/", modulePath, "/", extendData.BusinessName, ".sql"}, "") path := strings.Join([]string{curDir, "/resource/data/gen_sql/", modulePath, "/", extendData.BusinessName, ".sql"}, "")
hasSql := gfile.Exists(path) hasSql := gfile.Exists(path)
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("sql")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
if !hasSql || extendData.Overwrite { if !hasSql || gconv.Bool(overwriteInfo.Get("sql")) {
//第一次生成则向数据库写入菜单数据 //第一次生成则向数据库写入菜单数据
if s.IsPg() { if s.IsPg() {
content := gfile.GetContents(path) content := gfile.GetContents(path)
@ -1151,23 +1161,23 @@ func (s *sToolsGenTable) GenCode(ctx context.Context, ids []int) (err error) {
} }
case "tsApi": case "tsApi":
path := strings.Join([]string{frontDir, "/src/api/", modulePath, "/", businessName, ".ts"}, "") path := strings.Join([]string{frontDir, "/src/api/", modulePath, "/", businessName, ".ts"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("tsApi")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "tsModel": case "tsModel":
path := strings.Join([]string{frontDir, "/src/views/", modulePath, "/", businessName + "/list/component/model", ".ts"}, "") path := strings.Join([]string{frontDir, "/src/views/", modulePath, "/", businessName + "/list/component/model", ".ts"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("tsModel")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "vue": case "vue":
path := strings.Join([]string{frontDir, "/src/views/", modulePath, "/", businessName, "/list/index.vue"}, "") path := strings.Join([]string{frontDir, "/src/views/", modulePath, "/", businessName, "/list/index.vue"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("vue")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "vueDetail": case "vueDetail":
path := strings.Join([]string{frontDir, "/src/views/", modulePath, "/", businessName + "/list/component/detail", ".vue"}, "") path := strings.Join([]string{frontDir, "/src/views/", modulePath, "/", businessName + "/list/component/detail", ".vue"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("vueDetail")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
case "vueEdit": case "vueEdit":
path := strings.Join([]string{frontDir, "/src/views/", modulePath, "/", businessName + "/list/component/edit", ".vue"}, "") path := strings.Join([]string{frontDir, "/src/views/", modulePath, "/", businessName + "/list/component/edit", ".vue"}, "")
err = s.createFile(path, code, extendData.Overwrite) err = s.createFile(path, code, gconv.Bool(overwriteInfo.Get("vueEdit")))
liberr.ErrIsNil(ctx, err) liberr.ErrIsNil(ctx, err)
} }
} }

View File

@ -22,4 +22,5 @@ type SysRole struct {
CreatedAt *gtime.Time // 创建时间 CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间 UpdatedAt *gtime.Time // 更新时间
CreatedBy interface{} //创建人 CreatedBy interface{} //创建人
EffectiveTime interface{} //角色有效日期
} }

View File

@ -34,4 +34,5 @@ type ToolsGenTable struct {
ExcelImp interface{} // 是否有导入excel功能 ExcelImp interface{} // 是否有导入excel功能
UseSnowId interface{} //主键是否使用雪花ID UseSnowId interface{} //主键是否使用雪花ID
UseVirtual interface{} //树表是否使用虚拟表 UseVirtual interface{} //树表是否使用虚拟表
OverwriteInfo interface{} //覆盖文件信息
} }

View File

@ -21,4 +21,5 @@ type SysRole struct {
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"` UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
UserCnt uint `json:"userCnt" description:"用户数量"` UserCnt uint `json:"userCnt" description:"用户数量"`
CreatedBy uint64 `json:"createdBy" orm:"created_by" description:"创建人"` CreatedBy uint64 `json:"createdBy" orm:"created_by" description:"创建人"`
EffectiveTime string `json:"effectiveTime" orm:"effective_time" description:"角色有效日期"`
} }

View File

@ -32,4 +32,5 @@ type ToolsGenTable struct {
ExcelImp bool `json:"excelImp" description:"是否有excel导入功能"` ExcelImp bool `json:"excelImp" description:"是否有excel导入功能"`
UseSnowId bool `json:"useSnowId" description:"主键是否使用雪花ID"` UseSnowId bool `json:"useSnowId" description:"主键是否使用雪花ID"`
UseVirtual bool `json:"useVirtual" orm:"use_virtual" description:"树表是否使用虚拟表"` UseVirtual bool `json:"useVirtual" orm:"use_virtual" description:"树表是否使用虚拟表"`
OverwriteInfo []*OverwriteInfo `json:"overwriteInfo" orm:"overwrite_info" description:"覆盖文件信息"`
} }

View File

@ -0,0 +1,13 @@
/*
* @desc:xxxx功能描述
* @company:云南奇讯科技有限公司
* @Author: yixiaohu<yxh669@qq.com>
* @Date: 2024/3/15 10:53
*/
package entity
type OverwriteInfo struct {
Key string `json:"key"`
Value bool `json:"value"`
}

View File

@ -6,3 +6,20 @@
*/ */
package model package model
import (
"github.com/gogf/gf/v2/os/gtime"
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
)
type EffectiveTimeInfo struct {
EffectiveType int `json:"effectiveType"`
WeekDay []int `json:"weekDay"`
DayRange []*gtime.Time `json:"dayRange"`
DateRange []*gtime.Time `json:"dateRange"`
}
type RoleInfoRes struct {
*entity.SysRole
*EffectiveTimeInfo
}

View File

@ -32,6 +32,7 @@ type ToolsGenTableEx struct {
UpdateTime *gtime.Time // 更新时间 UpdateTime *gtime.Time // 更新时间
Remark string // 备注 Remark string // 备注
Overwrite bool // 是否覆盖原有文件 Overwrite bool // 是否覆盖原有文件
OverwriteInfo []*entity.OverwriteInfo //覆盖文件信息
SortColumn string // 缺省排序字段 SortColumn string // 缺省排序字段
SortType string // 缺省排序方式 (asc顺序 desc倒序) SortType string // 缺省排序方式 (asc顺序 desc倒序)
ShowDetail bool // 是否有查看详情功能 ShowDetail bool // 是否有查看详情功能

View File

@ -7,6 +7,7 @@ package service
import ( import (
"context" "context"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
"github.com/tiger1103/gfast/v3/api/v1/system" "github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity" "github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
@ -19,7 +20,7 @@ type (
AddRoleRule(ctx context.Context, ruleIds []uint, roleId int64) (err error) AddRoleRule(ctx context.Context, ruleIds []uint, roleId int64) (err error)
DelRoleRule(ctx context.Context, roleId int64) (err error) DelRoleRule(ctx context.Context, roleId int64) (err error)
AddRole(ctx context.Context, req *system.RoleAddReq) (err error) AddRole(ctx context.Context, req *system.RoleAddReq) (err error)
Get(ctx context.Context, id uint) (res *entity.SysRole, err error) Get(ctx context.Context, id uint) (res *model.RoleInfoRes, err error)
GetFilteredNamedPolicy(ctx context.Context, id uint) (gpSlice []int, err error) GetFilteredNamedPolicy(ctx context.Context, id uint) (gpSlice []int, err error)
EditRole(ctx context.Context, req *system.RoleEditReq) (err error) EditRole(ctx context.Context, req *system.RoleEditReq) (err error)
DeleteByIds(ctx context.Context, ids []int64) (err error) DeleteByIds(ctx context.Context, ids []int64) (err error)

View File

@ -13,7 +13,7 @@ const (
<link rel="icon" href="{SwaggerUIDocNamePlaceHolder}/doc/favicon.ico" /> <link rel="icon" href="{SwaggerUIDocNamePlaceHolder}/doc/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title> <title></title>
<script type="module" crossorigin src="{SwaggerUIDocNamePlaceHolder}/doc/webjars/js/doc-7814a93f.js"></script> <script type="module" crossorigin src="{SwaggerUIDocNamePlaceHolder}/doc/webjars/js/doc-30bb18f4.js"></script>
<link rel="stylesheet" href="{SwaggerUIDocNamePlaceHolder}/doc/webjars/css/doc-e469198e.css"> <link rel="stylesheet" href="{SwaggerUIDocNamePlaceHolder}/doc/webjars/css/doc-e469198e.css">
</head> </head>
<body> <body>

View File

@ -9,5 +9,5 @@ package consts
const ( const (
Logo = `CiAgIF9fX19fX19fX19fXyAgICAgICAgICAgX18gCiAgLyBfX19fLyBfX19fL19fXyBfX19fX18vIC9fCiAvIC8gX18vIC9fICAvIF9fIGAvIF9fXy8gX18vCi8gL18vIC8gX18vIC8gL18vIChfXyAgKSAvXyAgClxfX19fL18vICAgIFxfXyxfL19fX18vXF9fLyAg` Logo = `CiAgIF9fX19fX19fX19fXyAgICAgICAgICAgX18gCiAgLyBfX19fLyBfX19fL19fXyBfX19fX18vIC9fCiAvIC8gX18vIC9fICAvIF9fIGAvIF9fXy8gX18vCi8gL18vIC8gX18vIC8gL18vIChfXyAgKSAvXyAgClxfX19fL18vICAgIFxfXyxfL19fX18vXF9fLyAg`
Version = "3.2.19" Version = "3.2.20"
) )

View File

@ -72,6 +72,7 @@ system:
model: "dist" #缓存模式 memory OR redis OR dist model: "dist" #缓存模式 memory OR redis OR dist
distPath: "./resource/data/distCacheDb" #使用磁盘缓存时配置数据缓存的目录 distPath: "./resource/data/distCacheDb" #使用磁盘缓存时配置数据缓存的目录
prefix: "gFastV3Cache:" #缓存前缀 prefix: "gFastV3Cache:" #缓存前缀
verifyStatus: 1 #0关闭验证码 1图形验证码 2交互验证码
#casbin配置 #casbin配置
casbin: casbin:

View File

@ -1 +1 @@
import{l as i,B as l}from"./doc-7814a93f.js";var u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const p=u;function o(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(e).filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),r.forEach(function(c){f(n,c,e[c])})}return n}function f(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var a=function(t,e){var r=o({},t,e.attrs);return i(l,o({},r,{icon:p}),null)};a.displayName="CopyOutlined";a.inheritAttrs=!1;const d=a;export{d as C}; import{l as i,B as l}from"./doc-30bb18f4.js";var u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const p=u;function o(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(e).filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),r.forEach(function(c){f(n,c,e[c])})}return n}function f(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var a=function(t,e){var r=o({},t,e.attrs);return i(l,o({},r,{icon:p}),null)};a.displayName="CopyOutlined";a.inheritAttrs=!1;const d=a;export{d as C};

View File

@ -1 +1 @@
import{_ as d,o as r,j as n,t as s,l as u,w as _,k as v,F as h,v as p,p as f,a0 as y}from"./doc-7814a93f.js";const g={name:"DataType",props:{text:{type:String,default:"string",required:!0},record:{type:Object,required:!0}},data(){return{validators:[]}},created(){this.intiValidator()},methods:{intiValidator(){var a=this;const e=this.record;if(e.validateInstance!=null){a.getJsonKeyLength(e.validateInstance);for(var t in e.validateInstance){var i=t+":"+e.validateInstance[t];a.validators.push({key:t,val:i})}}},getJsonKeyLength(a){var e=0;if(a!=null)for(var t in a)a.hasOwnProperty(t)&&e++;return e}}},m={key:0},x={key:1,class:"knife4j-request-validate-jsr"},k={slot:"title"};function V(a,e,t,i,l,I){const c=y;return r(),n("div",null,[t.record.validateStatus?(r(),n("span",x,[u(c,{placement:"right"},{default:_(()=>[v("template",k,[(r(!0),n(h,null,p(l.validators,o=>(r(),n("div",{key:o.key},s(o.val),1))),128))]),f(" "+s(t.text),1)]),_:1})])):(r(),n("span",m,s(t.text==null||t.text==""?"string":t.text),1))])}const w=d(g,[["render",V]]);export{w as default}; import{_ as d,o as r,j as n,t as s,l as u,w as _,k as v,F as h,v as p,p as f,a0 as y}from"./doc-30bb18f4.js";const g={name:"DataType",props:{text:{type:String,default:"string",required:!0},record:{type:Object,required:!0}},data(){return{validators:[]}},created(){this.intiValidator()},methods:{intiValidator(){var a=this;const e=this.record;if(e.validateInstance!=null){a.getJsonKeyLength(e.validateInstance);for(var t in e.validateInstance){var i=t+":"+e.validateInstance[t];a.validators.push({key:t,val:i})}}},getJsonKeyLength(a){var e=0;if(a!=null)for(var t in a)a.hasOwnProperty(t)&&e++;return e}}},m={key:0},x={key:1,class:"knife4j-request-validate-jsr"},k={slot:"title"};function V(a,e,t,i,l,I){const c=y;return r(),n("div",null,[t.record.validateStatus?(r(),n("span",x,[u(c,{placement:"right"},{default:_(()=>[v("template",k,[(r(!0),n(h,null,p(l.validators,o=>(r(),n("div",{key:o.key},s(o.val),1))),128))]),f(" "+s(t.text),1)]),_:1})])):(r(),n("span",m,s(t.text==null||t.text==""?"string":t.text),1))])}const w=d(g,[["render",V]]);export{w as default};

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
import{_ as a,$ as o,V as l,r as d,o as c,j as h,l as m,I as g}from"./doc-7814a93f.js";import{m as u,a as p,t as f,e as _}from"./ext-language_tools-602acc1a.js";o.config.setModuleUrl("ace/mode/json",u);o.config.setModuleUrl("ace/mode/xml",p);o.config.setModuleUrl("ace/theme/eclipse",f);o.config.setModuleUrl("ace/ext-language/tools",_);const x={name:"EditorShow",components:{editor:l},props:{value:{type:[String,Object],required:!0,default:""},xmlMode:{type:Boolean,default:!1,required:!1}},emits:["showDescription","change"],data(){return{lang:"json",editor:null,editorHeight:200}},methods:{change(e){this.$emit("change",e)},resetEditorHeight(){const e=this;setTimeout(()=>{let t=e.editor.session.getLength();t==1&&(t=10),e.editorHeight=t*16},300)},editorInit(e){const t=this;this.editor=e,this.xmlMode&&(this.lang="xml"),this.resetEditorHeight(),this.editor.renderer.on("afterRender",function(){t.$emit("showDescription","123")})}}};function E(e,t,s,I,i,n){const r=d("editor");return c(),h("div",null,[m(r,{value:s.value,onInit:n.editorInit,lang:i.lang,theme:"eclipse",width:"100%",style:g({height:i.editorHeight+"px"}),onInput:n.change},null,8,["value","onInit","lang","style","onInput"])])}const w=a(x,[["render",E]]);export{w as default}; import{_ as a,$ as o,V as l,r as d,o as c,j as h,l as m,I as g}from"./doc-30bb18f4.js";import{m as u,a as p,t as f,e as _}from"./ext-language_tools-602acc1a.js";o.config.setModuleUrl("ace/mode/json",u);o.config.setModuleUrl("ace/mode/xml",p);o.config.setModuleUrl("ace/theme/eclipse",f);o.config.setModuleUrl("ace/ext-language/tools",_);const x={name:"EditorShow",components:{editor:l},props:{value:{type:[String,Object],required:!0,default:""},xmlMode:{type:Boolean,default:!1,required:!1}},emits:["showDescription","change"],data(){return{lang:"json",editor:null,editorHeight:200}},methods:{change(e){this.$emit("change",e)},resetEditorHeight(){const e=this;setTimeout(()=>{let t=e.editor.session.getLength();t==1&&(t=10),e.editorHeight=t*16},300)},editorInit(e){const t=this;this.editor=e,this.xmlMode&&(this.lang="xml"),this.resetEditorHeight(),this.editor.renderer.on("afterRender",function(){t.$emit("showDescription","123")})}}};function E(e,t,s,I,i,n){const r=d("editor");return c(),h("div",null,[m(r,{value:s.value,onInit:n.editorInit,lang:i.lang,theme:"eclipse",width:"100%",style:g({height:i.editorHeight+"px"}),onInput:n.change},null,8,["value","onInit","lang","style","onInput"])])}const w=a(x,[["render",E]]);export{w as default};

View File

@ -1 +1 @@
import{_ as t}from"./doc-7814a93f.js";const e={name:"OAuth2"};function n(r,o,s,c,_,a){return null}const u=t(e,[["render",n]]);export{u as default}; import{_ as t}from"./doc-30bb18f4.js";const e={name:"OAuth2"};function n(r,o,s,c,_,a){return null}const u=t(e,[["render",n]]);export{u as default};

View File

@ -1 +1 @@
import{l as s,B as v,_ as b,$ as r,V as A,d as j,a as C,b as D,c as I,f as R,u as x,m as u,r as i,o as U,j as E,w as c,k as l,t as m,p as M,L as P,y as S}from"./doc-7814a93f.js";import{C as V}from"./clipboard-814f04b9.js";import{m as L,a as B,t as k,e as N}from"./ext-language_tools-602acc1a.js";import{C as $}from"./CopyOutlined-5b101606.js";var T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const J=T;function g(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),o.forEach(function(a){q(n,a,t[a])})}return n}function q(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var p=function(e,t){var o=g({},e,t.attrs);return s(v,g({},o,{icon:J}),null)};p.displayName="DownloadOutlined";p.inheritAttrs=!1;const z=p,H=""+new URL("mode-json5-ed4a693f.js",import.meta.url).href;r.config.setModuleUrl("ace/mode/json",L);r.config.setModuleUrl("ace/mode/json",H);r.config.setModuleUrl("ace/mode/xml",B);r.config.setModuleUrl("ace/theme/eclipse",k);r.config.setModuleUrl("ace/ext-language/tools",N);const G={name:"Document",components:{editor:A,CopyOutlined:$,DownloadOutlined:z,EditorShow:j(()=>C(()=>import("./EditorShow-39bb991a.js"),["./EditorShow-39bb991a.js","./doc-7814a93f.js","..\\css\\doc-e469198e.css","./ext-language_tools-602acc1a.js"],import.meta.url))},props:{api:{type:Object,required:!0},swaggerInstance:{type:Object,required:!0}},setup(){const n=D(),e=I(()=>n.language),{messages:t}=R();return{language:e,messages:t}},data(){return{openApiRaw:"",name:"OpenAPI.json"}},created(){this.openApiRaw=x.json5stringify(this.api.openApiRaw),this.name=this.api.summary+"_OpenAPI.json",setTimeout(()=>{this.copyOpenApi()},500)},methods:{getCurrentI18nInstance(){return this.messages[this.language]},triggerDownloadOpen(){var n=this.openApiRaw,e=document.createElement("a"),t={},o=this.name,a=window.URL.createObjectURL(new Blob([n],{type:(t.type||"text/plain")+";charset="+(t.encoding||"utf-8")}));e.href=a,e.download=o||"file",e.click(),window.URL.revokeObjectURL(a)},copyOpenApi(){const n="btnCopyOpenApi"+this.api.id,e=new V("#"+n,{text:()=>this.openApiRaw});e.on("success",()=>{const o=this.getCurrentI18nInstance().message.copy.open.success;u.info(o)}),e.on("error",t=>{console.log(t);const o=this.getCurrentI18nInstance();console.log(o);const a=o.message.copy.open.fail;u.info(a)})}}},X={class:"document"},F={style:{"margin-top":"10px"},id:"knife4jDocumentOpenApiShowEditor"};function Q(n,e,t,o,a,f){const w=i("CopyOutlined"),d=P,_=i("DownloadOutlined"),h=S,O=i("editor-show");return U(),E("div",X,[s(h,{style:{"margin-top":"10px"}},{default:c(()=>[s(d,{type:"primary",id:"btnCopyOpenApi"+t.api.id},{default:c(()=>[s(w),l("span",null,m(n.$t("open.copy")),1)]),_:1},8,["id"]),s(d,{style:{"margin-left":"10px"},onClick:f.triggerDownloadOpen},{default:c(()=>[s(_),M(),l("span",null,m(n.$t("open.download")),1)]),_:1},8,["onClick"])]),_:1}),l("div",F,[s(O,{value:a.openApiRaw,"onUpdate:value":e[0]||(e[0]=y=>a.openApiRaw=y),theme:"eclipse"},null,8,["value"])])])}const ee=b(G,[["render",Q]]);export{ee as default}; import{l as s,B as v,_ as b,$ as r,V as A,d as j,a as C,b as D,c as I,f as R,u as x,m as u,r as i,o as U,j as E,w as c,k as l,t as m,p as M,L as P,y as S}from"./doc-30bb18f4.js";import{C as V}from"./clipboard-cedf2745.js";import{m as L,a as B,t as k,e as N}from"./ext-language_tools-602acc1a.js";import{C as $}from"./CopyOutlined-bc9c8f52.js";var T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const J=T;function g(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),o.forEach(function(a){q(n,a,t[a])})}return n}function q(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var p=function(e,t){var o=g({},e,t.attrs);return s(v,g({},o,{icon:J}),null)};p.displayName="DownloadOutlined";p.inheritAttrs=!1;const z=p,H=""+new URL("mode-json5-ed4a693f.js",import.meta.url).href;r.config.setModuleUrl("ace/mode/json",L);r.config.setModuleUrl("ace/mode/json",H);r.config.setModuleUrl("ace/mode/xml",B);r.config.setModuleUrl("ace/theme/eclipse",k);r.config.setModuleUrl("ace/ext-language/tools",N);const G={name:"Document",components:{editor:A,CopyOutlined:$,DownloadOutlined:z,EditorShow:j(()=>C(()=>import("./EditorShow-edef4df9.js"),["./EditorShow-edef4df9.js","./doc-30bb18f4.js","..\\css\\doc-e469198e.css","./ext-language_tools-602acc1a.js"],import.meta.url))},props:{api:{type:Object,required:!0},swaggerInstance:{type:Object,required:!0}},setup(){const n=D(),e=I(()=>n.language),{messages:t}=R();return{language:e,messages:t}},data(){return{openApiRaw:"",name:"OpenAPI.json"}},created(){this.openApiRaw=x.json5stringify(this.api.openApiRaw),this.name=this.api.summary+"_OpenAPI.json",setTimeout(()=>{this.copyOpenApi()},500)},methods:{getCurrentI18nInstance(){return this.messages[this.language]},triggerDownloadOpen(){var n=this.openApiRaw,e=document.createElement("a"),t={},o=this.name,a=window.URL.createObjectURL(new Blob([n],{type:(t.type||"text/plain")+";charset="+(t.encoding||"utf-8")}));e.href=a,e.download=o||"file",e.click(),window.URL.revokeObjectURL(a)},copyOpenApi(){const n="btnCopyOpenApi"+this.api.id,e=new V("#"+n,{text:()=>this.openApiRaw});e.on("success",()=>{const o=this.getCurrentI18nInstance().message.copy.open.success;u.info(o)}),e.on("error",t=>{console.log(t);const o=this.getCurrentI18nInstance();console.log(o);const a=o.message.copy.open.fail;u.info(a)})}}},X={class:"document"},F={style:{"margin-top":"10px"},id:"knife4jDocumentOpenApiShowEditor"};function Q(n,e,t,o,a,f){const w=i("CopyOutlined"),d=P,_=i("DownloadOutlined"),h=S,O=i("editor-show");return U(),E("div",X,[s(h,{style:{"margin-top":"10px"}},{default:c(()=>[s(d,{type:"primary",id:"btnCopyOpenApi"+t.api.id},{default:c(()=>[s(w),l("span",null,m(n.$t("open.copy")),1)]),_:1},8,["id"]),s(d,{style:{"margin-left":"10px"},onClick:f.triggerDownloadOpen},{default:c(()=>[s(_),M(),l("span",null,m(n.$t("open.download")),1)]),_:1},8,["onClick"])]),_:1}),l("div",F,[s(O,{value:a.openApiRaw,"onUpdate:value":e[0]||(e[0]=y=>a.openApiRaw=y),theme:"eclipse"},null,8,["value"])])])}const ee=b(G,[["render",Q]]);export{ee as default};

View File

@ -1 +1 @@
import{w as ln,c as J}from"./path-53f90ab3.js";import{bH as an,bI as N,bJ as w,bK as rn,bL as y,aP as on,bM as z,bN as _,bO as un,bP as t,bQ as sn,bR as tn,bS as fn}from"./doc-7814a93f.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function mn(l){return l.endAngle}function pn(l){return l&&l.padAngle}function dn(l,h,S,I,v,R,K,a){var q=S-l,i=I-h,n=K-v,m=a-R,r=m*q-n*i;if(!(r*r<y))return r=(n*(h-R)-m*(l-v))/r,[l+r*q,h+r*i]}function V(l,h,S,I,v,R,K){var a=l-S,q=h-I,i=(K?R:-R)/z(a*a+q*q),n=i*q,m=-i*a,r=l+n,s=h+m,f=S+n,c=I+m,L=(r+f)/2,o=(s+c)/2,p=f-r,g=c-s,A=p*p+g*g,b=v-R,T=r*c-f*s,D=(g<0?-1:1)*z(fn(0,b*b*A-T*T)),E=(T*g-p*D)/A,H=(-T*p-g*D)/A,P=(T*g+p*D)/A,d=(-T*p+g*D)/A,x=E-L,e=H-o,u=P-L,M=d-o;return x*x+e*e>u*u+M*M&&(E=P,H=d),{cx:E,cy:H,x01:-n,y01:-m,x11:E*(v/b-1),y11:H*(v/b-1)}}function vn(){var l=cn,h=yn,S=J(0),I=null,v=gn,R=mn,K=pn,a=null,q=ln(i);function i(){var n,m,r=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-rn,c=R.apply(this,arguments)-rn,L=un(c-f),o=c>f;if(a||(a=n=q()),s<r&&(m=s,s=r,r=m),!(s>y))a.moveTo(0,0);else if(L>on-y)a.moveTo(s*N(f),s*w(f)),a.arc(0,0,s,f,c,!o),r>y&&(a.moveTo(r*N(c),r*w(c)),a.arc(0,0,r,c,f,o));else{var p=f,g=c,A=f,b=c,T=L,D=L,E=K.apply(this,arguments)/2,H=E>y&&(I?+I.apply(this,arguments):z(r*r+s*s)),P=_(un(s-r)/2,+S.apply(this,arguments)),d=P,x=P,e,u;if(H>y){var M=sn(H/r*w(E)),B=sn(H/s*w(E));(T-=M*2)>y?(M*=o?1:-1,A+=M,b-=M):(T=0,A=b=(f+c)/2),(D-=B*2)>y?(B*=o?1:-1,p+=B,g-=B):(D=0,p=g=(f+c)/2)}var Q=s*N(p),j=s*w(p),C=r*N(b),F=r*w(b);if(P>y){var G=s*N(g),U=s*w(g),W=r*N(A),X=r*w(A),O;if(L<an)if(O=dn(Q,j,W,X,G,U,C,F)){var Y=Q-O[0],Z=j-O[1],$=G-O[0],k=U-O[1],nn=1/w(tn((Y*$+Z*k)/(z(Y*Y+Z*Z)*z($*$+k*k)))/2),en=z(O[0]*O[0]+O[1]*O[1]);d=_(P,(r-en)/(nn-1)),x=_(P,(s-en)/(nn+1))}else d=x=0}D>y?x>y?(e=V(W,X,Q,j,s,x,o),u=V(G,U,C,F,s,x,o),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<P?a.arc(e.cx,e.cy,x,t(e.y01,e.x01),t(u.y01,u.x01),!o):(a.arc(e.cx,e.cy,x,t(e.y01,e.x01),t(e.y11,e.x11),!o),a.arc(0,0,s,t(e.cy+e.y11,e.cx+e.x11),t(u.cy+u.y11,u.cx+u.x11),!o),a.arc(u.cx,u.cy,x,t(u.y11,u.x11),t(u.y01,u.x01),!o))):(a.moveTo(Q,j),a.arc(0,0,s,p,g,!o)):a.moveTo(Q,j),!(r>y)||!(T>y)?a.lineTo(C,F):d>y?(e=V(C,F,G,U,r,-d,o),u=V(Q,j,W,X,r,-d,o),a.lineTo(e.cx+e.x01,e.cy+e.y01),d<P?a.arc(e.cx,e.cy,d,t(e.y01,e.x01),t(u.y01,u.x01),!o):(a.arc(e.cx,e.cy,d,t(e.y01,e.x01),t(e.y11,e.x11),!o),a.arc(0,0,r,t(e.cy+e.y11,e.cx+e.x11),t(u.cy+u.y11,u.cx+u.x11),o),a.arc(u.cx,u.cy,d,t(u.y11,u.x11),t(u.y01,u.x01),!o))):a.arc(0,0,r,b,A,o)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,m=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-an/2;return[N(m)*n,w(m)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:J(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:J(+n),i):h},i.cornerRadius=function(n){return arguments.length?(S=typeof n=="function"?n:J(+n),i):S},i.padRadius=function(n){return arguments.length?(I=n==null?null:typeof n=="function"?n:J(+n),i):I},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:J(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:J(+n),i):R},i.padAngle=function(n){return arguments.length?(K=typeof n=="function"?n:J(+n),i):K},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{vn as a}; import{w as ln,c as J}from"./path-53f90ab3.js";import{bH as an,bI as N,bJ as w,bK as rn,bL as y,aP as on,bM as z,bN as _,bO as un,bP as t,bQ as sn,bR as tn,bS as fn}from"./doc-30bb18f4.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function mn(l){return l.endAngle}function pn(l){return l&&l.padAngle}function dn(l,h,S,I,v,R,K,a){var q=S-l,i=I-h,n=K-v,m=a-R,r=m*q-n*i;if(!(r*r<y))return r=(n*(h-R)-m*(l-v))/r,[l+r*q,h+r*i]}function V(l,h,S,I,v,R,K){var a=l-S,q=h-I,i=(K?R:-R)/z(a*a+q*q),n=i*q,m=-i*a,r=l+n,s=h+m,f=S+n,c=I+m,L=(r+f)/2,o=(s+c)/2,p=f-r,g=c-s,A=p*p+g*g,b=v-R,T=r*c-f*s,D=(g<0?-1:1)*z(fn(0,b*b*A-T*T)),E=(T*g-p*D)/A,H=(-T*p-g*D)/A,P=(T*g+p*D)/A,d=(-T*p+g*D)/A,x=E-L,e=H-o,u=P-L,M=d-o;return x*x+e*e>u*u+M*M&&(E=P,H=d),{cx:E,cy:H,x01:-n,y01:-m,x11:E*(v/b-1),y11:H*(v/b-1)}}function vn(){var l=cn,h=yn,S=J(0),I=null,v=gn,R=mn,K=pn,a=null,q=ln(i);function i(){var n,m,r=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-rn,c=R.apply(this,arguments)-rn,L=un(c-f),o=c>f;if(a||(a=n=q()),s<r&&(m=s,s=r,r=m),!(s>y))a.moveTo(0,0);else if(L>on-y)a.moveTo(s*N(f),s*w(f)),a.arc(0,0,s,f,c,!o),r>y&&(a.moveTo(r*N(c),r*w(c)),a.arc(0,0,r,c,f,o));else{var p=f,g=c,A=f,b=c,T=L,D=L,E=K.apply(this,arguments)/2,H=E>y&&(I?+I.apply(this,arguments):z(r*r+s*s)),P=_(un(s-r)/2,+S.apply(this,arguments)),d=P,x=P,e,u;if(H>y){var M=sn(H/r*w(E)),B=sn(H/s*w(E));(T-=M*2)>y?(M*=o?1:-1,A+=M,b-=M):(T=0,A=b=(f+c)/2),(D-=B*2)>y?(B*=o?1:-1,p+=B,g-=B):(D=0,p=g=(f+c)/2)}var Q=s*N(p),j=s*w(p),C=r*N(b),F=r*w(b);if(P>y){var G=s*N(g),U=s*w(g),W=r*N(A),X=r*w(A),O;if(L<an)if(O=dn(Q,j,W,X,G,U,C,F)){var Y=Q-O[0],Z=j-O[1],$=G-O[0],k=U-O[1],nn=1/w(tn((Y*$+Z*k)/(z(Y*Y+Z*Z)*z($*$+k*k)))/2),en=z(O[0]*O[0]+O[1]*O[1]);d=_(P,(r-en)/(nn-1)),x=_(P,(s-en)/(nn+1))}else d=x=0}D>y?x>y?(e=V(W,X,Q,j,s,x,o),u=V(G,U,C,F,s,x,o),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<P?a.arc(e.cx,e.cy,x,t(e.y01,e.x01),t(u.y01,u.x01),!o):(a.arc(e.cx,e.cy,x,t(e.y01,e.x01),t(e.y11,e.x11),!o),a.arc(0,0,s,t(e.cy+e.y11,e.cx+e.x11),t(u.cy+u.y11,u.cx+u.x11),!o),a.arc(u.cx,u.cy,x,t(u.y11,u.x11),t(u.y01,u.x01),!o))):(a.moveTo(Q,j),a.arc(0,0,s,p,g,!o)):a.moveTo(Q,j),!(r>y)||!(T>y)?a.lineTo(C,F):d>y?(e=V(C,F,G,U,r,-d,o),u=V(Q,j,W,X,r,-d,o),a.lineTo(e.cx+e.x01,e.cy+e.y01),d<P?a.arc(e.cx,e.cy,d,t(e.y01,e.x01),t(u.y01,u.x01),!o):(a.arc(e.cx,e.cy,d,t(e.y01,e.x01),t(e.y11,e.x11),!o),a.arc(0,0,r,t(e.cy+e.y11,e.cx+e.x11),t(u.cy+u.y11,u.cx+u.x11),o),a.arc(u.cx,u.cy,d,t(u.y11,u.x11),t(u.y01,u.x01),!o))):a.arc(0,0,r,b,A,o)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,m=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-an/2;return[N(m)*n,w(m)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:J(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:J(+n),i):h},i.cornerRadius=function(n){return arguments.length?(S=typeof n=="function"?n:J(+n),i):S},i.padRadius=function(n){return arguments.length?(I=n==null?null:typeof n=="function"?n:J(+n),i):I},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:J(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:J(+n),i):R},i.padAngle=function(n){return arguments.length?(K=typeof n=="function"?n:J(+n),i):K},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{vn as a};

View File

@ -1 +1 @@
import{p as N,d as M,s as W}from"./styles-d0b2ab71-1b7cd6cb.js";import{a5 as S,ab as d,aa as u,ac as H}from"./doc-7814a93f.js";import{G as X,l as Y}from"./layout-49de7b0f.js";import{s as l}from"./svgDraw-b48a99d5-22935652.js";import"./line-de0e7350.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";let h={};const g=20,p=function(e){const s=Object.entries(h).find(k=>k[1].label===e);if(s)return s[0]},Z=function(e){e.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},D=function(e,s,k,a){const c=S().class;h={},d.info("Rendering diagram "+e);const L=S().securityLevel;let y;L==="sandbox"&&(y=u("#i"+s));const x=L==="sandbox"?u(y.nodes()[0].contentDocument.body):u("body"),n=x.select(`[id='${s}']`);Z(n);const r=new X({multigraph:!0});r.setGraph({isMultiGraph:!0}),r.setDefaultEdgeLabel(function(){return{}});const m=a.db.getClasses(),$=Object.keys(m);for(const t of $){const o=m[t],i=l.drawClass(n,o,c,a);h[i.id]=i,r.setNode(i.id,i),d.info("Org height: "+i.height)}a.db.getRelations().forEach(function(t){d.info("tjoho"+p(t.id1)+p(t.id2)+JSON.stringify(t)),r.setEdge(p(t.id1),p(t.id2),{relation:t},t.title||"DEFAULT")}),a.db.getNotes().forEach(function(t){d.debug(`Adding note: ${JSON.stringify(t)}`);const o=l.drawNote(n,t,c,a);h[o.id]=o,r.setNode(o.id,o),t.class&&t.class in m&&r.setEdge(t.id,p(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),Y(r),r.nodes().forEach(function(t){t!==void 0&&r.node(t)!==void 0&&(d.debug("Node "+t+": "+JSON.stringify(r.node(t))),x.select("#"+(a.db.lookUpDomId(t)||t)).attr("transform","translate("+(r.node(t).x-r.node(t).width/2)+","+(r.node(t).y-r.node(t).height/2)+" )"))}),r.edges().forEach(function(t){t!==void 0&&r.edge(t)!==void 0&&(d.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(r.edge(t))),l.drawEdge(n,r.edge(t),r.edge(t).relation,c,a))});const f=n.node().getBBox(),E=f.width+g*2,b=f.height+g*2;H(n,b,E,c.useMaxWidth);const w=`${f.x-g} ${f.y-g} ${E} ${b}`;d.debug(`viewBox ${w}`),n.attr("viewBox",w)},B={draw:D},R={parser:N,db:M,renderer:B,styles:W,init:e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,M.clear()}};export{R as diagram}; import{p as N,d as M,s as W}from"./styles-d0b2ab71-3fadbaa9.js";import{a5 as S,ab as d,aa as u,ac as H}from"./doc-30bb18f4.js";import{G as X,l as Y}from"./layout-a867abc3.js";import{s as l}from"./svgDraw-b48a99d5-5bec0454.js";import"./line-d2bd5b46.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";let h={};const g=20,p=function(e){const s=Object.entries(h).find(k=>k[1].label===e);if(s)return s[0]},Z=function(e){e.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},D=function(e,s,k,a){const c=S().class;h={},d.info("Rendering diagram "+e);const L=S().securityLevel;let y;L==="sandbox"&&(y=u("#i"+s));const x=L==="sandbox"?u(y.nodes()[0].contentDocument.body):u("body"),n=x.select(`[id='${s}']`);Z(n);const r=new X({multigraph:!0});r.setGraph({isMultiGraph:!0}),r.setDefaultEdgeLabel(function(){return{}});const m=a.db.getClasses(),$=Object.keys(m);for(const t of $){const o=m[t],i=l.drawClass(n,o,c,a);h[i.id]=i,r.setNode(i.id,i),d.info("Org height: "+i.height)}a.db.getRelations().forEach(function(t){d.info("tjoho"+p(t.id1)+p(t.id2)+JSON.stringify(t)),r.setEdge(p(t.id1),p(t.id2),{relation:t},t.title||"DEFAULT")}),a.db.getNotes().forEach(function(t){d.debug(`Adding note: ${JSON.stringify(t)}`);const o=l.drawNote(n,t,c,a);h[o.id]=o,r.setNode(o.id,o),t.class&&t.class in m&&r.setEdge(t.id,p(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),Y(r),r.nodes().forEach(function(t){t!==void 0&&r.node(t)!==void 0&&(d.debug("Node "+t+": "+JSON.stringify(r.node(t))),x.select("#"+(a.db.lookUpDomId(t)||t)).attr("transform","translate("+(r.node(t).x-r.node(t).width/2)+","+(r.node(t).y-r.node(t).height/2)+" )"))}),r.edges().forEach(function(t){t!==void 0&&r.edge(t)!==void 0&&(d.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(r.edge(t))),l.drawEdge(n,r.edge(t),r.edge(t).relation,c,a))});const f=n.node().getBBox(),E=f.width+g*2,b=f.height+g*2;H(n,b,E,c.useMaxWidth);const w=`${f.x-g} ${f.y-g} ${E} ${b}`;d.debug(`viewBox ${w}`),n.attr("viewBox",w)},B={draw:D},R={parser:N,db:M,renderer:B,styles:W,init:e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,M.clear()}};export{R as diagram};

View File

@ -1,2 +1,2 @@
import{p as I,d as N,s as M}from"./styles-d0b2ab71-1b7cd6cb.js";import{ab as d,a5 as c,aa as w,av as R,am as B,al as E,ai as _,aj as G,ae as C}from"./doc-7814a93f.js";import{G as z}from"./layout-49de7b0f.js";import{r as P}from"./index-892ad7fb-6b10aead.js";import"./edges-c959041a-672f75de.js";import"./createText-b670c180-ad86d00b.js";import"./svgDraw-b48a99d5-22935652.js";import"./line-de0e7350.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const S=s=>C.sanitizeText(s,c());let k={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const q=function(s,t,y,a){const e=Object.keys(s);d.info("keys:",e),d.info(s),e.forEach(function(i){var o,r;const l=s[i],p={shape:"rect",id:l.id,domId:l.domId,labelText:S(l.id),labelStyle:"",style:"fill: none; stroke: black",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};t.setNode(l.id,p),A(l.classes,t,y,a,l.id),d.info("setNode",p)})},A=function(s,t,y,a,e){const i=Object.keys(s);d.info("keys:",i),d.info(s),i.filter(o=>s[o].parent==e).forEach(function(o){var r,l;const n=s[o],p=n.cssClasses.join(" "),f={labelStyle:"",style:""},h=n.label??n.id,b=0,m="class_box",u={labelStyle:f.labelStyle,shape:m,labelText:S(h),classData:n,rx:b,ry:b,class:p,style:f.style,id:n.id,domId:n.domId,tooltip:a.db.getTooltip(n.id,e)||"",haveCallback:n.haveCallback,link:n.link,width:n.type==="group"?500:void 0,type:n.type,padding:((r=c().flowchart)==null?void 0:r.padding)??((l=c().class)==null?void 0:l.padding)};t.setNode(n.id,u),e&&t.setParent(n.id,e),d.info("setNode",u)})},F=function(s,t,y,a){d.info(s),s.forEach(function(e,i){var o,r;const l=e,n="",p={labelStyle:"",style:""},f=l.text,h=0,b="note",m={labelStyle:p.labelStyle,shape:b,labelText:S(f),noteData:l,rx:h,ry:h,class:n,style:p.style,id:l.id,domId:l.id,tooltip:"",type:"note",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};if(t.setNode(l.id,m),d.info("setNode",m),!l.class||!(l.class in a))return;const u=y+i,g={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:E(k.curve,_)};t.setEdge(l.id,l.class,g,u)})},H=function(s,t){const y=c().flowchart;let a=0;s.forEach(function(e){var i;a++;const o={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:"id"+a,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:D(e.relation.type1),arrowTypeEnd:D(e.relation.type2),style:"fill:none",labelStyle:"",curve:E(y==null?void 0:y.curve,_)};if(d.info(o,e),e.style!==void 0){const r=G(e.style);o.style=r.style,o.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",((i=c().flowchart)==null?void 0:i.htmlLabels)??c().htmlLabels?(o.labelType="html",o.label='<span class="edgeLabel">'+e.text+"</span>"):(o.labelType="text",o.label=e.text.replace(C.lineBreakRegex,` import{p as I,d as N,s as M}from"./styles-d0b2ab71-3fadbaa9.js";import{ab as d,a5 as c,aa as w,av as R,am as B,al as E,ai as _,aj as G,ae as C}from"./doc-30bb18f4.js";import{G as z}from"./layout-a867abc3.js";import{r as P}from"./index-892ad7fb-8cfb25e5.js";import"./edges-c959041a-5364e2cd.js";import"./createText-b670c180-011fa2f3.js";import"./svgDraw-b48a99d5-5bec0454.js";import"./line-d2bd5b46.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const S=s=>C.sanitizeText(s,c());let k={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const q=function(s,t,y,a){const e=Object.keys(s);d.info("keys:",e),d.info(s),e.forEach(function(i){var o,r;const l=s[i],p={shape:"rect",id:l.id,domId:l.domId,labelText:S(l.id),labelStyle:"",style:"fill: none; stroke: black",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};t.setNode(l.id,p),A(l.classes,t,y,a,l.id),d.info("setNode",p)})},A=function(s,t,y,a,e){const i=Object.keys(s);d.info("keys:",i),d.info(s),i.filter(o=>s[o].parent==e).forEach(function(o){var r,l;const n=s[o],p=n.cssClasses.join(" "),f={labelStyle:"",style:""},h=n.label??n.id,b=0,m="class_box",u={labelStyle:f.labelStyle,shape:m,labelText:S(h),classData:n,rx:b,ry:b,class:p,style:f.style,id:n.id,domId:n.domId,tooltip:a.db.getTooltip(n.id,e)||"",haveCallback:n.haveCallback,link:n.link,width:n.type==="group"?500:void 0,type:n.type,padding:((r=c().flowchart)==null?void 0:r.padding)??((l=c().class)==null?void 0:l.padding)};t.setNode(n.id,u),e&&t.setParent(n.id,e),d.info("setNode",u)})},F=function(s,t,y,a){d.info(s),s.forEach(function(e,i){var o,r;const l=e,n="",p={labelStyle:"",style:""},f=l.text,h=0,b="note",m={labelStyle:p.labelStyle,shape:b,labelText:S(f),noteData:l,rx:h,ry:h,class:n,style:p.style,id:l.id,domId:l.id,tooltip:"",type:"note",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};if(t.setNode(l.id,m),d.info("setNode",m),!l.class||!(l.class in a))return;const u=y+i,g={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:E(k.curve,_)};t.setEdge(l.id,l.class,g,u)})},H=function(s,t){const y=c().flowchart;let a=0;s.forEach(function(e){var i;a++;const o={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:"id"+a,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:D(e.relation.type1),arrowTypeEnd:D(e.relation.type2),style:"fill:none",labelStyle:"",curve:E(y==null?void 0:y.curve,_)};if(d.info(o,e),e.style!==void 0){const r=G(e.style);o.style=r.style,o.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",((i=c().flowchart)==null?void 0:i.htmlLabels)??c().htmlLabels?(o.labelType="html",o.label='<span class="edgeLabel">'+e.text+"</span>"):(o.labelType="text",o.label=e.text.replace(C.lineBreakRegex,`
`),e.style===void 0&&(o.style=o.style||"stroke: #333; stroke-width: 1.5px;fill:none"),o.labelStyle=o.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,o,a)})},V=function(s){k={...k,...s}},W=async function(s,t,y,a){d.info("Drawing class - ",t);const e=c().flowchart??c().class,i=c().securityLevel;d.info("config:",e);const o=(e==null?void 0:e.nodeSpacing)??50,r=(e==null?void 0:e.rankSpacing)??50,l=new z({multigraph:!0,compound:!0}).setGraph({rankdir:a.db.getDirection(),nodesep:o,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=a.db.getNamespaces(),p=a.db.getClasses(),f=a.db.getRelations(),h=a.db.getNotes();d.info(f),q(n,l,t,a),A(p,l,t,a),H(f,l),F(h,l,f.length+1,p);let b;i==="sandbox"&&(b=w("#i"+t));const m=i==="sandbox"?w(b.nodes()[0].contentDocument.body):w("body"),u=m.select(`[id="${t}"]`),g=m.select("#"+t+" g");if(await P(g,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),R.insertTitle(u,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,a.db.getDiagramTitle()),B(l,u,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const T=i==="sandbox"?b.nodes()[0].contentDocument:document,$=T.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const x of $){const L=x.getBBox(),v=T.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",L.width),v.setAttribute("height",L.height),x.insertBefore(v,x.firstChild)}}};function D(s){let t;switch(s){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}const J={setConf:V,draw:W},oe={parser:I,db:N,renderer:J,styles:M,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,N.clear()}};export{oe as diagram}; `),e.style===void 0&&(o.style=o.style||"stroke: #333; stroke-width: 1.5px;fill:none"),o.labelStyle=o.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,o,a)})},V=function(s){k={...k,...s}},W=async function(s,t,y,a){d.info("Drawing class - ",t);const e=c().flowchart??c().class,i=c().securityLevel;d.info("config:",e);const o=(e==null?void 0:e.nodeSpacing)??50,r=(e==null?void 0:e.rankSpacing)??50,l=new z({multigraph:!0,compound:!0}).setGraph({rankdir:a.db.getDirection(),nodesep:o,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=a.db.getNamespaces(),p=a.db.getClasses(),f=a.db.getRelations(),h=a.db.getNotes();d.info(f),q(n,l,t,a),A(p,l,t,a),H(f,l),F(h,l,f.length+1,p);let b;i==="sandbox"&&(b=w("#i"+t));const m=i==="sandbox"?w(b.nodes()[0].contentDocument.body):w("body"),u=m.select(`[id="${t}"]`),g=m.select("#"+t+" g");if(await P(g,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),R.insertTitle(u,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,a.db.getDiagramTitle()),B(l,u,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const T=i==="sandbox"?b.nodes()[0].contentDocument:document,$=T.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const x of $){const L=x.getBBox(),v=T.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",L.width),v.setAttribute("height",L.height),x.insertBefore(v,x.firstChild)}}};function D(s){let t;switch(s){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}const J={setConf:V,draw:W},oe={parser:I,db:N,renderer:J,styles:M,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,N.clear()}};export{oe as diagram};

View File

@ -1,4 +1,4 @@
import{aF as X,D as $}from"./doc-7814a93f.js";var R={exports:{}};/*! import{aF as X,D as $}from"./doc-30bb18f4.js";var R={exports:{}};/*!
* clipboard.js v2.0.11 * clipboard.js v2.0.11
* https://clipboardjs.com/ * https://clipboardjs.com/
* *

View File

@ -1 +0,0 @@
import{p as e,f as o}from"./flowDb-01624e90-8843bef4.js";import{f as t,g as a}from"./styles-4fcf332f-fb7ed7da.js";import{an as s}from"./doc-7814a93f.js";import"./layout-49de7b0f.js";import"./index-892ad7fb-6b10aead.js";import"./edges-c959041a-672f75de.js";import"./createText-b670c180-ad86d00b.js";import"./svgDraw-b48a99d5-22935652.js";import"./line-de0e7350.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const n={parser:e,db:o,renderer:t,styles:a,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,s({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{n as diagram};

View File

@ -0,0 +1 @@
import{p as e,f as o}from"./flowDb-01624e90-32c0e086.js";import{f as t,g as a}from"./styles-4fcf332f-12f03159.js";import{an as s}from"./doc-30bb18f4.js";import"./layout-a867abc3.js";import"./index-892ad7fb-8cfb25e5.js";import"./edges-c959041a-5364e2cd.js";import"./createText-b670c180-011fa2f3.js";import"./svgDraw-b48a99d5-5bec0454.js";import"./line-d2bd5b46.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const n={parser:e,db:o,renderer:t,styles:a,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,s({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{n as diagram};

Some files were not shown because too many files have changed in this diff Show More