Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
是阿延啊
gin-vue-admin
提交
bb33c312
G
gin-vue-admin
项目概览
是阿延啊
/
gin-vue-admin
与 Fork 源项目一致
Fork自
FLIPPED-AURORA / gin-vue-admin
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bb33c312
编写于
8月 21, 2021
作者:
S
songzhibin97
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'upstream/gva_gormv2_dev' into gva_gormv2_dev
上级
b9b4bc6b
6e6b4885
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
1739 addition
and
950 deletion
+1739
-950
server/api/v1/autocode/autocodeExample.go
server/api/v1/autocode/autocodeExample.go
+2
-2
server/api/v1/example/exa_customer.go
server/api/v1/example/exa_customer.go
+2
-2
server/api/v1/system/sys_captcha.go
server/api/v1/system/sys_captcha.go
+2
-1
server/api/v1/system/sys_dictionary.go
server/api/v1/system/sys_dictionary.go
+2
-2
server/api/v1/system/sys_dictionary_detail.go
server/api/v1/system/sys_dictionary_detail.go
+2
-2
server/api/v1/system/sys_menu.go
server/api/v1/system/sys_menu.go
+1
-1
server/api/v1/system/sys_operation_record.go
server/api/v1/system/sys_operation_record.go
+2
-2
server/api/v1/system/sys_user.go
server/api/v1/system/sys_user.go
+1
-1
server/config.yaml
server/config.yaml
+1
-0
server/config/oss.go
server/config/oss.go
+1
-1
server/docs/docs.go
server/docs/docs.go
+585
-290
server/docs/swagger.json
server/docs/swagger.json
+585
-290
server/docs/swagger.yaml
server/docs/swagger.yaml
+403
-223
server/go.mod
server/go.mod
+1
-3
server/model/common/request/common.go
server/model/common/request/common.go
+1
-1
server/model/system/request/sys_menu.go
server/model/system/request/sys_menu.go
+2
-2
server/model/system/sys_system.go
server/model/system/sys_system.go
+1
-1
server/resource/template/server/api.go.tpl
server/resource/template/server/api.go.tpl
+2
-2
server/resource/template/web/api.js.tpl
server/resource/template/web/api.js.tpl
+3
-3
server/resource/template/web/form.vue.tpl
server/resource/template/web/form.vue.tpl
+47
-47
server/resource/template/web/table.vue.tpl
server/resource/template/web/table.vue.tpl
+74
-73
server/utils/validator.go
server/utils/validator.go
+18
-0
web/.eslintrc.js
web/.eslintrc.js
+1
-1
未找到文件。
server/api/v1/autocode/autocodeExample.go
浏览文件 @
bb33c312
...
@@ -78,7 +78,7 @@ func (autoCodeExampleApi *AutoCodeExampleApi) UpdateAutoCodeExample(c *gin.Conte
...
@@ -78,7 +78,7 @@ func (autoCodeExampleApi *AutoCodeExampleApi) UpdateAutoCodeExample(c *gin.Conte
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y autocode.AutoCodeExample true "用id查询AutoCodeExample"
// @Param data
quer
y autocode.AutoCodeExample true "用id查询AutoCodeExample"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /autoCodeExample/findAutoCodeExample [get]
// @Router /autoCodeExample/findAutoCodeExample [get]
func
(
autoCodeExampleApi
*
AutoCodeExampleApi
)
FindAutoCodeExample
(
c
*
gin
.
Context
)
{
func
(
autoCodeExampleApi
*
AutoCodeExampleApi
)
FindAutoCodeExample
(
c
*
gin
.
Context
)
{
...
@@ -101,7 +101,7 @@ func (autoCodeExampleApi *AutoCodeExampleApi) FindAutoCodeExample(c *gin.Context
...
@@ -101,7 +101,7 @@ func (autoCodeExampleApi *AutoCodeExampleApi) FindAutoCodeExample(c *gin.Context
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y autocodeReq.AutoCodeExampleSearch true "页码, 每页大小, 搜索条件"
// @Param data
quer
y autocodeReq.AutoCodeExampleSearch true "页码, 每页大小, 搜索条件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /autoCodeExample/getAutoCodeExampleList [get]
// @Router /autoCodeExample/getAutoCodeExampleList [get]
func
(
autoCodeExampleApi
*
AutoCodeExampleApi
)
GetAutoCodeExampleList
(
c
*
gin
.
Context
)
{
func
(
autoCodeExampleApi
*
AutoCodeExampleApi
)
GetAutoCodeExampleList
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/example/exa_customer.go
浏览文件 @
bb33c312
...
@@ -94,7 +94,7 @@ func (e *CustomerApi) UpdateExaCustomer(c *gin.Context) {
...
@@ -94,7 +94,7 @@ func (e *CustomerApi) UpdateExaCustomer(c *gin.Context) {
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y example.ExaCustomer true "客户ID"
// @Param data
quer
y example.ExaCustomer true "客户ID"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/customer [get]
// @Router /customer/customer [get]
func
(
e
*
CustomerApi
)
GetExaCustomer
(
c
*
gin
.
Context
)
{
func
(
e
*
CustomerApi
)
GetExaCustomer
(
c
*
gin
.
Context
)
{
...
@@ -118,7 +118,7 @@ func (e *CustomerApi) GetExaCustomer(c *gin.Context) {
...
@@ -118,7 +118,7 @@ func (e *CustomerApi) GetExaCustomer(c *gin.Context) {
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y request.PageInfo true "页码, 每页大小"
// @Param data
quer
y request.PageInfo true "页码, 每页大小"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/customerList [get]
// @Router /customer/customerList [get]
func
(
e
*
CustomerApi
)
GetExaCustomerList
(
c
*
gin
.
Context
)
{
func
(
e
*
CustomerApi
)
GetExaCustomerList
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/system/sys_captcha.go
浏览文件 @
bb33c312
...
@@ -10,7 +10,7 @@ import (
...
@@ -10,7 +10,7 @@ import (
)
)
// 当开启多服务器部署时,替换下面的配置,使用redis共享存储验证码
// 当开启多服务器部署时,替换下面的配置,使用redis共享存储验证码
//
var store = captcha.NewDefaultRedisStore()
//var store = captcha.NewDefaultRedisStore()
var
store
=
base64Captcha
.
DefaultMemStore
var
store
=
base64Captcha
.
DefaultMemStore
type
BaseApi
struct
{
type
BaseApi
struct
{
...
@@ -27,6 +27,7 @@ func (b *BaseApi) Captcha(c *gin.Context) {
...
@@ -27,6 +27,7 @@ func (b *BaseApi) Captcha(c *gin.Context) {
// 字符,公式,验证码配置
// 字符,公式,验证码配置
// 生成默认数字的driver
// 生成默认数字的driver
driver
:=
base64Captcha
.
NewDriverDigit
(
global
.
GVA_CONFIG
.
Captcha
.
ImgHeight
,
global
.
GVA_CONFIG
.
Captcha
.
ImgWidth
,
global
.
GVA_CONFIG
.
Captcha
.
KeyLong
,
0.7
,
80
)
driver
:=
base64Captcha
.
NewDriverDigit
(
global
.
GVA_CONFIG
.
Captcha
.
ImgHeight
,
global
.
GVA_CONFIG
.
Captcha
.
ImgWidth
,
global
.
GVA_CONFIG
.
Captcha
.
KeyLong
,
0.7
,
80
)
//cp := base64Captcha.NewCaptcha(driver, store.UseWithCtx(c)) // v8下使用redis
cp
:=
base64Captcha
.
NewCaptcha
(
driver
,
store
)
cp
:=
base64Captcha
.
NewCaptcha
(
driver
,
store
)
if
id
,
b64s
,
err
:=
cp
.
Generate
();
err
!=
nil
{
if
id
,
b64s
,
err
:=
cp
.
Generate
();
err
!=
nil
{
global
.
GVA_LOG
.
Error
(
"验证码获取失败!"
,
zap
.
Any
(
"err"
,
err
))
global
.
GVA_LOG
.
Error
(
"验证码获取失败!"
,
zap
.
Any
(
"err"
,
err
))
...
...
server/api/v1/system/sys_dictionary.go
浏览文件 @
bb33c312
...
@@ -75,7 +75,7 @@ func (s *DictionaryApi) UpdateSysDictionary(c *gin.Context) {
...
@@ -75,7 +75,7 @@ func (s *DictionaryApi) UpdateSysDictionary(c *gin.Context) {
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y system.SysDictionary true "ID或字典英名"
// @Param data
quer
y system.SysDictionary true "ID或字典英名"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /sysDictionary/findSysDictionary [get]
// @Router /sysDictionary/findSysDictionary [get]
func
(
s
*
DictionaryApi
)
FindSysDictionary
(
c
*
gin
.
Context
)
{
func
(
s
*
DictionaryApi
)
FindSysDictionary
(
c
*
gin
.
Context
)
{
...
@@ -94,7 +94,7 @@ func (s *DictionaryApi) FindSysDictionary(c *gin.Context) {
...
@@ -94,7 +94,7 @@ func (s *DictionaryApi) FindSysDictionary(c *gin.Context) {
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y request.SysDictionarySearch true "页码, 每页大小, 搜索条件"
// @Param data
quer
y request.SysDictionarySearch true "页码, 每页大小, 搜索条件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /sysDictionary/getSysDictionaryList [get]
// @Router /sysDictionary/getSysDictionaryList [get]
func
(
s
*
DictionaryApi
)
GetSysDictionaryList
(
c
*
gin
.
Context
)
{
func
(
s
*
DictionaryApi
)
GetSysDictionaryList
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/system/sys_dictionary_detail.go
浏览文件 @
bb33c312
...
@@ -75,7 +75,7 @@ func (s *DictionaryDetailApi) UpdateSysDictionaryDetail(c *gin.Context) {
...
@@ -75,7 +75,7 @@ func (s *DictionaryDetailApi) UpdateSysDictionaryDetail(c *gin.Context) {
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y system.SysDictionaryDetail true "用id查询SysDictionaryDetail"
// @Param data
quer
y system.SysDictionaryDetail true "用id查询SysDictionaryDetail"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /sysDictionaryDetail/findSysDictionaryDetail [get]
// @Router /sysDictionaryDetail/findSysDictionaryDetail [get]
func
(
s
*
DictionaryDetailApi
)
FindSysDictionaryDetail
(
c
*
gin
.
Context
)
{
func
(
s
*
DictionaryDetailApi
)
FindSysDictionaryDetail
(
c
*
gin
.
Context
)
{
...
@@ -98,7 +98,7 @@ func (s *DictionaryDetailApi) FindSysDictionaryDetail(c *gin.Context) {
...
@@ -98,7 +98,7 @@ func (s *DictionaryDetailApi) FindSysDictionaryDetail(c *gin.Context) {
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y request.SysDictionaryDetailSearch true "页码, 每页大小, 搜索条件"
// @Param data
quer
y request.SysDictionaryDetailSearch true "页码, 每页大小, 搜索条件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /sysDictionaryDetail/getSysDictionaryDetailList [get]
// @Router /sysDictionaryDetail/getSysDictionaryDetailList [get]
func
(
s
*
DictionaryDetailApi
)
GetSysDictionaryDetailList
(
c
*
gin
.
Context
)
{
func
(
s
*
DictionaryDetailApi
)
GetSysDictionaryDetailList
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/system/sys_menu.go
浏览文件 @
bb33c312
...
@@ -81,7 +81,7 @@ func (a *AuthorityMenuApi) AddMenuAuthority(c *gin.Context) {
...
@@ -81,7 +81,7 @@ func (a *AuthorityMenuApi) AddMenuAuthority(c *gin.Context) {
// @Produce application/json
// @Produce application/json
// @Param data body request.GetAuthorityId true "角色ID"
// @Param data body request.GetAuthorityId true "角色ID"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/
G
etMenuAuthority [post]
// @Router /menu/
g
etMenuAuthority [post]
func
(
a
*
AuthorityMenuApi
)
GetMenuAuthority
(
c
*
gin
.
Context
)
{
func
(
a
*
AuthorityMenuApi
)
GetMenuAuthority
(
c
*
gin
.
Context
)
{
var
param
request
.
GetAuthorityId
var
param
request
.
GetAuthorityId
_
=
c
.
ShouldBindJSON
(
&
param
)
_
=
c
.
ShouldBindJSON
(
&
param
)
...
...
server/api/v1/system/sys_operation_record.go
浏览文件 @
bb33c312
...
@@ -76,7 +76,7 @@ func (s *OperationRecordApi) DeleteSysOperationRecordByIds(c *gin.Context) {
...
@@ -76,7 +76,7 @@ func (s *OperationRecordApi) DeleteSysOperationRecordByIds(c *gin.Context) {
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y system.SysOperationRecord true "Id"
// @Param data
quer
y system.SysOperationRecord true "Id"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /sysOperationRecord/findSysOperationRecord [get]
// @Router /sysOperationRecord/findSysOperationRecord [get]
func
(
s
*
OperationRecordApi
)
FindSysOperationRecord
(
c
*
gin
.
Context
)
{
func
(
s
*
OperationRecordApi
)
FindSysOperationRecord
(
c
*
gin
.
Context
)
{
...
@@ -99,7 +99,7 @@ func (s *OperationRecordApi) FindSysOperationRecord(c *gin.Context) {
...
@@ -99,7 +99,7 @@ func (s *OperationRecordApi) FindSysOperationRecord(c *gin.Context) {
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y request.SysOperationRecordSearch true "页码, 每页大小, 搜索条件"
// @Param data
quer
y request.SysOperationRecordSearch true "页码, 每页大小, 搜索条件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /sysOperationRecord/getSysOperationRecordList [get]
// @Router /sysOperationRecord/getSysOperationRecordList [get]
func
(
s
*
OperationRecordApi
)
GetSysOperationRecordList
(
c
*
gin
.
Context
)
{
func
(
s
*
OperationRecordApi
)
GetSysOperationRecordList
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/system/sys_user.go
浏览文件 @
bb33c312
...
@@ -143,7 +143,7 @@ func (b *BaseApi) Register(c *gin.Context) {
...
@@ -143,7 +143,7 @@ func (b *BaseApi) Register(c *gin.Context) {
// @Produce application/json
// @Produce application/json
// @Param data body systemReq.ChangePasswordStruct true "用户名, 原密码, 新密码"
// @Param data body systemReq.ChangePasswordStruct true "用户名, 原密码, 新密码"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
// @Router /user/changePassword [p
u
t]
// @Router /user/changePassword [p
os
t]
func
(
b
*
BaseApi
)
ChangePassword
(
c
*
gin
.
Context
)
{
func
(
b
*
BaseApi
)
ChangePassword
(
c
*
gin
.
Context
)
{
var
user
systemReq
.
ChangePasswordStruct
var
user
systemReq
.
ChangePasswordStruct
_
=
c
.
ShouldBindJSON
(
&
user
)
_
=
c
.
ShouldBindJSON
(
&
user
)
...
...
server/config.yaml
浏览文件 @
bb33c312
...
@@ -132,3 +132,4 @@ Timer:
...
@@ -132,3 +132,4 @@ Timer:
{
tableName
:
"
sys_operation_records"
,
compareField
:
"
created_at"
,
interval
:
"
2160h"
},
{
tableName
:
"
sys_operation_records"
,
compareField
:
"
created_at"
,
interval
:
"
2160h"
},
#{ tableName: "log2" , compareField: "created_at", interval: "2160h" }
#{ tableName: "log2" , compareField: "created_at", interval: "2160h" }
]
]
server/config/oss.go
浏览文件 @
bb33c312
...
@@ -20,7 +20,7 @@ type AliyunOSS struct {
...
@@ -20,7 +20,7 @@ type AliyunOSS struct {
AccessKeySecret
string
`mapstructure:"access-key-secret" json:"accessKeySecret" yaml:"access-key-secret"`
AccessKeySecret
string
`mapstructure:"access-key-secret" json:"accessKeySecret" yaml:"access-key-secret"`
BucketName
string
`mapstructure:"bucket-name" json:"bucketName" yaml:"bucket-name"`
BucketName
string
`mapstructure:"bucket-name" json:"bucketName" yaml:"bucket-name"`
BucketUrl
string
`mapstructure:"bucket-url" json:"bucketUrl" yaml:"bucket-url"`
BucketUrl
string
`mapstructure:"bucket-url" json:"bucketUrl" yaml:"bucket-url"`
BasePath
string
`mapstructure:"base-path" json:"basePath" yaml:"base-path"`
BasePath
string
`mapstructure:"base-path" json:"basePath" yaml:"base-path"`
}
}
type
TencentCOS
struct
{
type
TencentCOS
struct
{
Bucket
string
`mapstructure:"bucket" json:"bucket" yaml:"bucket"`
Bucket
string
`mapstructure:"bucket" json:"bucket" yaml:"bucket"`
...
...
server/docs/docs.go
浏览文件 @
bb33c312
...
@@ -1013,13 +1013,28 @@ var doc = `{
...
@@ -1013,13 +1013,28 @@ var doc = `{
"summary": "用id查询AutoCodeExample",
"summary": "用id查询AutoCodeExample",
"parameters": [
"parameters": [
{
{
"description": "用id查询AutoCodeExample",
"type": "string",
"name": "data",
"description": "展示值",
"in": "body",
"name": "autoCodeExampleField",
"required": true,
"in": "query"
"schema": {
},
"$ref": "#/definitions/autocode.AutoCodeExample"
{
}
"type": "string",
"description": "创建时间",
"name": "createdAt",
"in": "query"
},
{
"type": "integer",
"description": "主键ID",
"name": "id",
"in": "query"
},
{
"type": "string",
"description": "更新时间",
"name": "updatedAt",
"in": "query"
}
}
],
],
"responses": {
"responses": {
...
@@ -1051,13 +1066,40 @@ var doc = `{
...
@@ -1051,13 +1066,40 @@ var doc = `{
"summary": "分页获取AutoCodeExample列表",
"summary": "分页获取AutoCodeExample列表",
"parameters": [
"parameters": [
{
{
"description": "页码, 每页大小, 搜索条件",
"type": "string",
"name": "data",
"description": "展示值",
"in": "body",
"name": "autoCodeExampleField",
"required": true,
"in": "query"
"schema": {
},
"$ref": "#/definitions/request.AutoCodeExampleSearch"
{
}
"type": "string",
"description": "创建时间",
"name": "createdAt",
"in": "query"
},
{
"type": "integer",
"description": "主键ID",
"name": "id",
"in": "query"
},
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "每页大小",
"name": "pageSize",
"in": "query"
},
{
"type": "string",
"description": "更新时间",
"name": "updatedAt",
"in": "query"
}
}
],
],
"responses": {
"responses": {
...
@@ -1260,13 +1302,46 @@ var doc = `{
...
@@ -1260,13 +1302,46 @@ var doc = `{
"summary": "获取单一客户信息",
"summary": "获取单一客户信息",
"parameters": [
"parameters": [
{
{
"description": "客户ID",
"type": "string",
"name": "data",
"description": "创建时间",
"in": "body",
"name": "createdAt",
"required": true,
"in": "query"
"schema": {
},
"$ref": "#/definitions/example.ExaCustomer"
{
}
"type": "string",
"description": "客户名",
"name": "customerName",
"in": "query"
},
{
"type": "string",
"description": "客户手机号",
"name": "customerPhoneData",
"in": "query"
},
{
"type": "integer",
"description": "主键ID",
"name": "id",
"in": "query"
},
{
"type": "string",
"description": "管理角色ID",
"name": "sysUserAuthorityID",
"in": "query"
},
{
"type": "integer",
"description": "管理ID",
"name": "sysUserId",
"in": "query"
},
{
"type": "string",
"description": "更新时间",
"name": "updatedAt",
"in": "query"
}
}
],
],
"responses": {
"responses": {
...
@@ -1406,13 +1481,16 @@ var doc = `{
...
@@ -1406,13 +1481,16 @@ var doc = `{
"summary": "分页获取权限客户列表",
"summary": "分页获取权限客户列表",
"parameters": [
"parameters": [
{
{
"description": "页码, 每页大小",
"type": "integer",
"name": "data",
"description": "页码",
"in": "body",
"name": "page",
"required": true,
"in": "query"
"schema": {
},
"$ref": "#/definitions/request.PageInfo"
{
}
"type": "integer",
"description": "每页大小",
"name": "pageSize",
"in": "query"
}
}
],
],
"responses": {
"responses": {
...
@@ -1870,7 +1948,7 @@ var doc = `{
...
@@ -1870,7 +1948,7 @@ var doc = `{
}
}
}
}
},
},
"/menu/
GetMenuAuthority
": {
"/menu/
addBaseMenu
": {
"post": {
"post": {
"security": [
"security": [
{
{
...
@@ -1884,23 +1962,23 @@ var doc = `{
...
@@ -1884,23 +1962,23 @@ var doc = `{
"application/json"
"application/json"
],
],
"tags": [
"tags": [
"
Authority
Menu"
"Menu"
],
],
"summary": "
获取指定角色menu
",
"summary": "
新增菜单
",
"parameters": [
"parameters": [
{
{
"description": "
角色ID
",
"description": "
路由path, 父菜单ID, 路由name, 对应前端文件路径, 排序标记
",
"name": "data",
"name": "data",
"in": "body",
"in": "body",
"required": true,
"required": true,
"schema": {
"schema": {
"$ref": "#/definitions/
request.GetAuthorityId
"
"$ref": "#/definitions/
system.SysBaseMenu
"
}
}
}
}
],
],
"responses": {
"responses": {
"200": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"
获取
成功\"}",
"description": "{\"success\":true,\"data\":{},\"msg\":\"
添加
成功\"}",
"schema": {
"schema": {
"type": "string"
"type": "string"
}
}
...
@@ -1908,7 +1986,7 @@ var doc = `{
...
@@ -1908,7 +1986,7 @@ var doc = `{
}
}
}
}
},
},
"/menu/add
BaseMenu
": {
"/menu/add
MenuAuthority
": {
"post": {
"post": {
"security": [
"security": [
{
{
...
@@ -1922,17 +2000,17 @@ var doc = `{
...
@@ -1922,17 +2000,17 @@ var doc = `{
"application/json"
"application/json"
],
],
"tags": [
"tags": [
"Menu"
"
Authority
Menu"
],
],
"summary": "
新增菜单
",
"summary": "
增加menu和角色关联关系
",
"parameters": [
"parameters": [
{
{
"description": "
路由path, 父菜单ID, 路由name, 对应前端文件路径, 排序标记
",
"description": "
角色ID
",
"name": "data",
"name": "data",
"in": "body",
"in": "body",
"required": true,
"required": true,
"schema": {
"schema": {
"$ref": "#/definitions/
system.SysBaseMenu
"
"$ref": "#/definitions/
request.AddMenuAuthorityInfo
"
}
}
}
}
],
],
...
@@ -1946,7 +2024,7 @@ var doc = `{
...
@@ -1946,7 +2024,7 @@ var doc = `{
}
}
}
}
},
},
"/menu/
addMenuAuthority
": {
"/menu/
deleteBaseMenu
": {
"post": {
"post": {
"security": [
"security": [
{
{
...
@@ -1960,23 +2038,23 @@ var doc = `{
...
@@ -1960,23 +2038,23 @@ var doc = `{
"application/json"
"application/json"
],
],
"tags": [
"tags": [
"
Authority
Menu"
"Menu"
],
],
"summary": "
增加menu和角色关联关系
",
"summary": "
删除菜单
",
"parameters": [
"parameters": [
{
{
"description": "
角色ID
",
"description": "
菜单id
",
"name": "data",
"name": "data",
"in": "body",
"in": "body",
"required": true,
"required": true,
"schema": {
"schema": {
"$ref": "#/definitions/request.
AddMenuAuthorityInfo
"
"$ref": "#/definitions/request.
GetById
"
}
}
}
}
],
],
"responses": {
"responses": {
"200": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"
添加
成功\"}",
"description": "{\"success\":true,\"data\":{},\"msg\":\"
删除
成功\"}",
"schema": {
"schema": {
"type": "string"
"type": "string"
}
}
...
@@ -1984,7 +2062,7 @@ var doc = `{
...
@@ -1984,7 +2062,7 @@ var doc = `{
}
}
}
}
},
},
"/menu/
deleteBaseMenu
": {
"/menu/
getBaseMenuById
": {
"post": {
"post": {
"security": [
"security": [
{
{
...
@@ -2000,7 +2078,7 @@ var doc = `{
...
@@ -2000,7 +2078,7 @@ var doc = `{
"tags": [
"tags": [
"Menu"
"Menu"
],
],
"summary": "
删除
菜单",
"summary": "
根据id获取
菜单",
"parameters": [
"parameters": [
{
{
"description": "菜单id",
"description": "菜单id",
...
@@ -2014,7 +2092,7 @@ var doc = `{
...
@@ -2014,7 +2092,7 @@ var doc = `{
],
],
"responses": {
"responses": {
"200": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"
删除
成功\"}",
"description": "{\"success\":true,\"data\":{},\"msg\":\"
获取
成功\"}",
"schema": {
"schema": {
"type": "string"
"type": "string"
}
}
...
@@ -2022,31 +2100,28 @@ var doc = `{
...
@@ -2022,31 +2100,28 @@ var doc = `{
}
}
}
}
},
},
"/menu/getBaseMenu
ById
": {
"/menu/getBaseMenu
Tree
": {
"post": {
"post": {
"security": [
"security": [
{
{
"ApiKeyAuth": []
"ApiKeyAuth": []
}
}
],
],
"consumes": [
"application/json"
],
"produces": [
"produces": [
"application/json"
"application/json"
],
],
"tags": [
"tags": [
"Menu"
"
Authority
Menu"
],
],
"summary": "
根据id获取菜单
",
"summary": "
获取用户动态路由
",
"parameters": [
"parameters": [
{
{
"description": "
菜单id
",
"description": "
空
",
"name": "data",
"name": "data",
"in": "body",
"in": "body",
"required": true,
"required": true,
"schema": {
"schema": {
"$ref": "#/definitions/request.
GetById
"
"$ref": "#/definitions/request.
Empty
"
}
}
}
}
],
],
...
@@ -2060,7 +2135,7 @@ var doc = `{
...
@@ -2060,7 +2135,7 @@ var doc = `{
}
}
}
}
},
},
"/menu/get
BaseMenuTree
": {
"/menu/get
Menu
": {
"post": {
"post": {
"security": [
"security": [
{
{
...
@@ -2095,28 +2170,31 @@ var doc = `{
...
@@ -2095,28 +2170,31 @@ var doc = `{
}
}
}
}
},
},
"/menu/getMenu": {
"/menu/getMenu
Authority
": {
"post": {
"post": {
"security": [
"security": [
{
{
"ApiKeyAuth": []
"ApiKeyAuth": []
}
}
],
],
"consumes": [
"application/json"
],
"produces": [
"produces": [
"application/json"
"application/json"
],
],
"tags": [
"tags": [
"AuthorityMenu"
"AuthorityMenu"
],
],
"summary": "获取
用户动态路由
",
"summary": "获取
指定角色menu
",
"parameters": [
"parameters": [
{
{
"description": "
空
",
"description": "
角色ID
",
"name": "data",
"name": "data",
"in": "body",
"in": "body",
"required": true,
"required": true,
"schema": {
"schema": {
"$ref": "#/definitions/request.
Empty
"
"$ref": "#/definitions/request.
GetAuthorityId
"
}
}
}
}
],
],
...
@@ -2301,13 +2379,46 @@ var doc = `{
...
@@ -2301,13 +2379,46 @@ var doc = `{
"summary": "用id查询SysDictionary",
"summary": "用id查询SysDictionary",
"parameters": [
"parameters": [
{
{
"description": "ID或字典英名",
"type": "string",
"name": "data",
"description": "创建时间",
"in": "body",
"name": "createdAt",
"required": true,
"in": "query"
"schema": {
},
"$ref": "#/definitions/system.SysDictionary"
{
}
"type": "string",
"description": "描述",
"name": "desc",
"in": "query"
},
{
"type": "integer",
"description": "主键ID",
"name": "id",
"in": "query"
},
{
"type": "string",
"description": "字典名(中)",
"name": "name",
"in": "query"
},
{
"type": "boolean",
"description": "状态",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "字典名(英)",
"name": "type",
"in": "query"
},
{
"type": "string",
"description": "更新时间",
"name": "updatedAt",
"in": "query"
}
}
],
],
"responses": {
"responses": {
...
@@ -2339,13 +2450,58 @@ var doc = `{
...
@@ -2339,13 +2450,58 @@ var doc = `{
"summary": "分页获取SysDictionary列表",
"summary": "分页获取SysDictionary列表",
"parameters": [
"parameters": [
{
{
"description": "页码, 每页大小, 搜索条件",
"type": "string",
"name": "data",
"description": "创建时间",
"in": "body",
"name": "createdAt",
"required": true,
"in": "query"
"schema": {
},
"$ref": "#/definitions/request.SysDictionarySearch"
{
}
"type": "string",
"description": "描述",
"name": "desc",
"in": "query"
},
{
"type": "integer",
"description": "主键ID",
"name": "id",
"in": "query"
},
{
"type": "string",
"description": "字典名(中)",
"name": "name",
"in": "query"
},
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "每页大小",
"name": "pageSize",
"in": "query"
},
{
"type": "boolean",
"description": "状态",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "字典名(英)",
"name": "type",
"in": "query"
},
{
"type": "string",
"description": "更新时间",
"name": "updatedAt",
"in": "query"
}
}
],
],
"responses": {
"responses": {
...
@@ -2491,13 +2647,52 @@ var doc = `{
...
@@ -2491,13 +2647,52 @@ var doc = `{
"summary": "用id查询SysDictionaryDetail",
"summary": "用id查询SysDictionaryDetail",
"parameters": [
"parameters": [
{
{
"description": "用id查询SysDictionaryDetail",
"type": "string",
"name": "data",
"description": "创建时间",
"in": "body",
"name": "createdAt",
"required": true,
"in": "query"
"schema": {
},
"$ref": "#/definitions/system.SysDictionaryDetail"
{
}
"type": "integer",
"description": "主键ID",
"name": "id",
"in": "query"
},
{
"type": "string",
"description": "展示值",
"name": "label",
"in": "query"
},
{
"type": "integer",
"description": "排序标记",
"name": "sort",
"in": "query"
},
{
"type": "boolean",
"description": "启用状态",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "关联标记",
"name": "sysDictionaryID",
"in": "query"
},
{
"type": "string",
"description": "更新时间",
"name": "updatedAt",
"in": "query"
},
{
"type": "integer",
"description": "字典值",
"name": "value",
"in": "query"
}
}
],
],
"responses": {
"responses": {
...
@@ -2529,13 +2724,64 @@ var doc = `{
...
@@ -2529,13 +2724,64 @@ var doc = `{
"summary": "分页获取SysDictionaryDetail列表",
"summary": "分页获取SysDictionaryDetail列表",
"parameters": [
"parameters": [
{
{
"description": "页码, 每页大小, 搜索条件",
"type": "string",
"name": "data",
"description": "创建时间",
"in": "body",
"name": "createdAt",
"required": true,
"in": "query"
"schema": {
},
"$ref": "#/definitions/request.SysDictionaryDetailSearch"
{
}
"type": "integer",
"description": "主键ID",
"name": "id",
"in": "query"
},
{
"type": "string",
"description": "展示值",
"name": "label",
"in": "query"
},
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "每页大小",
"name": "pageSize",
"in": "query"
},
{
"type": "integer",
"description": "排序标记",
"name": "sort",
"in": "query"
},
{
"type": "boolean",
"description": "启用状态",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "关联标记",
"name": "sysDictionaryID",
"in": "query"
},
{
"type": "string",
"description": "更新时间",
"name": "updatedAt",
"in": "query"
},
{
"type": "integer",
"description": "字典值",
"name": "value",
"in": "query"
}
}
],
],
"responses": {
"responses": {
...
@@ -2719,13 +2965,82 @@ var doc = `{
...
@@ -2719,13 +2965,82 @@ var doc = `{
"summary": "用id查询SysOperationRecord",
"summary": "用id查询SysOperationRecord",
"parameters": [
"parameters": [
{
{
"description": "Id",
"type": "string",
"name": "data",
"description": "代理",
"in": "body",
"name": "agent",
"required": true,
"in": "query"
"schema": {
},
"$ref": "#/definitions/system.SysOperationRecord"
{
}
"type": "string",
"description": "请求Body",
"name": "body",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "createdAt",
"in": "query"
},
{
"type": "string",
"description": "错误信息",
"name": "error_message",
"in": "query"
},
{
"type": "integer",
"description": "主键ID",
"name": "id",
"in": "query"
},
{
"type": "string",
"description": "请求ip",
"name": "ip",
"in": "query"
},
{
"type": "string",
"description": "延迟",
"name": "latency",
"in": "query"
},
{
"type": "string",
"description": "请求方法",
"name": "method",
"in": "query"
},
{
"type": "string",
"description": "请求路径",
"name": "path",
"in": "query"
},
{
"type": "string",
"description": "响应Body",
"name": "resp",
"in": "query"
},
{
"type": "integer",
"description": "请求状态",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "更新时间",
"name": "updatedAt",
"in": "query"
},
{
"type": "integer",
"description": "用户id",
"name": "user_id",
"in": "query"
}
}
],
],
"responses": {
"responses": {
...
@@ -2757,13 +3072,94 @@ var doc = `{
...
@@ -2757,13 +3072,94 @@ var doc = `{
"summary": "分页获取SysOperationRecord列表",
"summary": "分页获取SysOperationRecord列表",
"parameters": [
"parameters": [
{
{
"description": "页码, 每页大小, 搜索条件",
"type": "string",
"name": "data",
"description": "代理",
"in": "body",
"name": "agent",
"required": true,
"in": "query"
"schema": {
},
"$ref": "#/definitions/request.SysOperationRecordSearch"
{
}
"type": "string",
"description": "请求Body",
"name": "body",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "createdAt",
"in": "query"
},
{
"type": "string",
"description": "错误信息",
"name": "error_message",
"in": "query"
},
{
"type": "integer",
"description": "主键ID",
"name": "id",
"in": "query"
},
{
"type": "string",
"description": "请求ip",
"name": "ip",
"in": "query"
},
{
"type": "string",
"description": "延迟",
"name": "latency",
"in": "query"
},
{
"type": "string",
"description": "请求方法",
"name": "method",
"in": "query"
},
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "每页大小",
"name": "pageSize",
"in": "query"
},
{
"type": "string",
"description": "请求路径",
"name": "path",
"in": "query"
},
{
"type": "string",
"description": "响应Body",
"name": "resp",
"in": "query"
},
{
"type": "integer",
"description": "请求状态",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "更新时间",
"name": "updatedAt",
"in": "query"
},
{
"type": "integer",
"description": "用户id",
"name": "user_id",
"in": "query"
}
}
],
],
"responses": {
"responses": {
...
@@ -2884,7 +3280,7 @@ var doc = `{
...
@@ -2884,7 +3280,7 @@ var doc = `{
}
}
},
},
"/user/changePassword": {
"/user/changePassword": {
"p
u
t": {
"p
os
t": {
"security": [
"security": [
{
{
"ApiKeyAuth": []
"ApiKeyAuth": []
...
@@ -2956,6 +3352,33 @@ var doc = `{
...
@@ -2956,6 +3352,33 @@ var doc = `{
}
}
}
}
},
},
"/user/getUserInfo": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"SysUser"
],
"summary": "获取用户信息",
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/user/getUserList": {
"/user/getUserList": {
"post": {
"post": {
"security": [
"security": [
...
@@ -3024,7 +3447,7 @@ var doc = `{
...
@@ -3024,7 +3447,7 @@ var doc = `{
}
}
}
}
},
},
"/user/setUserAuthorit
y
": {
"/user/setUserAuthorit
ies
": {
"post": {
"post": {
"security": [
"security": [
{
{
...
@@ -3041,6 +3464,44 @@ var doc = `{
...
@@ -3041,6 +3464,44 @@ var doc = `{
"SysUser"
"SysUser"
],
],
"summary": "设置用户权限",
"summary": "设置用户权限",
"parameters": [
{
"description": "用户UUID, 角色ID",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.SetUserAuthorities"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/user/setUserAuthority": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"SysUser"
],
"summary": "更改用户权限",
"parameters": [
"parameters": [
{
{
"description": "用户UUID, 角色ID",
"description": "用户UUID, 角色ID",
...
@@ -3655,35 +4116,6 @@ var doc = `{
...
@@ -3655,35 +4116,6 @@ var doc = `{
}
}
}
}
},
},
"request.AutoCodeExampleSearch": {
"type": "object",
"properties": {
"autoCodeExampleField": {
"description": "展示值",
"type": "string"
},
"createdAt": {
"description": "创建时间",
"type": "string"
},
"id": {
"description": "主键ID",
"type": "integer"
},
"page": {
"description": "页码",
"type": "integer"
},
"pageSize": {
"description": "每页大小",
"type": "integer"
},
"updatedAt": {
"description": "更新时间",
"type": "string"
}
}
},
"request.AutoHistoryByID": {
"request.AutoHistoryByID": {
"type": "object",
"type": "object",
"properties": {
"properties": {
...
@@ -3838,6 +4270,12 @@ var doc = `{
...
@@ -3838,6 +4270,12 @@ var doc = `{
"authorityId": {
"authorityId": {
"type": "string"
"type": "string"
},
},
"authorityIds": {
"type": "array",
"items": {
"type": "string"
}
},
"headerImg": {
"headerImg": {
"type": "string"
"type": "string"
},
},
...
@@ -3907,153 +4345,27 @@ var doc = `{
...
@@ -3907,153 +4345,27 @@ var doc = `{
"authorityId": {
"authorityId": {
"description": "角色ID",
"description": "角色ID",
"type": "string"
"type": "string"
},
"uuid": {
"description": "用户UUID",
"type": "string"
}
}
},
"request.SysAutoHistory": {
"type": "object",
"properties": {
"page": {
"description": "页码",
"type": "integer"
},
"pageSize": {
"description": "每页大小",
"type": "integer"
}
}
}
}
},
},
"request.S
ysDictionaryDetailSearch
": {
"request.S
etUserAuthorities
": {
"type": "object",
"type": "object",
"properties": {
"properties": {
"createdAt": {
"authorityIds": {
"description": "创建时间",
"description": "角色ID",
"type": "string"
},
"id": {
"description": "主键ID",
"type": "integer"
},
"label": {
"description": "展示值",
"type": "string"
},
"page": {
"description": "页码",
"type": "integer"
},
"pageSize": {
"description": "每页大小",
"type": "integer"
},
"sort": {
"description": "排序标记",
"type": "integer"
},
"status": {
"description": "启用状态",
"type": "boolean"
},
"sysDictionaryID": {
"description": "关联标记",
"type": "integer"
},
"updatedAt": {
"description": "更新时间",
"type": "string"
},
"value": {
"description": "字典值",
"type": "integer"
}
}
},
"request.SysDictionarySearch": {
"type": "object",
"properties": {
"createdAt": {
"description": "创建时间",
"type": "string"
},
"desc": {
"description": "描述",
"type": "string"
},
"id": {
"description": "主键ID",
"type": "integer"
},
"name": {
"description": "字典名(中)",
"type": "string"
},
"page": {
"description": "页码",
"type": "integer"
},
"pageSize": {
"description": "每页大小",
"type": "integer"
},
"status": {
"description": "状态",
"type": "boolean"
},
"sysDictionaryDetails": {
"type": "array",
"type": "array",
"items": {
"items": {
"
$ref": "#/definitions/system.SysDictionaryDetail
"
"
type": "string
"
}
}
},
},
"type": {
"id": {
"description": "字典名(英)",
"type": "integer"
"type": "string"
},
"updatedAt": {
"description": "更新时间",
"type": "string"
}
}
}
}
},
},
"request.Sys
OperationRecordSearch
": {
"request.Sys
AutoHistory
": {
"type": "object",
"type": "object",
"properties": {
"properties": {
"agent": {
"description": "代理",
"type": "string"
},
"body": {
"description": "请求Body",
"type": "string"
},
"createdAt": {
"description": "创建时间",
"type": "string"
},
"error_message": {
"description": "错误信息",
"type": "string"
},
"id": {
"description": "主键ID",
"type": "integer"
},
"ip": {
"description": "请求ip",
"type": "string"
},
"latency": {
"description": "延迟",
"type": "string"
},
"method": {
"description": "请求方法",
"type": "string"
},
"page": {
"page": {
"description": "页码",
"description": "页码",
"type": "integer"
"type": "integer"
...
@@ -4061,29 +4373,6 @@ var doc = `{
...
@@ -4061,29 +4373,6 @@ var doc = `{
"pageSize": {
"pageSize": {
"description": "每页大小",
"description": "每页大小",
"type": "integer"
"type": "integer"
},
"path": {
"description": "请求路径",
"type": "string"
},
"resp": {
"description": "响应Body",
"type": "string"
},
"status": {
"description": "请求状态",
"type": "integer"
},
"updatedAt": {
"description": "更新时间",
"type": "string"
},
"user": {
"$ref": "#/definitions/system.SysUser"
},
"user_id": {
"description": "用户id",
"type": "integer"
}
}
}
}
},
},
...
@@ -4524,6 +4813,12 @@ var doc = `{
...
@@ -4524,6 +4813,12 @@ var doc = `{
"description": "活跃颜色",
"description": "活跃颜色",
"type": "string"
"type": "string"
},
},
"authorities": {
"type": "array",
"items": {
"$ref": "#/definitions/system.SysAuthority"
}
},
"authority": {
"authority": {
"$ref": "#/definitions/system.SysAuthority"
"$ref": "#/definitions/system.SysAuthority"
},
},
...
...
server/docs/swagger.json
浏览文件 @
bb33c312
...
@@ -997,13 +997,28 @@
...
@@ -997,13 +997,28 @@
"summary"
:
"用id查询AutoCodeExample"
,
"summary"
:
"用id查询AutoCodeExample"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"用id查询AutoCodeExample"
,
"type"
:
"string"
,
"name"
:
"data"
,
"description"
:
"展示值"
,
"in"
:
"body"
,
"name"
:
"autoCodeExampleField"
,
"required"
:
true
,
"in"
:
"query"
"schema"
:
{
},
"$ref"
:
"#/definitions/autocode.AutoCodeExample"
{
}
"type"
:
"string"
,
"description"
:
"创建时间"
,
"name"
:
"createdAt"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"主键ID"
,
"name"
:
"id"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"更新时间"
,
"name"
:
"updatedAt"
,
"in"
:
"query"
}
}
],
],
"responses"
:
{
"responses"
:
{
...
@@ -1035,13 +1050,40 @@
...
@@ -1035,13 +1050,40 @@
"summary"
:
"分页获取AutoCodeExample列表"
,
"summary"
:
"分页获取AutoCodeExample列表"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"页码, 每页大小, 搜索条件"
,
"type"
:
"string"
,
"name"
:
"data"
,
"description"
:
"展示值"
,
"in"
:
"body"
,
"name"
:
"autoCodeExampleField"
,
"required"
:
true
,
"in"
:
"query"
"schema"
:
{
},
"$ref"
:
"#/definitions/request.AutoCodeExampleSearch"
{
}
"type"
:
"string"
,
"description"
:
"创建时间"
,
"name"
:
"createdAt"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"主键ID"
,
"name"
:
"id"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"页码"
,
"name"
:
"page"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"每页大小"
,
"name"
:
"pageSize"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"更新时间"
,
"name"
:
"updatedAt"
,
"in"
:
"query"
}
}
],
],
"responses"
:
{
"responses"
:
{
...
@@ -1244,13 +1286,46 @@
...
@@ -1244,13 +1286,46 @@
"summary"
:
"获取单一客户信息"
,
"summary"
:
"获取单一客户信息"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"客户ID"
,
"type"
:
"string"
,
"name"
:
"data"
,
"description"
:
"创建时间"
,
"in"
:
"body"
,
"name"
:
"createdAt"
,
"required"
:
true
,
"in"
:
"query"
"schema"
:
{
},
"$ref"
:
"#/definitions/example.ExaCustomer"
{
}
"type"
:
"string"
,
"description"
:
"客户名"
,
"name"
:
"customerName"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"客户手机号"
,
"name"
:
"customerPhoneData"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"主键ID"
,
"name"
:
"id"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"管理角色ID"
,
"name"
:
"sysUserAuthorityID"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"管理ID"
,
"name"
:
"sysUserId"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"更新时间"
,
"name"
:
"updatedAt"
,
"in"
:
"query"
}
}
],
],
"responses"
:
{
"responses"
:
{
...
@@ -1390,13 +1465,16 @@
...
@@ -1390,13 +1465,16 @@
"summary"
:
"分页获取权限客户列表"
,
"summary"
:
"分页获取权限客户列表"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"页码, 每页大小"
,
"type"
:
"integer"
,
"name"
:
"data"
,
"description"
:
"页码"
,
"in"
:
"body"
,
"name"
:
"page"
,
"required"
:
true
,
"in"
:
"query"
"schema"
:
{
},
"$ref"
:
"#/definitions/request.PageInfo"
{
}
"type"
:
"integer"
,
"description"
:
"每页大小"
,
"name"
:
"pageSize"
,
"in"
:
"query"
}
}
],
],
"responses"
:
{
"responses"
:
{
...
@@ -1854,7 +1932,7 @@
...
@@ -1854,7 +1932,7 @@
}
}
}
}
},
},
"/menu/
GetMenuAuthority
"
:
{
"/menu/
addBaseMenu
"
:
{
"post"
:
{
"post"
:
{
"security"
:
[
"security"
:
[
{
{
...
@@ -1868,23 +1946,23 @@
...
@@ -1868,23 +1946,23 @@
"application/json"
"application/json"
],
],
"tags"
:
[
"tags"
:
[
"
Authority
Menu"
"Menu"
],
],
"summary"
:
"
获取指定角色menu
"
,
"summary"
:
"
新增菜单
"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"
角色ID
"
,
"description"
:
"
路由path, 父菜单ID, 路由name, 对应前端文件路径, 排序标记
"
,
"name"
:
"data"
,
"name"
:
"data"
,
"in"
:
"body"
,
"in"
:
"body"
,
"required"
:
true
,
"required"
:
true
,
"schema"
:
{
"schema"
:
{
"$ref"
:
"#/definitions/
request.GetAuthorityId
"
"$ref"
:
"#/definitions/
system.SysBaseMenu
"
}
}
}
}
],
],
"responses"
:
{
"responses"
:
{
"200"
:
{
"200"
:
{
"description"
:
"{
\"
success
\"
:true,
\"
data
\"
:{},
\"
msg
\"
:
\"
获取
成功
\"
}"
,
"description"
:
"{
\"
success
\"
:true,
\"
data
\"
:{},
\"
msg
\"
:
\"
添加
成功
\"
}"
,
"schema"
:
{
"schema"
:
{
"type"
:
"string"
"type"
:
"string"
}
}
...
@@ -1892,7 +1970,7 @@
...
@@ -1892,7 +1970,7 @@
}
}
}
}
},
},
"/menu/add
BaseMenu
"
:
{
"/menu/add
MenuAuthority
"
:
{
"post"
:
{
"post"
:
{
"security"
:
[
"security"
:
[
{
{
...
@@ -1906,17 +1984,17 @@
...
@@ -1906,17 +1984,17 @@
"application/json"
"application/json"
],
],
"tags"
:
[
"tags"
:
[
"Menu"
"
Authority
Menu"
],
],
"summary"
:
"
新增菜单
"
,
"summary"
:
"
增加menu和角色关联关系
"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"
路由path, 父菜单ID, 路由name, 对应前端文件路径, 排序标记
"
,
"description"
:
"
角色ID
"
,
"name"
:
"data"
,
"name"
:
"data"
,
"in"
:
"body"
,
"in"
:
"body"
,
"required"
:
true
,
"required"
:
true
,
"schema"
:
{
"schema"
:
{
"$ref"
:
"#/definitions/
system.SysBaseMenu
"
"$ref"
:
"#/definitions/
request.AddMenuAuthorityInfo
"
}
}
}
}
],
],
...
@@ -1930,7 +2008,7 @@
...
@@ -1930,7 +2008,7 @@
}
}
}
}
},
},
"/menu/
addMenuAuthority
"
:
{
"/menu/
deleteBaseMenu
"
:
{
"post"
:
{
"post"
:
{
"security"
:
[
"security"
:
[
{
{
...
@@ -1944,23 +2022,23 @@
...
@@ -1944,23 +2022,23 @@
"application/json"
"application/json"
],
],
"tags"
:
[
"tags"
:
[
"
Authority
Menu"
"Menu"
],
],
"summary"
:
"
增加menu和角色关联关系
"
,
"summary"
:
"
删除菜单
"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"
角色ID
"
,
"description"
:
"
菜单id
"
,
"name"
:
"data"
,
"name"
:
"data"
,
"in"
:
"body"
,
"in"
:
"body"
,
"required"
:
true
,
"required"
:
true
,
"schema"
:
{
"schema"
:
{
"$ref"
:
"#/definitions/request.
AddMenuAuthorityInfo
"
"$ref"
:
"#/definitions/request.
GetById
"
}
}
}
}
],
],
"responses"
:
{
"responses"
:
{
"200"
:
{
"200"
:
{
"description"
:
"{
\"
success
\"
:true,
\"
data
\"
:{},
\"
msg
\"
:
\"
添加
成功
\"
}"
,
"description"
:
"{
\"
success
\"
:true,
\"
data
\"
:{},
\"
msg
\"
:
\"
删除
成功
\"
}"
,
"schema"
:
{
"schema"
:
{
"type"
:
"string"
"type"
:
"string"
}
}
...
@@ -1968,7 +2046,7 @@
...
@@ -1968,7 +2046,7 @@
}
}
}
}
},
},
"/menu/
deleteBaseMenu
"
:
{
"/menu/
getBaseMenuById
"
:
{
"post"
:
{
"post"
:
{
"security"
:
[
"security"
:
[
{
{
...
@@ -1984,7 +2062,7 @@
...
@@ -1984,7 +2062,7 @@
"tags"
:
[
"tags"
:
[
"Menu"
"Menu"
],
],
"summary"
:
"
删除
菜单"
,
"summary"
:
"
根据id获取
菜单"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"菜单id"
,
"description"
:
"菜单id"
,
...
@@ -1998,7 +2076,7 @@
...
@@ -1998,7 +2076,7 @@
],
],
"responses"
:
{
"responses"
:
{
"200"
:
{
"200"
:
{
"description"
:
"{
\"
success
\"
:true,
\"
data
\"
:{},
\"
msg
\"
:
\"
删除
成功
\"
}"
,
"description"
:
"{
\"
success
\"
:true,
\"
data
\"
:{},
\"
msg
\"
:
\"
获取
成功
\"
}"
,
"schema"
:
{
"schema"
:
{
"type"
:
"string"
"type"
:
"string"
}
}
...
@@ -2006,31 +2084,28 @@
...
@@ -2006,31 +2084,28 @@
}
}
}
}
},
},
"/menu/getBaseMenu
ById
"
:
{
"/menu/getBaseMenu
Tree
"
:
{
"post"
:
{
"post"
:
{
"security"
:
[
"security"
:
[
{
{
"ApiKeyAuth"
:
[]
"ApiKeyAuth"
:
[]
}
}
],
],
"consumes"
:
[
"application/json"
],
"produces"
:
[
"produces"
:
[
"application/json"
"application/json"
],
],
"tags"
:
[
"tags"
:
[
"Menu"
"
Authority
Menu"
],
],
"summary"
:
"
根据id获取菜单
"
,
"summary"
:
"
获取用户动态路由
"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"
菜单id
"
,
"description"
:
"
空
"
,
"name"
:
"data"
,
"name"
:
"data"
,
"in"
:
"body"
,
"in"
:
"body"
,
"required"
:
true
,
"required"
:
true
,
"schema"
:
{
"schema"
:
{
"$ref"
:
"#/definitions/request.
GetById
"
"$ref"
:
"#/definitions/request.
Empty
"
}
}
}
}
],
],
...
@@ -2044,7 +2119,7 @@
...
@@ -2044,7 +2119,7 @@
}
}
}
}
},
},
"/menu/get
BaseMenuTree
"
:
{
"/menu/get
Menu
"
:
{
"post"
:
{
"post"
:
{
"security"
:
[
"security"
:
[
{
{
...
@@ -2079,28 +2154,31 @@
...
@@ -2079,28 +2154,31 @@
}
}
}
}
},
},
"/menu/getMenu"
:
{
"/menu/getMenu
Authority
"
:
{
"post"
:
{
"post"
:
{
"security"
:
[
"security"
:
[
{
{
"ApiKeyAuth"
:
[]
"ApiKeyAuth"
:
[]
}
}
],
],
"consumes"
:
[
"application/json"
],
"produces"
:
[
"produces"
:
[
"application/json"
"application/json"
],
],
"tags"
:
[
"tags"
:
[
"AuthorityMenu"
"AuthorityMenu"
],
],
"summary"
:
"获取
用户动态路由
"
,
"summary"
:
"获取
指定角色menu
"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"
空
"
,
"description"
:
"
角色ID
"
,
"name"
:
"data"
,
"name"
:
"data"
,
"in"
:
"body"
,
"in"
:
"body"
,
"required"
:
true
,
"required"
:
true
,
"schema"
:
{
"schema"
:
{
"$ref"
:
"#/definitions/request.
Empty
"
"$ref"
:
"#/definitions/request.
GetAuthorityId
"
}
}
}
}
],
],
...
@@ -2285,13 +2363,46 @@
...
@@ -2285,13 +2363,46 @@
"summary"
:
"用id查询SysDictionary"
,
"summary"
:
"用id查询SysDictionary"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"ID或字典英名"
,
"type"
:
"string"
,
"name"
:
"data"
,
"description"
:
"创建时间"
,
"in"
:
"body"
,
"name"
:
"createdAt"
,
"required"
:
true
,
"in"
:
"query"
"schema"
:
{
},
"$ref"
:
"#/definitions/system.SysDictionary"
{
}
"type"
:
"string"
,
"description"
:
"描述"
,
"name"
:
"desc"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"主键ID"
,
"name"
:
"id"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"字典名(中)"
,
"name"
:
"name"
,
"in"
:
"query"
},
{
"type"
:
"boolean"
,
"description"
:
"状态"
,
"name"
:
"status"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"字典名(英)"
,
"name"
:
"type"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"更新时间"
,
"name"
:
"updatedAt"
,
"in"
:
"query"
}
}
],
],
"responses"
:
{
"responses"
:
{
...
@@ -2323,13 +2434,58 @@
...
@@ -2323,13 +2434,58 @@
"summary"
:
"分页获取SysDictionary列表"
,
"summary"
:
"分页获取SysDictionary列表"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"页码, 每页大小, 搜索条件"
,
"type"
:
"string"
,
"name"
:
"data"
,
"description"
:
"创建时间"
,
"in"
:
"body"
,
"name"
:
"createdAt"
,
"required"
:
true
,
"in"
:
"query"
"schema"
:
{
},
"$ref"
:
"#/definitions/request.SysDictionarySearch"
{
}
"type"
:
"string"
,
"description"
:
"描述"
,
"name"
:
"desc"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"主键ID"
,
"name"
:
"id"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"字典名(中)"
,
"name"
:
"name"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"页码"
,
"name"
:
"page"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"每页大小"
,
"name"
:
"pageSize"
,
"in"
:
"query"
},
{
"type"
:
"boolean"
,
"description"
:
"状态"
,
"name"
:
"status"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"字典名(英)"
,
"name"
:
"type"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"更新时间"
,
"name"
:
"updatedAt"
,
"in"
:
"query"
}
}
],
],
"responses"
:
{
"responses"
:
{
...
@@ -2475,13 +2631,52 @@
...
@@ -2475,13 +2631,52 @@
"summary"
:
"用id查询SysDictionaryDetail"
,
"summary"
:
"用id查询SysDictionaryDetail"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"用id查询SysDictionaryDetail"
,
"type"
:
"string"
,
"name"
:
"data"
,
"description"
:
"创建时间"
,
"in"
:
"body"
,
"name"
:
"createdAt"
,
"required"
:
true
,
"in"
:
"query"
"schema"
:
{
},
"$ref"
:
"#/definitions/system.SysDictionaryDetail"
{
}
"type"
:
"integer"
,
"description"
:
"主键ID"
,
"name"
:
"id"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"展示值"
,
"name"
:
"label"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"排序标记"
,
"name"
:
"sort"
,
"in"
:
"query"
},
{
"type"
:
"boolean"
,
"description"
:
"启用状态"
,
"name"
:
"status"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"关联标记"
,
"name"
:
"sysDictionaryID"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"更新时间"
,
"name"
:
"updatedAt"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"字典值"
,
"name"
:
"value"
,
"in"
:
"query"
}
}
],
],
"responses"
:
{
"responses"
:
{
...
@@ -2513,13 +2708,64 @@
...
@@ -2513,13 +2708,64 @@
"summary"
:
"分页获取SysDictionaryDetail列表"
,
"summary"
:
"分页获取SysDictionaryDetail列表"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"页码, 每页大小, 搜索条件"
,
"type"
:
"string"
,
"name"
:
"data"
,
"description"
:
"创建时间"
,
"in"
:
"body"
,
"name"
:
"createdAt"
,
"required"
:
true
,
"in"
:
"query"
"schema"
:
{
},
"$ref"
:
"#/definitions/request.SysDictionaryDetailSearch"
{
}
"type"
:
"integer"
,
"description"
:
"主键ID"
,
"name"
:
"id"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"展示值"
,
"name"
:
"label"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"页码"
,
"name"
:
"page"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"每页大小"
,
"name"
:
"pageSize"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"排序标记"
,
"name"
:
"sort"
,
"in"
:
"query"
},
{
"type"
:
"boolean"
,
"description"
:
"启用状态"
,
"name"
:
"status"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"关联标记"
,
"name"
:
"sysDictionaryID"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"更新时间"
,
"name"
:
"updatedAt"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"字典值"
,
"name"
:
"value"
,
"in"
:
"query"
}
}
],
],
"responses"
:
{
"responses"
:
{
...
@@ -2703,13 +2949,82 @@
...
@@ -2703,13 +2949,82 @@
"summary"
:
"用id查询SysOperationRecord"
,
"summary"
:
"用id查询SysOperationRecord"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"Id"
,
"type"
:
"string"
,
"name"
:
"data"
,
"description"
:
"代理"
,
"in"
:
"body"
,
"name"
:
"agent"
,
"required"
:
true
,
"in"
:
"query"
"schema"
:
{
},
"$ref"
:
"#/definitions/system.SysOperationRecord"
{
}
"type"
:
"string"
,
"description"
:
"请求Body"
,
"name"
:
"body"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"创建时间"
,
"name"
:
"createdAt"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"错误信息"
,
"name"
:
"error_message"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"主键ID"
,
"name"
:
"id"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"请求ip"
,
"name"
:
"ip"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"延迟"
,
"name"
:
"latency"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"请求方法"
,
"name"
:
"method"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"请求路径"
,
"name"
:
"path"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"响应Body"
,
"name"
:
"resp"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"请求状态"
,
"name"
:
"status"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"更新时间"
,
"name"
:
"updatedAt"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"用户id"
,
"name"
:
"user_id"
,
"in"
:
"query"
}
}
],
],
"responses"
:
{
"responses"
:
{
...
@@ -2741,13 +3056,94 @@
...
@@ -2741,13 +3056,94 @@
"summary"
:
"分页获取SysOperationRecord列表"
,
"summary"
:
"分页获取SysOperationRecord列表"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"页码, 每页大小, 搜索条件"
,
"type"
:
"string"
,
"name"
:
"data"
,
"description"
:
"代理"
,
"in"
:
"body"
,
"name"
:
"agent"
,
"required"
:
true
,
"in"
:
"query"
"schema"
:
{
},
"$ref"
:
"#/definitions/request.SysOperationRecordSearch"
{
}
"type"
:
"string"
,
"description"
:
"请求Body"
,
"name"
:
"body"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"创建时间"
,
"name"
:
"createdAt"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"错误信息"
,
"name"
:
"error_message"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"主键ID"
,
"name"
:
"id"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"请求ip"
,
"name"
:
"ip"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"延迟"
,
"name"
:
"latency"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"请求方法"
,
"name"
:
"method"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"页码"
,
"name"
:
"page"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"每页大小"
,
"name"
:
"pageSize"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"请求路径"
,
"name"
:
"path"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"响应Body"
,
"name"
:
"resp"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"请求状态"
,
"name"
:
"status"
,
"in"
:
"query"
},
{
"type"
:
"string"
,
"description"
:
"更新时间"
,
"name"
:
"updatedAt"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"用户id"
,
"name"
:
"user_id"
,
"in"
:
"query"
}
}
],
],
"responses"
:
{
"responses"
:
{
...
@@ -2868,7 +3264,7 @@
...
@@ -2868,7 +3264,7 @@
}
}
},
},
"/user/changePassword"
:
{
"/user/changePassword"
:
{
"p
u
t"
:
{
"p
os
t"
:
{
"security"
:
[
"security"
:
[
{
{
"ApiKeyAuth"
:
[]
"ApiKeyAuth"
:
[]
...
@@ -2940,6 +3336,33 @@
...
@@ -2940,6 +3336,33 @@
}
}
}
}
},
},
"/user/getUserInfo"
:
{
"get"
:
{
"security"
:
[
{
"ApiKeyAuth"
:
[]
}
],
"consumes"
:
[
"application/json"
],
"produces"
:
[
"application/json"
],
"tags"
:
[
"SysUser"
],
"summary"
:
"获取用户信息"
,
"responses"
:
{
"200"
:
{
"description"
:
"{
\"
success
\"
:true,
\"
data
\"
:{},
\"
msg
\"
:
\"
获取成功
\"
}"
,
"schema"
:
{
"type"
:
"string"
}
}
}
}
},
"/user/getUserList"
:
{
"/user/getUserList"
:
{
"post"
:
{
"post"
:
{
"security"
:
[
"security"
:
[
...
@@ -3008,7 +3431,7 @@
...
@@ -3008,7 +3431,7 @@
}
}
}
}
},
},
"/user/setUserAuthorit
y
"
:
{
"/user/setUserAuthorit
ies
"
:
{
"post"
:
{
"post"
:
{
"security"
:
[
"security"
:
[
{
{
...
@@ -3025,6 +3448,44 @@
...
@@ -3025,6 +3448,44 @@
"SysUser"
"SysUser"
],
],
"summary"
:
"设置用户权限"
,
"summary"
:
"设置用户权限"
,
"parameters"
:
[
{
"description"
:
"用户UUID, 角色ID"
,
"name"
:
"data"
,
"in"
:
"body"
,
"required"
:
true
,
"schema"
:
{
"$ref"
:
"#/definitions/request.SetUserAuthorities"
}
}
],
"responses"
:
{
"200"
:
{
"description"
:
"{
\"
success
\"
:true,
\"
data
\"
:{},
\"
msg
\"
:
\"
修改成功
\"
}"
,
"schema"
:
{
"type"
:
"string"
}
}
}
}
},
"/user/setUserAuthority"
:
{
"post"
:
{
"security"
:
[
{
"ApiKeyAuth"
:
[]
}
],
"consumes"
:
[
"application/json"
],
"produces"
:
[
"application/json"
],
"tags"
:
[
"SysUser"
],
"summary"
:
"更改用户权限"
,
"parameters"
:
[
"parameters"
:
[
{
{
"description"
:
"用户UUID, 角色ID"
,
"description"
:
"用户UUID, 角色ID"
,
...
@@ -3639,35 +4100,6 @@
...
@@ -3639,35 +4100,6 @@
}
}
}
}
},
},
"request.AutoCodeExampleSearch"
:
{
"type"
:
"object"
,
"properties"
:
{
"autoCodeExampleField"
:
{
"description"
:
"展示值"
,
"type"
:
"string"
},
"createdAt"
:
{
"description"
:
"创建时间"
,
"type"
:
"string"
},
"id"
:
{
"description"
:
"主键ID"
,
"type"
:
"integer"
},
"page"
:
{
"description"
:
"页码"
,
"type"
:
"integer"
},
"pageSize"
:
{
"description"
:
"每页大小"
,
"type"
:
"integer"
},
"updatedAt"
:
{
"description"
:
"更新时间"
,
"type"
:
"string"
}
}
},
"request.AutoHistoryByID"
:
{
"request.AutoHistoryByID"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
...
@@ -3822,6 +4254,12 @@
...
@@ -3822,6 +4254,12 @@
"authorityId"
:
{
"authorityId"
:
{
"type"
:
"string"
"type"
:
"string"
},
},
"authorityIds"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"string"
}
},
"headerImg"
:
{
"headerImg"
:
{
"type"
:
"string"
"type"
:
"string"
},
},
...
@@ -3891,153 +4329,27 @@
...
@@ -3891,153 +4329,27 @@
"authorityId"
:
{
"authorityId"
:
{
"description"
:
"角色ID"
,
"description"
:
"角色ID"
,
"type"
:
"string"
"type"
:
"string"
},
"uuid"
:
{
"description"
:
"用户UUID"
,
"type"
:
"string"
}
}
},
"request.SysAutoHistory"
:
{
"type"
:
"object"
,
"properties"
:
{
"page"
:
{
"description"
:
"页码"
,
"type"
:
"integer"
},
"pageSize"
:
{
"description"
:
"每页大小"
,
"type"
:
"integer"
}
}
}
}
},
},
"request.S
ysDictionaryDetailSearch
"
:
{
"request.S
etUserAuthorities
"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
"createdAt"
:
{
"authorityIds"
:
{
"description"
:
"创建时间"
,
"description"
:
"角色ID"
,
"type"
:
"string"
},
"id"
:
{
"description"
:
"主键ID"
,
"type"
:
"integer"
},
"label"
:
{
"description"
:
"展示值"
,
"type"
:
"string"
},
"page"
:
{
"description"
:
"页码"
,
"type"
:
"integer"
},
"pageSize"
:
{
"description"
:
"每页大小"
,
"type"
:
"integer"
},
"sort"
:
{
"description"
:
"排序标记"
,
"type"
:
"integer"
},
"status"
:
{
"description"
:
"启用状态"
,
"type"
:
"boolean"
},
"sysDictionaryID"
:
{
"description"
:
"关联标记"
,
"type"
:
"integer"
},
"updatedAt"
:
{
"description"
:
"更新时间"
,
"type"
:
"string"
},
"value"
:
{
"description"
:
"字典值"
,
"type"
:
"integer"
}
}
},
"request.SysDictionarySearch"
:
{
"type"
:
"object"
,
"properties"
:
{
"createdAt"
:
{
"description"
:
"创建时间"
,
"type"
:
"string"
},
"desc"
:
{
"description"
:
"描述"
,
"type"
:
"string"
},
"id"
:
{
"description"
:
"主键ID"
,
"type"
:
"integer"
},
"name"
:
{
"description"
:
"字典名(中)"
,
"type"
:
"string"
},
"page"
:
{
"description"
:
"页码"
,
"type"
:
"integer"
},
"pageSize"
:
{
"description"
:
"每页大小"
,
"type"
:
"integer"
},
"status"
:
{
"description"
:
"状态"
,
"type"
:
"boolean"
},
"sysDictionaryDetails"
:
{
"type"
:
"array"
,
"type"
:
"array"
,
"items"
:
{
"items"
:
{
"
$ref"
:
"#/definitions/system.SysDictionaryDetail
"
"
type"
:
"string
"
}
}
},
},
"type"
:
{
"id"
:
{
"description"
:
"字典名(英)"
,
"type"
:
"integer"
"type"
:
"string"
},
"updatedAt"
:
{
"description"
:
"更新时间"
,
"type"
:
"string"
}
}
}
}
},
},
"request.Sys
OperationRecordSearch
"
:
{
"request.Sys
AutoHistory
"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
"agent"
:
{
"description"
:
"代理"
,
"type"
:
"string"
},
"body"
:
{
"description"
:
"请求Body"
,
"type"
:
"string"
},
"createdAt"
:
{
"description"
:
"创建时间"
,
"type"
:
"string"
},
"error_message"
:
{
"description"
:
"错误信息"
,
"type"
:
"string"
},
"id"
:
{
"description"
:
"主键ID"
,
"type"
:
"integer"
},
"ip"
:
{
"description"
:
"请求ip"
,
"type"
:
"string"
},
"latency"
:
{
"description"
:
"延迟"
,
"type"
:
"string"
},
"method"
:
{
"description"
:
"请求方法"
,
"type"
:
"string"
},
"page"
:
{
"page"
:
{
"description"
:
"页码"
,
"description"
:
"页码"
,
"type"
:
"integer"
"type"
:
"integer"
...
@@ -4045,29 +4357,6 @@
...
@@ -4045,29 +4357,6 @@
"pageSize"
:
{
"pageSize"
:
{
"description"
:
"每页大小"
,
"description"
:
"每页大小"
,
"type"
:
"integer"
"type"
:
"integer"
},
"path"
:
{
"description"
:
"请求路径"
,
"type"
:
"string"
},
"resp"
:
{
"description"
:
"响应Body"
,
"type"
:
"string"
},
"status"
:
{
"description"
:
"请求状态"
,
"type"
:
"integer"
},
"updatedAt"
:
{
"description"
:
"更新时间"
,
"type"
:
"string"
},
"user"
:
{
"$ref"
:
"#/definitions/system.SysUser"
},
"user_id"
:
{
"description"
:
"用户id"
,
"type"
:
"integer"
}
}
}
}
},
},
...
@@ -4508,6 +4797,12 @@
...
@@ -4508,6 +4797,12 @@
"description"
:
"活跃颜色"
,
"description"
:
"活跃颜色"
,
"type"
:
"string"
"type"
:
"string"
},
},
"authorities"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"#/definitions/system.SysAuthority"
}
},
"authority"
:
{
"authority"
:
{
"$ref"
:
"#/definitions/system.SysAuthority"
"$ref"
:
"#/definitions/system.SysAuthority"
},
},
...
...
server/docs/swagger.yaml
浏览文件 @
bb33c312
...
@@ -387,27 +387,6 @@ definitions:
...
@@ -387,27 +387,6 @@ definitions:
$ref
:
'
#/definitions/system.SysBaseMenu'
$ref
:
'
#/definitions/system.SysBaseMenu'
type
:
array
type
:
array
type
:
object
type
:
object
request.AutoCodeExampleSearch
:
properties
:
autoCodeExampleField
:
description
:
展示值
type
:
string
createdAt
:
description
:
创建时间
type
:
string
id
:
description
:
主键ID
type
:
integer
page
:
description
:
页码
type
:
integer
pageSize
:
description
:
每页大小
type
:
integer
updatedAt
:
description
:
更新时间
type
:
string
type
:
object
request.AutoHistoryByID
:
request.AutoHistoryByID
:
properties
:
properties
:
id
:
id
:
...
@@ -514,6 +493,10 @@ definitions:
...
@@ -514,6 +493,10 @@ definitions:
properties
:
properties
:
authorityId
:
authorityId
:
type
:
string
type
:
string
authorityIds
:
items
:
type
:
string
type
:
array
headerImg
:
headerImg
:
type
:
string
type
:
string
nickName
:
nickName
:
...
@@ -564,135 +547,25 @@ definitions:
...
@@ -564,135 +547,25 @@ definitions:
authorityId
:
authorityId
:
description
:
角色ID
description
:
角色ID
type
:
string
type
:
string
uuid
:
description
:
用户UUID
type
:
string
type
:
object
type
:
object
request.S
ysAutoHistory
:
request.S
etUserAuthorities
:
properties
:
properties
:
page
:
authorityIds
:
description
:
页码
description
:
角色ID
type
:
integer
pageSize
:
description
:
每页大小
type
:
integer
type
:
object
request.SysDictionaryDetailSearch
:
properties
:
createdAt
:
description
:
创建时间
type
:
string
id
:
description
:
主键ID
type
:
integer
label
:
description
:
展示值
type
:
string
page
:
description
:
页码
type
:
integer
pageSize
:
description
:
每页大小
type
:
integer
sort
:
description
:
排序标记
type
:
integer
status
:
description
:
启用状态
type
:
boolean
sysDictionaryID
:
description
:
关联标记
type
:
integer
updatedAt
:
description
:
更新时间
type
:
string
value
:
description
:
字典值
type
:
integer
type
:
object
request.SysDictionarySearch
:
properties
:
createdAt
:
description
:
创建时间
type
:
string
desc
:
description
:
描述
type
:
string
id
:
description
:
主键ID
type
:
integer
name
:
description
:
字典名(中)
type
:
string
page
:
description
:
页码
type
:
integer
pageSize
:
description
:
每页大小
type
:
integer
status
:
description
:
状态
type
:
boolean
sysDictionaryDetails
:
items
:
items
:
$ref
:
'
#/definitions/system.SysDictionaryDetail'
type
:
string
type
:
array
type
:
array
type
:
description
:
字典名(英)
type
:
string
updatedAt
:
description
:
更新时间
type
:
string
type
:
object
request.SysOperationRecordSearch
:
properties
:
agent
:
description
:
代理
type
:
string
body
:
description
:
请求Body
type
:
string
createdAt
:
description
:
创建时间
type
:
string
error_message
:
description
:
错误信息
type
:
string
id
:
id
:
description
:
主键ID
type
:
integer
type
:
integer
ip
:
type
:
object
description
:
请求ip
request.SysAutoHistory
:
type
:
string
properties
:
latency
:
description
:
延迟
type
:
string
method
:
description
:
请求方法
type
:
string
page
:
page
:
description
:
页码
description
:
页码
type
:
integer
type
:
integer
pageSize
:
pageSize
:
description
:
每页大小
description
:
每页大小
type
:
integer
type
:
integer
path
:
description
:
请求路径
type
:
string
resp
:
description
:
响应Body
type
:
string
status
:
description
:
请求状态
type
:
integer
updatedAt
:
description
:
更新时间
type
:
string
user
:
$ref
:
'
#/definitions/system.SysUser'
user_id
:
description
:
用户id
type
:
integer
type
:
object
type
:
object
response.SysAuthorityCopyResponse
:
response.SysAuthorityCopyResponse
:
properties
:
properties
:
...
@@ -1009,6 +882,10 @@ definitions:
...
@@ -1009,6 +882,10 @@ definitions:
activeColor
:
activeColor
:
description
:
活跃颜色
description
:
活跃颜色
type
:
string
type
:
string
authorities
:
items
:
$ref
:
'
#/definitions/system.SysAuthority'
type
:
array
authority
:
authority
:
$ref
:
'
#/definitions/system.SysAuthority'
$ref
:
'
#/definitions/system.SysAuthority'
authorityId
:
authorityId
:
...
@@ -1644,12 +1521,22 @@ paths:
...
@@ -1644,12 +1521,22 @@ paths:
consumes
:
consumes
:
-
application/json
-
application/json
parameters
:
parameters
:
-
description
:
用id查询AutoCodeExample
-
description
:
展示值
in
:
body
in
:
query
name
:
data
name
:
autoCodeExampleField
required
:
true
type
:
string
schema
:
-
description
:
创建时间
$ref
:
'
#/definitions/autocode.AutoCodeExample'
in
:
query
name
:
createdAt
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
produces
:
produces
:
-
application/json
-
application/json
responses
:
responses
:
...
@@ -1667,12 +1554,30 @@ paths:
...
@@ -1667,12 +1554,30 @@ paths:
consumes
:
consumes
:
-
application/json
-
application/json
parameters
:
parameters
:
-
description
:
页码, 每页大小, 搜索条件
-
description
:
展示值
in
:
body
in
:
query
name
:
data
name
:
autoCodeExampleField
required
:
true
type
:
string
schema
:
-
description
:
创建时间
$ref
:
'
#/definitions/request.AutoCodeExampleSearch'
in
:
query
name
:
createdAt
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
页码
in
:
query
name
:
page
type
:
integer
-
description
:
每页大小
in
:
query
name
:
pageSize
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
produces
:
produces
:
-
application/json
-
application/json
responses
:
responses
:
...
@@ -1816,12 +1721,34 @@ paths:
...
@@ -1816,12 +1721,34 @@ paths:
consumes
:
consumes
:
-
application/json
-
application/json
parameters
:
parameters
:
-
description
:
客户ID
-
description
:
创建时间
in
:
body
in
:
query
name
:
data
name
:
createdAt
required
:
true
type
:
string
schema
:
-
description
:
客户名
$ref
:
'
#/definitions/example.ExaCustomer'
in
:
query
name
:
customerName
type
:
string
-
description
:
客户手机号
in
:
query
name
:
customerPhoneData
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
管理角色ID
in
:
query
name
:
sysUserAuthorityID
type
:
string
-
description
:
管理ID
in
:
query
name
:
sysUserId
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
produces
:
produces
:
-
application/json
-
application/json
responses
:
responses
:
...
@@ -1883,12 +1810,14 @@ paths:
...
@@ -1883,12 +1810,14 @@ paths:
consumes
:
consumes
:
-
application/json
-
application/json
parameters
:
parameters
:
-
description
:
页码, 每页大小
-
description
:
页码
in
:
body
in
:
query
name
:
data
name
:
page
required
:
true
type
:
integer
schema
:
-
description
:
每页大小
$ref
:
'
#/definitions/request.PageInfo'
in
:
query
name
:
pageSize
type
:
integer
produces
:
produces
:
-
application/json
-
application/json
responses
:
responses
:
...
@@ -2171,29 +2100,6 @@ paths:
...
@@ -2171,29 +2100,6 @@ paths:
summary
:
jwt加入黑名单
summary
:
jwt加入黑名单
tags
:
tags
:
-
Jwt
-
Jwt
/menu/GetMenuAuthority
:
post
:
consumes
:
-
application/json
parameters
:
-
description
:
角色ID
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/request.GetAuthorityId'
produces
:
-
application/json
responses
:
"
200"
:
description
:
'
{"success":true,"data":{},"msg":"获取成功"}'
schema
:
type
:
string
security
:
-
ApiKeyAuth
:
[]
summary
:
获取指定角色menu
tags
:
-
AuthorityMenu
/menu/addBaseMenu
:
/menu/addBaseMenu
:
post
:
post
:
consumes
:
consumes
:
...
@@ -2328,6 +2234,29 @@ paths:
...
@@ -2328,6 +2234,29 @@ paths:
summary
:
获取用户动态路由
summary
:
获取用户动态路由
tags
:
tags
:
-
AuthorityMenu
-
AuthorityMenu
/menu/getMenuAuthority
:
post
:
consumes
:
-
application/json
parameters
:
-
description
:
角色ID
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/request.GetAuthorityId'
produces
:
-
application/json
responses
:
"
200"
:
description
:
'
{"success":true,"data":{},"msg":"获取成功"}'
schema
:
type
:
string
security
:
-
ApiKeyAuth
:
[]
summary
:
获取指定角色menu
tags
:
-
AuthorityMenu
/menu/getMenuList
:
/menu/getMenuList
:
post
:
post
:
consumes
:
consumes
:
...
@@ -2425,12 +2354,34 @@ paths:
...
@@ -2425,12 +2354,34 @@ paths:
consumes
:
consumes
:
-
application/json
-
application/json
parameters
:
parameters
:
-
description
:
ID或字典英名
-
description
:
创建时间
in
:
body
in
:
query
name
:
data
name
:
createdAt
required
:
true
type
:
string
schema
:
-
description
:
描述
$ref
:
'
#/definitions/system.SysDictionary'
in
:
query
name
:
desc
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
字典名(中)
in
:
query
name
:
name
type
:
string
-
description
:
状态
in
:
query
name
:
status
type
:
boolean
-
description
:
字典名(英)
in
:
query
name
:
type
type
:
string
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
produces
:
produces
:
-
application/json
-
application/json
responses
:
responses
:
...
@@ -2448,12 +2399,42 @@ paths:
...
@@ -2448,12 +2399,42 @@ paths:
consumes
:
consumes
:
-
application/json
-
application/json
parameters
:
parameters
:
-
description
:
页码, 每页大小, 搜索条件
-
description
:
创建时间
in
:
body
in
:
query
name
:
data
name
:
createdAt
required
:
true
type
:
string
schema
:
-
description
:
描述
$ref
:
'
#/definitions/request.SysDictionarySearch'
in
:
query
name
:
desc
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
字典名(中)
in
:
query
name
:
name
type
:
string
-
description
:
页码
in
:
query
name
:
page
type
:
integer
-
description
:
每页大小
in
:
query
name
:
pageSize
type
:
integer
-
description
:
状态
in
:
query
name
:
status
type
:
boolean
-
description
:
字典名(英)
in
:
query
name
:
type
type
:
string
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
produces
:
produces
:
-
application/json
-
application/json
responses
:
responses
:
...
@@ -2540,12 +2521,38 @@ paths:
...
@@ -2540,12 +2521,38 @@ paths:
consumes
:
consumes
:
-
application/json
-
application/json
parameters
:
parameters
:
-
description
:
用id查询SysDictionaryDetail
-
description
:
创建时间
in
:
body
in
:
query
name
:
data
name
:
createdAt
required
:
true
type
:
string
schema
:
-
description
:
主键ID
$ref
:
'
#/definitions/system.SysDictionaryDetail'
in
:
query
name
:
id
type
:
integer
-
description
:
展示值
in
:
query
name
:
label
type
:
string
-
description
:
排序标记
in
:
query
name
:
sort
type
:
integer
-
description
:
启用状态
in
:
query
name
:
status
type
:
boolean
-
description
:
关联标记
in
:
query
name
:
sysDictionaryID
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
-
description
:
字典值
in
:
query
name
:
value
type
:
integer
produces
:
produces
:
-
application/json
-
application/json
responses
:
responses
:
...
@@ -2563,12 +2570,46 @@ paths:
...
@@ -2563,12 +2570,46 @@ paths:
consumes
:
consumes
:
-
application/json
-
application/json
parameters
:
parameters
:
-
description
:
页码, 每页大小, 搜索条件
-
description
:
创建时间
in
:
body
in
:
query
name
:
data
name
:
createdAt
required
:
true
type
:
string
schema
:
-
description
:
主键ID
$ref
:
'
#/definitions/request.SysDictionaryDetailSearch'
in
:
query
name
:
id
type
:
integer
-
description
:
展示值
in
:
query
name
:
label
type
:
string
-
description
:
页码
in
:
query
name
:
page
type
:
integer
-
description
:
每页大小
in
:
query
name
:
pageSize
type
:
integer
-
description
:
排序标记
in
:
query
name
:
sort
type
:
integer
-
description
:
启用状态
in
:
query
name
:
status
type
:
boolean
-
description
:
关联标记
in
:
query
name
:
sysDictionaryID
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
-
description
:
字典值
in
:
query
name
:
value
type
:
integer
produces
:
produces
:
-
application/json
-
application/json
responses
:
responses
:
...
@@ -2678,12 +2719,58 @@ paths:
...
@@ -2678,12 +2719,58 @@ paths:
consumes
:
consumes
:
-
application/json
-
application/json
parameters
:
parameters
:
-
description
:
Id
-
description
:
代理
in
:
body
in
:
query
name
:
data
name
:
agent
required
:
true
type
:
string
schema
:
-
description
:
请求Body
$ref
:
'
#/definitions/system.SysOperationRecord'
in
:
query
name
:
body
type
:
string
-
description
:
创建时间
in
:
query
name
:
createdAt
type
:
string
-
description
:
错误信息
in
:
query
name
:
error_message
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
请求ip
in
:
query
name
:
ip
type
:
string
-
description
:
延迟
in
:
query
name
:
latency
type
:
string
-
description
:
请求方法
in
:
query
name
:
method
type
:
string
-
description
:
请求路径
in
:
query
name
:
path
type
:
string
-
description
:
响应Body
in
:
query
name
:
resp
type
:
string
-
description
:
请求状态
in
:
query
name
:
status
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
-
description
:
用户id
in
:
query
name
:
user_id
type
:
integer
produces
:
produces
:
-
application/json
-
application/json
responses
:
responses
:
...
@@ -2701,12 +2788,66 @@ paths:
...
@@ -2701,12 +2788,66 @@ paths:
consumes
:
consumes
:
-
application/json
-
application/json
parameters
:
parameters
:
-
description
:
页码, 每页大小, 搜索条件
-
description
:
代理
in
:
body
in
:
query
name
:
data
name
:
agent
required
:
true
type
:
string
schema
:
-
description
:
请求Body
$ref
:
'
#/definitions/request.SysOperationRecordSearch'
in
:
query
name
:
body
type
:
string
-
description
:
创建时间
in
:
query
name
:
createdAt
type
:
string
-
description
:
错误信息
in
:
query
name
:
error_message
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
请求ip
in
:
query
name
:
ip
type
:
string
-
description
:
延迟
in
:
query
name
:
latency
type
:
string
-
description
:
请求方法
in
:
query
name
:
method
type
:
string
-
description
:
页码
in
:
query
name
:
page
type
:
integer
-
description
:
每页大小
in
:
query
name
:
pageSize
type
:
integer
-
description
:
请求路径
in
:
query
name
:
path
type
:
string
-
description
:
响应Body
in
:
query
name
:
resp
type
:
string
-
description
:
请求状态
in
:
query
name
:
status
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
-
description
:
用户id
in
:
query
name
:
user_id
type
:
integer
produces
:
produces
:
-
application/json
-
application/json
responses
:
responses
:
...
@@ -2783,7 +2924,7 @@ paths:
...
@@ -2783,7 +2924,7 @@ paths:
tags
:
tags
:
-
System
-
System
/user/changePassword
:
/user/changePassword
:
p
u
t
:
p
os
t
:
parameters
:
parameters
:
-
description
:
用户名, 原密码, 新密码
-
description
:
用户名, 原密码, 新密码
in
:
body
in
:
body
...
@@ -2826,6 +2967,22 @@ paths:
...
@@ -2826,6 +2967,22 @@ paths:
summary
:
删除用户
summary
:
删除用户
tags
:
tags
:
-
SysUser
-
SysUser
/user/getUserInfo
:
get
:
consumes
:
-
application/json
produces
:
-
application/json
responses
:
"
200"
:
description
:
'
{"success":true,"data":{},"msg":"获取成功"}'
schema
:
type
:
string
security
:
-
ApiKeyAuth
:
[]
summary
:
获取用户信息
tags
:
-
SysUser
/user/getUserList
:
/user/getUserList
:
post
:
post
:
consumes
:
consumes
:
...
@@ -2868,6 +3025,29 @@ paths:
...
@@ -2868,6 +3025,29 @@ paths:
summary
:
用户注册账号
summary
:
用户注册账号
tags
:
tags
:
-
SysUser
-
SysUser
/user/setUserAuthorities
:
post
:
consumes
:
-
application/json
parameters
:
-
description
:
用户UUID, 角色ID
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/request.SetUserAuthorities'
produces
:
-
application/json
responses
:
"
200"
:
description
:
'
{"success":true,"data":{},"msg":"修改成功"}'
schema
:
type
:
string
security
:
-
ApiKeyAuth
:
[]
summary
:
设置用户权限
tags
:
-
SysUser
/user/setUserAuthority
:
/user/setUserAuthority
:
post
:
post
:
consumes
:
consumes
:
...
@@ -2888,7 +3068,7 @@ paths:
...
@@ -2888,7 +3068,7 @@ paths:
type
:
string
type
:
string
security
:
security
:
-
ApiKeyAuth
:
[]
-
ApiKeyAuth
:
[]
summary
:
设置
用户权限
summary
:
更改
用户权限
tags
:
tags
:
-
SysUser
-
SysUser
/user/setUserInfo
:
/user/setUserInfo
:
...
...
server/go.mod
浏览文件 @
bb33c312
...
@@ -3,7 +3,6 @@ module github.com/flipped-aurora/gin-vue-admin
...
@@ -3,7 +3,6 @@ module github.com/flipped-aurora/gin-vue-admin
go 1.15
go 1.15
require (
require (
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.2
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible
github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible
...
@@ -48,9 +47,8 @@ require (
...
@@ -48,9 +47,8 @@ require (
github.com/tebeka/strftime v0.1.3 // indirect
github.com/tebeka/strftime v0.1.3 // indirect
github.com/tencentyun/cos-go-sdk-v5 v0.7.19
github.com/tencentyun/cos-go-sdk-v5 v0.7.19
github.com/unrolled/secure v1.0.7
github.com/unrolled/secure v1.0.7
github.com/xuri/excelize/v2 v2.4.1
go.uber.org/zap v1.10.0
go.uber.org/zap v1.10.0
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect
golang.org/x/net v0.0.0-20210716203947-853a461950ff // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
golang.org/x/tools v0.1.5 // indirect
golang.org/x/tools v0.1.5 // indirect
...
...
server/model/common/request/common.go
浏览文件 @
bb33c312
...
@@ -17,7 +17,7 @@ type IdsReq struct {
...
@@ -17,7 +17,7 @@ type IdsReq struct {
// Get role by id structure
// Get role by id structure
type
GetAuthorityId
struct
{
type
GetAuthorityId
struct
{
AuthorityId
string
// 角色ID
AuthorityId
string
`json:"authorityId" form:"authorityId"`
// 角色ID
}
}
type
Empty
struct
{}
type
Empty
struct
{}
server/model/system/request/sys_menu.go
浏览文件 @
bb33c312
...
@@ -7,8 +7,8 @@ import (
...
@@ -7,8 +7,8 @@ import (
// Add menu authority info structure
// Add menu authority info structure
type
AddMenuAuthorityInfo
struct
{
type
AddMenuAuthorityInfo
struct
{
Menus
[]
system
.
SysBaseMenu
Menus
[]
system
.
SysBaseMenu
`json:"menus"`
AuthorityId
string
// 角色ID
AuthorityId
string
`json:"authorityId"`
// 角色ID
}
}
func
DefaultMenu
()
[]
system
.
SysBaseMenu
{
func
DefaultMenu
()
[]
system
.
SysBaseMenu
{
...
...
server/model/system/sys_system.go
浏览文件 @
bb33c312
...
@@ -6,5 +6,5 @@ import (
...
@@ -6,5 +6,5 @@ import (
// 配置文件结构体
// 配置文件结构体
type
System
struct
{
type
System
struct
{
Config
config
.
Server
Config
config
.
Server
`json:"config"`
}
}
server/resource/template/server/api.go.tpl
浏览文件 @
bb33c312
...
@@ -103,7 +103,7 @@ func ({{.Abbreviation}}Api *{{.StructName}}Api) Update{{.StructName}}(c *gin.Con
...
@@ -103,7 +103,7 @@ func ({{.Abbreviation}}Api *{{.StructName}}Api) Update{{.StructName}}(c *gin.Con
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y autocode.{{.StructName}} true "用id查询{{.StructName}}"
// @Param data
quer
y autocode.{{.StructName}} true "用id查询{{.StructName}}"
// @Success 200
{
string
}
string "
{
"success"
:
true
,
"data"
:
{}
,
"msg"
:
"查询成功"
}
"
// @Success 200
{
string
}
string "
{
"success"
:
true
,
"data"
:
{}
,
"msg"
:
"查询成功"
}
"
// @Router /{{.Abbreviation}}/find{{.StructName}} [get]
// @Router /{{.Abbreviation}}/find{{.StructName}} [get]
func ({{.Abbreviation}}Api *{{.StructName}}Api) Find{{.StructName}}(c *gin.Context) {
func ({{.Abbreviation}}Api *{{.StructName}}Api) Find{{.StructName}}(c *gin.Context) {
...
@@ -123,7 +123,7 @@ func ({{.Abbreviation}}Api *{{.StructName}}Api) Find{{.StructName}}(c *gin.Conte
...
@@ -123,7 +123,7 @@ func ({{.Abbreviation}}Api *{{.StructName}}Api) Find{{.StructName}}(c *gin.Conte
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y autocodeReq.{{.StructName}}Search true "分页获取{{.StructName}}列表"
// @Param data
quer
y autocodeReq.{{.StructName}}Search true "分页获取{{.StructName}}列表"
// @Success 200
{
string
}
string "
{
"success"
:
true
,
"data"
:
{}
,
"msg"
:
"获取成功"
}
"
// @Success 200
{
string
}
string "
{
"success"
:
true
,
"data"
:
{}
,
"msg"
:
"获取成功"
}
"
// @Router /{{.Abbreviation}}/get{{.StructName}}List [get]
// @Router /{{.Abbreviation}}/get{{.StructName}}List [get]
func ({{.Abbreviation}}Api *{{.StructName}}Api) Get{{.StructName}}List(c *gin.Context) {
func ({{.Abbreviation}}Api *{{.StructName}}Api) Get{{.StructName}}List(c *gin.Context) {
...
...
server/resource/template/web/api.js.tpl
浏览文件 @
bb33c312
...
@@ -69,7 +69,7 @@ export const update{{.StructName}} = (data) => {
...
@@ -69,7 +69,7 @@ export const update{{.StructName}} = (data) => {
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y model.{{.StructName}} true "用id查询{{.StructName}}"
// @Param data
quer
y model.{{.StructName}} true "用id查询{{.StructName}}"
// @Success 200
{
string
}
string "
{
"success"
:
true
,
"data"
:
{}
,
"msg"
:
"查询成功"
}
"
// @Success 200
{
string
}
string "
{
"success"
:
true
,
"data"
:
{}
,
"msg"
:
"查询成功"
}
"
// @Router /{{.Abbreviation}}/find{{.StructName}} [get]
// @Router /{{.Abbreviation}}/find{{.StructName}} [get]
export const find{{.StructName}} = (params) => {
export const find{{.StructName}} = (params) => {
...
@@ -85,7 +85,7 @@ export const find{{.StructName}} = (params) => {
...
@@ -85,7 +85,7 @@ export const find{{.StructName}} = (params) => {
// @Security ApiKeyAuth
// @Security ApiKeyAuth
// @accept application/json
// @accept application/json
// @Produce application/json
// @Produce application/json
// @Param data
bod
y request.PageInfo true "分页获取{{.StructName}}列表"
// @Param data
quer
y request.PageInfo true "分页获取{{.StructName}}列表"
// @Success 200
{
string
}
string "
{
"success"
:
true
,
"data"
:
{}
,
"msg"
:
"获取成功"
}
"
// @Success 200
{
string
}
string "
{
"success"
:
true
,
"data"
:
{}
,
"msg"
:
"获取成功"
}
"
// @Router /{{.Abbreviation}}/get{{.StructName}}List [get]
// @Router /{{.Abbreviation}}/get{{.StructName}}List [get]
export const get{{.StructName}}List = (params) => {
export const get{{.StructName}}List = (params) => {
...
@@ -94,4 +94,4 @@ export const get{{.StructName}}List = (params) => {
...
@@ -94,4 +94,4 @@ export const get{{.StructName}}List = (params) => {
method: 'get',
method: 'get',
params
params
})
})
}
}
\ No newline at end of file
server/resource/template/web/form.vue.tpl
浏览文件 @
bb33c312
...
@@ -3,35 +3,35 @@
...
@@ -3,35 +3,35 @@
<el-form
:model=
"formData"
label-position=
"right"
label-width=
"80px"
>
<el-form
:model=
"formData"
label-position=
"right"
label-width=
"80px"
>
{{- range .Fields}}
{{- range .Fields}}
<el-form-item
label=
"{{.FieldDesc}}:"
>
<el-form-item
label=
"{{.FieldDesc}}:"
>
{{
if eq .FieldType "bool" -
}}
{{
- if eq .FieldType "bool"
}}
<el-switch
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
v-model=
"formData.{{.FieldJson}}"
clearable
></el-switch>
<el-switch
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
v-model=
"formData.{{.FieldJson}}"
clearable
></el-switch>
{{
end -
}}
{{
- end
}}
{{
if eq .FieldType "string" -
}}
{{
- if eq .FieldType "string"
}}
<el-input
v-model=
"formData.{{.FieldJson}}"
clearable
placeholder=
"请输入"
/>
<el-input
v-model=
"formData.{{.FieldJson}}"
clearable
placeholder=
"请输入"
/>
{{
end -
}}
{{
- end
}}
{{
if eq .FieldType "int" -
}}
{{
- if eq .FieldType "int"
}}
{{
if .DictType -
}}
{{
- if .DictType
}}
<el-select
v-model=
"formData.{{ .FieldJson }}"
placeholder=
"请选择"
clearable
>
<el-select
v-model=
"formData.{{ .FieldJson }}"
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"(item,key) in {{ .DictType }}Options"
:key=
"key"
:label=
"item.label"
:value=
"item.value"
></el-option
>
<el-option
v-for=
"(item,key) in {{ .DictType }}Options"
:key=
"key"
:label=
"item.label"
:value=
"item.value"
/
>
</el-select>
</el-select>
{{
else -
}}
{{
- else
}}
<el-input
v-model.number=
"formData.{{ .FieldJson }}"
clearable
placeholder=
"请输入"
/>
<el-input
v-model.number=
"formData.{{ .FieldJson }}"
clearable
placeholder=
"请输入"
/>
{{
end -
}}
{{
- end
}}
{{
end -
}}
{{
- end
}}
{{ if eq .FieldType "time.Time" }}
{{
-
if eq .FieldType "time.Time" }}
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"formData.{{ .FieldJson }}"
clearable
></el-date-picker>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"formData.{{ .FieldJson }}"
clearable
></el-date-picker>
{{
end -
}}
{{
- end
}}
{{ if eq .FieldType "float64" }}
{{
-
if eq .FieldType "float64" }}
<el-input-number
v-model=
"formData.{{ .FieldJson }}"
:precision=
"2"
clearable
></el-input-number>
<el-input-number
v-model=
"formData.{{ .FieldJson }}"
:precision=
"2"
clearable
></el-input-number>
{{
end -
}}
{{
- end
}}
</el-form-item>
</el-form-item>
{{
end -
}}
{{
- end
}}
<el-form-item>
<el-form-item>
<el-button
size=
"mini"
type=
"primary"
@
click=
"save"
>
保存
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"save"
>
保存
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"back"
>
返回
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"back"
>
返回
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
</template>
</template>
<script>
<script>
...
@@ -47,29 +47,29 @@ export default {
...
@@ -47,29 +47,29 @@ export default {
data
()
{
data
()
{
return
{
return
{
type
:
''
,
type
:
''
,
{
{
range
.
Fields
}
}
{{
-
range
.
Fields
}}
{{
-
if
.
DictType
}}
{{
-
if
.
DictType
}}
{{
.
DictType
}}
Options
:
[],
{{
.
DictType
}}
Options
:
[],
{{
end
-
}}
{{
-
end
}}
{
{
end
-
}
}
{{
-
end
}}
formData
:
{
formData
:
{
{
{
range
.
Fields
}
}
{{
-
range
.
Fields
}}
{{
-
if
eq
.
FieldType
"
bool
"
-
}}
{{
-
if
eq
.
FieldType
"
bool
"
}}
{{.
FieldJson
}}:
false
,
{{.
FieldJson
}}:
false
,
{{
end
-
}}
{{
-
end
}}
{{
-
if
eq
.
FieldType
"
string
"
-
}}
{{
-
if
eq
.
FieldType
"
string
"
}}
{{.
FieldJson
}}:
''
,
{{.
FieldJson
}}:
''
,
{{
end
-
}}
{{
-
end
}}
{{
-
if
eq
.
FieldType
"
int
"
-
}}
{{
-
if
eq
.
FieldType
"
int
"
}}
{{.
FieldJson
}}:
0
,
{{.
FieldJson
}}:
0
,
{{
end
-
}}
{{
-
end
}}
{{
-
if
eq
.
FieldType
"
time.Time
"
-
}}
{{
-
if
eq
.
FieldType
"
time.Time
"
}}
{{.
FieldJson
}}:
new
Date
(),
{{.
FieldJson
}}:
new
Date
(),
{{
end
-
}}
{{
-
end
}}
{{
-
if
eq
.
FieldType
"
float64
"
-
}}
{{
-
if
eq
.
FieldType
"
float64
"
}}
{{.
FieldJson
}}:
0
,
{{.
FieldJson
}}:
0
,
{{
end
-
}}
{{
-
end
}}
{{
end
}}
{{
-
end
}}
}
}
}
}
},
},
...
@@ -84,10 +84,10 @@ export default {
...
@@ -84,10 +84,10 @@ export default {
}
else
{
}
else
{
this
.
type
=
'
create
'
this
.
type
=
'
create
'
}
}
{{
range
.
Fields
-
}}
{{
-
range
.
Fields
}}
{{
-
if
.
DictType
}}
{{
-
if
.
DictType
}}
await
this
.
getDict
(
"
{{.DictType}}
"
)
await
this
.
getDict
(
'
{{.DictType}}
'
)
{{
end
-
}}
{{
-
end
}}
{{
-
end
}}
{{
-
end
}}
},
},
methods
:
{
methods
:
{
...
@@ -119,4 +119,4 @@ export default {
...
@@ -119,4 +119,4 @@ export default {
</script>
</script>
<style>
<style>
</style>
</style>
\ No newline at end of file
server/resource/template/web/table.vue.tpl
浏览文件 @
bb33c312
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
</el-form-item>
</el-form-item>
{{- else }}
{{- else }}
<el-form-item
label=
"{{.FieldDesc}}"
>
<el-form-item
label=
"{{.FieldDesc}}"
>
<el-input
placeholder=
"搜索条件"
v-model=
"searchInfo.{{.FieldJson}}
"
/>
<el-input
v-model=
"searchInfo.{{.FieldJson}}"
placeholder=
"搜索条件
"
/>
</el-form-item>
{{ end }} {{ end }}
{{ end }}
</el-form-item>
{{ end }}{{ end }}
{{ end }}
<el-form-item>
<el-form-item>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-search"
@
click=
"onSubmit"
>
查询
</el-button>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-search"
@
click=
"onSubmit"
>
查询
</el-button>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"openDialog"
>
新增
</el-button>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"openDialog"
>
新增
</el-button>
...
@@ -52,15 +52,16 @@
...
@@ -52,15 +52,16 @@
{{- if .DictType}}
{{- if .DictType}}
<el-table-column
label=
"{{.FieldDesc}}"
prop=
"{{.FieldJson}}"
width=
"120"
>
<el-table-column
label=
"{{.FieldDesc}}"
prop=
"{{.FieldJson}}"
width=
"120"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
{
{
"{{"
}
}
filterDict(scope.row.{{.FieldJson}},"{{.DictType}}")
{
{
"}}"
}
}
{
{
"{{"
}
}
filterDict(scope.row.{{.FieldJson}},"{{.DictType}}")
{
{
"}}"
}
}
</template>
</template>
</el-table-column>
</el-table-column>
{{- else if eq .FieldType "bool" }}
{{- else if eq .FieldType "bool" }}
<el-table-column
label=
"{{.FieldDesc}}"
prop=
"{{.FieldJson}}"
width=
"120"
>
<el-table-column
label=
"{{.FieldDesc}}"
prop=
"{{.FieldJson}}"
width=
"120"
>
<template
slot-scope=
"scope"
>
{{ "{
{
scope
.
row
.
"}}{{.FieldJson}}{{"
|
formatBoolean
}
}" }}
</template>
<template
slot-scope=
"scope"
>
{{ "{
{
scope
.
row
.
"}}{{.FieldJson}}{{"
|
formatBoolean
}
}" }}
</template>
</el-table-column>
{{- else }}
</el-table-column>
{{- else }}
<el-table-column
label=
"{{.FieldDesc}}"
prop=
"{{.FieldJson}}"
width=
"120"
/>
{{ end -}}
<el-table-column
label=
"{{.FieldDesc}}"
prop=
"{{.FieldJson}}"
width=
"120"
/>
{{ end -}}
{{- end }}
{{- end }}
<el-table-column
label=
"按钮组"
>
<el-table-column
label=
"按钮组"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"small"
type=
"primary"
icon=
"el-icon-edit"
class=
"table-button"
@
click=
"update{{.StructName}}(scope.row)"
>
变更
</el-button>
<el-button
size=
"small"
type=
"primary"
icon=
"el-icon-edit"
class=
"table-button"
@
click=
"update{{.StructName}}(scope.row)"
>
变更
</el-button>
...
@@ -82,30 +83,30 @@
...
@@ -82,30 +83,30 @@
<el-form
:model=
"formData"
label-position=
"right"
label-width=
"80px"
>
<el-form
:model=
"formData"
label-position=
"right"
label-width=
"80px"
>
{{- range .Fields}}
{{- range .Fields}}
<el-form-item
label=
"{{.FieldDesc}}:"
>
<el-form-item
label=
"{{.FieldDesc}}:"
>
{{ if eq .FieldType "bool" }}
{{
-
if eq .FieldType "bool" }}
<el-switch
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
v-model=
"formData.{{.FieldJson}}"
clearable
></el-switch>
<el-switch
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
v-model=
"formData.{{.FieldJson}}"
clearable
></el-switch>
{{
end -
}}
{{
- end
}}
{{ if eq .FieldType "string" }}
{{
-
if eq .FieldType "string" }}
<el-input
v-model=
"formData.{{.FieldJson}}"
clearable
placeholder=
"请输入"
/>
<el-input
v-model=
"formData.{{.FieldJson}}"
clearable
placeholder=
"请输入"
/>
{{
end -
}}
{{
- end
}}
{{ if eq .FieldType "int" }}
{{
-
if eq .FieldType "int" }}
{{- if .DictType}}
{{- if .DictType}}
<el-select
v-model=
"formData.{{ .FieldJson }}"
placeholder=
"请选择"
clearable
>
<el-select
v-model=
"formData.{{ .FieldJson }}"
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"(item,key) in {{ .DictType }}Options"
:key=
"key"
:label=
"item.label"
:value=
"item.value"
/>
<el-option
v-for=
"(item,key) in {{ .DictType }}Options"
:key=
"key"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-select>
{{ else }}
{{
-
else }}
<el-input
v-model.number=
"formData.{{ .FieldJson }}"
clearable
placeholder=
"请输入"
/>
<el-input
v-model.number=
"formData.{{ .FieldJson }}"
clearable
placeholder=
"请输入"
/>
{{
end -
}}
{{
- end
}}
{{
end -
}}
{{
- end
}}
{{ if eq .FieldType "time.Time" }}
{{
-
if eq .FieldType "time.Time" }}
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"formData.{{ .FieldJson }}"
clearable
/>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"formData.{{ .FieldJson }}"
clearable
/>
{{ end -
}}
{{- end
}}
{{- if eq .FieldType "float64" }}
{{- if eq .FieldType "float64" }}
<el-input-number
v-model=
"formData.{{ .FieldJson }}"
:precision=
"2"
clearable
/>
<el-input-number
v-model=
"formData.{{ .FieldJson }}"
:precision=
"2"
clearable
/>
{{ end -
}}
{{- end
}}
</el-form-item>
</el-form-item>
{{- end }}
{{- end }}
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"closeDialog"
>
取 消
</el-button>
<el-button
@
click=
"closeDialog"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"enterDialog"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"enterDialog"
>
确 定
</el-button>
...
@@ -127,6 +128,23 @@ import { formatTimeToStr } from '@/utils/date'
...
@@ -127,6 +128,23 @@ import { formatTimeToStr } from '@/utils/date'
import
infoList
from
'
@/mixins/infoList
'
import
infoList
from
'
@/mixins/infoList
'
export
default
{
export
default
{
name
:
'
{{.StructName}}
'
,
name
:
'
{{.StructName}}
'
,
filters
:
{
formatDate
:
function
(
time
)
{
if
(
time
!==
null
&&
time
!==
''
)
{
var
date
=
new
Date
(
time
)
return
formatTimeToStr
(
date
,
'
yyyy-MM-dd hh:mm:ss
'
)
}
else
{
return
''
}
},
formatBoolean
:
function
(
bool
)
{
if
(
bool
!=
null
)
{
return
bool
?
'
是
'
:
'
否
'
}
else
{
return
''
}
}
},
mixins
:
[
infoList
],
mixins
:
[
infoList
],
data
()
{
data
()
{
return
{
return
{
...
@@ -135,66 +153,49 @@ export default {
...
@@ -135,66 +153,49 @@ export default {
type
:
''
,
type
:
''
,
deleteVisible
:
false
,
deleteVisible
:
false
,
multipleSelection
:
[],
multipleSelection
:
[],
{{
range
.
Fields
}}
{{
-
range
.
Fields
}}
{{
-
if
.
DictType
}}
{{
-
if
.
DictType
}}
{{
.
DictType
}}
Options
:
[],
{{
.
DictType
}}
Options
:
[],
{{
end
-
}}
{{
-
end
}}
{{
end
}}
{{
-
end
}}
formData
:
{
formData
:
{
{
{
range
.
Fields
}
}
{{
-
range
.
Fields
}}
{{
-
if
eq
.
FieldType
"
bool
"
-
}}
{{
-
if
eq
.
FieldType
"
bool
"
}}
{{.
FieldJson
}}:
false
,
{{.
FieldJson
}}:
false
,
{{
end
-
}}
{{
-
end
}}
{{
-
if
eq
.
FieldType
"
string
"
-
}}
{{
-
if
eq
.
FieldType
"
string
"
}}
{{.
FieldJson
}}:
''
,
{{.
FieldJson
}}:
''
,
{{
end
-
}}
{{
-
end
}}
{{
-
if
eq
.
FieldType
"
int
"
-
}}
{{
-
if
eq
.
FieldType
"
int
"
}}
{{.
FieldJson
}}:
0
,
{{.
FieldJson
}}:
0
,
{{
end
-
}}
{{
-
end
}}
{{
-
if
eq
.
FieldType
"
time.Time
"
-
}}
{{
-
if
eq
.
FieldType
"
time.Time
"
}}
{{.
FieldJson
}}:
new
Date
(),
{{.
FieldJson
}}:
new
Date
(),
{{
end
-
}}
{{
-
end
}}
{{
-
if
eq
.
FieldType
"
float64
"
-
}}
{{
-
if
eq
.
FieldType
"
float64
"
}}
{{.
FieldJson
}}:
0
,
{{.
FieldJson
}}:
0
,
{{
end
-
}}
{{
-
end
}}
{{
end
}}
{{
-
end
}}
}
}
},
filters
:
{
formatDate
:
function
(
time
)
{
if
(
time
!==
null
&&
time
!==
''
)
{
var
date
=
new
Date
(
time
);
return
formatTimeToStr
(
date
,
'
yyyy-MM-dd hh:mm:ss
'
);
}
else
{
return
''
}
},
formatBoolean
:
function
(
bool
)
{
if
(
bool
!=
null
)
{
return
bool
?
'
是
'
:
'
否
'
}
else
{
return
''
}
}
}
}
},
},
async
created
()
{
async
created
()
{
await
this
.
getTableData
()
await
this
.
getTableData
()
{{
range
.
Fields
-
}}
{{
-
range
.
Fields
}}
{{
-
if
.
DictType
}}
{{
-
if
.
DictType
}}
await
this
.
getDict
(
'
{{.DictType}}
'
)
await
this
.
getDict
(
'
{{.DictType}}
'
)
{{
end
-
}}
{{
-
end
}}
{{
-
end
}}
{{
-
end
}}
},
},
methods
:
{
methods
:
{
// 条件搜索前端看此方法
// 条件搜索前端看此方法
onSubmit
()
{
onSubmit
()
{
this
.
page
=
1
this
.
page
=
1
this
.
pageSize
=
10
this
.
pageSize
=
10
{{
-
range
.
Fields
}}
{{
-
if
eq
.
FieldType
"
bool
"
}}
{{
-
range
.
Fields
}}{{
-
if
eq
.
FieldType
"
bool
"
}}
if
(
this
.
searchInfo
.{{.
FieldJson
}}
===
""
){
if
(
this
.
searchInfo
.{{.
FieldJson
}}
===
""
){
this
.
searchInfo
.{{.
FieldJson
}}
=
null
this
.
searchInfo
.{{.
FieldJson
}}
=
null
}
{{
end
}}
{{
end
}}
}
{{
end
}}
{{
end
}}
this
.
getTableData
()
this
.
getTableData
()
},
},
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
...
@@ -246,23 +247,23 @@ export default {
...
@@ -246,23 +247,23 @@ export default {
closeDialog
()
{
closeDialog
()
{
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
this
.
formData
=
{
this
.
formData
=
{
{
{
range
.
Fields
}
}
{{
-
range
.
Fields
}}
{{
-
if
eq
.
FieldType
"
bool
"
-
}}
{{
-
if
eq
.
FieldType
"
bool
"
}}
{{.
FieldJson
}}:
false
,
{{.
FieldJson
}}:
false
,
{{
end
-
}}
{{
-
end
}}
{{
-
if
eq
.
FieldType
"
string
"
-
}}
{{
-
if
eq
.
FieldType
"
string
"
}}
{{.
FieldJson
}}:
''
,
{{.
FieldJson
}}:
''
,
{{
end
-
}}
{{
-
end
}}
{{
-
if
eq
.
FieldType
"
int
"
-
}}
{{
-
if
eq
.
FieldType
"
int
"
}}
{{.
FieldJson
}}:
0
,
{{.
FieldJson
}}:
0
,
{{
end
-
}}
{{
-
end
}}
{{
-
if
eq
.
FieldType
"
time.Time
"
-
}}
{{
-
if
eq
.
FieldType
"
time.Time
"
}}
{{.
FieldJson
}}:
new
Date
(),
{{.
FieldJson
}}:
new
Date
(),
{{
end
-
}}
{{
-
end
}}
{{
-
if
eq
.
FieldType
"
float64
"
-
}}
{{
-
if
eq
.
FieldType
"
float64
"
}}
{{.
FieldJson
}}:
0
,
{{.
FieldJson
}}:
0
,
{{
end
-
}}
{{
-
end
}}
{{
end
}}
{{
-
end
}}
}
}
},
},
async
delete
{{.
StructName
}}(
row
)
{
async
delete
{{.
StructName
}}(
row
)
{
...
@@ -272,7 +273,7 @@ export default {
...
@@ -272,7 +273,7 @@ export default {
type
:
'
success
'
,
type
:
'
success
'
,
message
:
'
删除成功
'
message
:
'
删除成功
'
})
})
if
(
this
.
tableData
.
length
===
1
&&
this
.
page
>
1
)
{
if
(
this
.
tableData
.
length
===
1
&&
this
.
page
>
1
)
{
this
.
page
--
this
.
page
--
}
}
this
.
getTableData
()
this
.
getTableData
()
...
@@ -281,10 +282,10 @@ export default {
...
@@ -281,10 +282,10 @@ export default {
async
enterDialog
()
{
async
enterDialog
()
{
let
res
let
res
switch
(
this
.
type
)
{
switch
(
this
.
type
)
{
case
"
create
"
:
case
'
create
'
:
res
=
await
create
{{.
StructName
}}(
this
.
formData
)
res
=
await
create
{{.
StructName
}}(
this
.
formData
)
break
break
case
"
update
"
:
case
'
update
'
:
res
=
await
update
{{.
StructName
}}(
this
.
formData
)
res
=
await
update
{{.
StructName
}}(
this
.
formData
)
break
break
default
:
default
:
...
...
server/utils/validator.go
浏览文件 @
bb33c312
...
@@ -3,6 +3,7 @@ package utils
...
@@ -3,6 +3,7 @@ package utils
import
(
import
(
"errors"
"errors"
"reflect"
"reflect"
"regexp"
"strconv"
"strconv"
"strings"
"strings"
)
)
...
@@ -37,6 +38,15 @@ func NotEmpty() string {
...
@@ -37,6 +38,15 @@ func NotEmpty() string {
return
"notEmpty"
return
"notEmpty"
}
}
//@author: [zooqkl](https://github.com/zooqkl)
//@function: RegexpMatch
//@description: 正则校验 校验输入项是否满足正则表达式
//@param: rule string
//@return: string
func
RegexpMatch
(
rule
string
)
string
{
return
"regexp="
+
rule
}
//@author: [piexlmax](https://github.com/piexlmax)
//@author: [piexlmax](https://github.com/piexlmax)
//@function: Lt
//@function: Lt
//@description: 小于入参(<) 如果为string array Slice则为长度比较 如果是 int uint float 则为数值比较
//@description: 小于入参(<) 如果为string array Slice则为长度比较 如果是 int uint float 则为数值比较
...
@@ -133,6 +143,10 @@ func Verify(st interface{}, roleMap Rules) (err error) {
...
@@ -133,6 +143,10 @@ func Verify(st interface{}, roleMap Rules) (err error) {
if
isBlank
(
val
)
{
if
isBlank
(
val
)
{
return
errors
.
New
(
tagVal
.
Name
+
"值不能为空"
)
return
errors
.
New
(
tagVal
.
Name
+
"值不能为空"
)
}
}
case
strings
.
Split
(
v
,
"="
)[
0
]
==
"regexp"
:
if
!
regexpMatch
(
strings
.
Split
(
v
,
"="
)[
1
],
val
.
String
())
{
return
errors
.
New
(
tagVal
.
Name
+
"格式校验不通过"
)
}
case
compareMap
[
strings
.
Split
(
v
,
"="
)[
0
]]
:
case
compareMap
[
strings
.
Split
(
v
,
"="
)[
0
]]
:
if
!
compareVerify
(
val
,
v
)
{
if
!
compareVerify
(
val
,
v
)
{
return
errors
.
New
(
tagVal
.
Name
+
"长度或值不在合法范围,"
+
v
)
return
errors
.
New
(
tagVal
.
Name
+
"长度或值不在合法范围,"
+
v
)
...
@@ -266,3 +280,7 @@ func compare(value interface{}, VerifyStr string) bool {
...
@@ -266,3 +280,7 @@ func compare(value interface{}, VerifyStr string) bool {
return
false
return
false
}
}
}
}
func
regexpMatch
(
rule
,
matchStr
string
)
bool
{
return
regexp
.
MustCompile
(
rule
)
.
MatchString
(
matchStr
)
}
web/.eslintrc.js
浏览文件 @
bb33c312
...
@@ -52,7 +52,7 @@ module.exports = {
...
@@ -52,7 +52,7 @@ module.exports = {
properties
:
'
always
'
properties
:
'
always
'
}
}
],
],
'
comma-dangle
'
:
[
2
,
'
never
'
],
'
comma-dangle
'
:
[
2
,
'
only-multiline
'
],
'
comma-spacing
'
:
[
'
comma-spacing
'
:
[
2
,
2
,
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录