diff --git a/server/docs/docs.go b/server/docs/docs.go index c68deccad463eab8b877a503fd90c6c4c436e5c9..78ca7106868dad5cc8a9f88e98aee7be7cb58005 100644 --- a/server/docs/docs.go +++ b/server/docs/docs.go @@ -1476,9 +1476,7 @@ var doc = `{ } ], "responses": { - "200": { - "description": "" - } + "200": {} } } }, @@ -1511,9 +1509,7 @@ var doc = `{ } ], "responses": { - "200": { - "description": "" - } + "200": {} } } }, @@ -2884,7 +2880,7 @@ var doc = `{ } }, "/user/changePassword": { - "put": { + "post": { "security": [ { "ApiKeyAuth": [] @@ -2956,6 +2952,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": { "post": { "security": [ @@ -3024,7 +3047,7 @@ var doc = `{ } } }, - "/user/setUserAuthority": { + "/user/setUserAuthorities": { "post": { "security": [ { @@ -3041,6 +3064,44 @@ var doc = `{ "SysUser" ], "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": [ { "description": "用户UUID, 角色ID", @@ -3838,6 +3899,12 @@ var doc = `{ "authorityId": { "type": "string" }, + "authorityIds": { + "type": "array", + "items": { + "type": "string" + } + }, "headerImg": { "type": "string" }, @@ -3907,10 +3974,21 @@ var doc = `{ "authorityId": { "description": "角色ID", "type": "string" + } + } + }, + "request.SetUserAuthorities": { + "type": "object", + "properties": { + "authorityIds": { + "description": "角色ID", + "type": "array", + "items": { + "type": "string" + } }, - "uuid": { - "description": "用户UUID", - "type": "string" + "id": { + "type": "integer" } } }, @@ -4524,6 +4602,12 @@ var doc = `{ "description": "活跃颜色", "type": "string" }, + "authorities": { + "type": "array", + "items": { + "$ref": "#/definitions/system.SysAuthority" + } + }, "authority": { "$ref": "#/definitions/system.SysAuthority" }, diff --git a/server/docs/swagger.json b/server/docs/swagger.json index 9fc6f9abe12703dfc037e81a2c0999ccfedb3688..071049c8abb87e7dabf244b6d96d1ebae6fcfdcf 100644 --- a/server/docs/swagger.json +++ b/server/docs/swagger.json @@ -1460,9 +1460,7 @@ } ], "responses": { - "200": { - "description": "" - } + "200": {} } } }, @@ -1495,9 +1493,7 @@ } ], "responses": { - "200": { - "description": "" - } + "200": {} } } }, @@ -2868,7 +2864,7 @@ } }, "/user/changePassword": { - "put": { + "post": { "security": [ { "ApiKeyAuth": [] @@ -2940,6 +2936,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": { "post": { "security": [ @@ -3008,7 +3031,7 @@ } } }, - "/user/setUserAuthority": { + "/user/setUserAuthorities": { "post": { "security": [ { @@ -3025,6 +3048,44 @@ "SysUser" ], "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": [ { "description": "用户UUID, 角色ID", @@ -3822,6 +3883,12 @@ "authorityId": { "type": "string" }, + "authorityIds": { + "type": "array", + "items": { + "type": "string" + } + }, "headerImg": { "type": "string" }, @@ -3891,10 +3958,21 @@ "authorityId": { "description": "角色ID", "type": "string" + } + } + }, + "request.SetUserAuthorities": { + "type": "object", + "properties": { + "authorityIds": { + "description": "角色ID", + "type": "array", + "items": { + "type": "string" + } }, - "uuid": { - "description": "用户UUID", - "type": "string" + "id": { + "type": "integer" } } }, @@ -4508,6 +4586,12 @@ "description": "活跃颜色", "type": "string" }, + "authorities": { + "type": "array", + "items": { + "$ref": "#/definitions/system.SysAuthority" + } + }, "authority": { "$ref": "#/definitions/system.SysAuthority" }, diff --git a/server/docs/swagger.yaml b/server/docs/swagger.yaml index 429aa6f5b3dbeff0eab0e21a43e2850625e40030..77ee0b452b3a42b33df34f8200479c8a67947654 100644 --- a/server/docs/swagger.yaml +++ b/server/docs/swagger.yaml @@ -514,6 +514,10 @@ definitions: properties: authorityId: type: string + authorityIds: + items: + type: string + type: array headerImg: type: string nickName: @@ -564,9 +568,16 @@ definitions: authorityId: description: 角色ID type: string - uuid: - description: 用户UUID - type: string + type: object + request.SetUserAuthorities: + properties: + authorityIds: + description: 角色ID + items: + type: string + type: array + id: + type: integer type: object request.SysAutoHistory: properties: @@ -1009,6 +1020,10 @@ definitions: activeColor: description: 活跃颜色 type: string + authorities: + items: + $ref: '#/definitions/system.SysAuthority' + type: array authority: $ref: '#/definitions/system.SysAuthority' authorityId: @@ -1928,8 +1943,7 @@ paths: produces: - application/json responses: - "200": - description: "" + "200": {} security: - ApiKeyAuth: [] summary: 下载模板 @@ -1949,8 +1963,7 @@ paths: produces: - application/octet-stream responses: - "200": - description: "" + "200": {} security: - ApiKeyAuth: [] summary: 导出Excel @@ -2783,7 +2796,7 @@ paths: tags: - System /user/changePassword: - put: + post: parameters: - description: 用户名, 原密码, 新密码 in: body @@ -2826,6 +2839,22 @@ paths: summary: 删除用户 tags: - 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: post: consumes: @@ -2868,6 +2897,29 @@ paths: summary: 用户注册账号 tags: - 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: post: consumes: @@ -2888,7 +2940,7 @@ paths: type: string security: - ApiKeyAuth: [] - summary: 设置用户权限 + summary: 更改用户权限 tags: - SysUser /user/setUserInfo: