diff --git a/server/api/v1/exa_excel.go b/server/api/v1/exa_excel.go index 2aa70db5ca1f4092b1be4af0cb129a0b124b5eff..6280781731f380eb38f0317fbb691629a0175ce6 100644 --- a/server/api/v1/exa_excel.go +++ b/server/api/v1/exa_excel.go @@ -82,7 +82,7 @@ func LoadExcel(c *gin.Context) { // @Security ApiKeyAuth // @accept multipart/form-data // @Produce application/json -// @Param fileName query fileName true "模板名称" +// @Param fileName query string true "模板名称" // @Success 200 // @Router /excel/downloadTemplate [get] func DownloadTemplate(c *gin.Context) { diff --git a/server/docs/docs.go b/server/docs/docs.go index f3b28ceef91836fc227abbef1477208faca2bfe3..b392f782ba241a08703b5bc42a15b9605ca55003 100644 --- a/server/docs/docs.go +++ b/server/docs/docs.go @@ -487,6 +487,17 @@ var doc = `{ "AutoCode" ], "summary": "自动代码模板", + "parameters": [ + { + "description": "创建自动代码", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.AutoCodeStruct" + } + } + ], "responses": { "200": { "description": "{\"success\":true,\"data\":{},\"msg\":\"创建成功\"}", @@ -578,6 +589,44 @@ var doc = `{ } } }, + "/autoCode/preview": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "AutoCode" + ], + "summary": "预览创建后的代码", + "parameters": [ + { + "description": "预览创建代码", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.AutoCodeStruct" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"创建成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/base/captcha": { "post": { "security": [ @@ -919,6 +968,134 @@ var doc = `{ } } }, + "/excel/downloadTemplate": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "excel" + ], + "summary": "下载模板", + "parameters": [ + { + "type": "string", + "description": "模板名称", + "name": "fileName", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/excel/exportExcel": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/octet-stream" + ], + "tags": [ + "excel" + ], + "summary": "导出Excel", + "parameters": [ + { + "description": "导出Excel文件信息", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.ExcelInfo" + } + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/excel/importExcel": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "excel" + ], + "summary": "导入Excel文件", + "parameters": [ + { + "type": "file", + "description": "导入Excel文件", + "name": "file", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"导入成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/excel/loadExcel": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "excel" + ], + "summary": "加载Excel数据", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"加载数据成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/fileUploadAndDownload/breakpointContinue": { "post": { "security": [ @@ -1136,6 +1313,55 @@ var doc = `{ } } }, + "/init/checkdb": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "CheckDB" + ], + "summary": "初始化用户数据库", + "responses": { + "200": { + "description": "{\"code\":0,\"data\":{},\"msg\":\"探测完成\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/init/initdb": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "InitDB" + ], + "summary": "初始化用户数据库", + "parameters": [ + { + "description": "初始化数据库参数", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.InitDB" + } + } + ], + "responses": { + "200": { + "description": "{\"code\":0,\"data\":{},\"msg\":\"自动创建数据库成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/jwt/jsonInBlacklist": { "post": { "security": [ @@ -1582,6 +1808,15 @@ var doc = `{ "SimpleUploader" ], "summary": "断点续传插件版示例", + "parameters": [ + { + "type": "file", + "description": "断点续传插件版示例", + "name": "file", + "in": "formData", + "required": true + } + ], "responses": { "200": { "description": "{\"success\":true,\"data\":{},\"msg\":\"切片创建成功\"}", @@ -2162,7 +2397,7 @@ var doc = `{ } } }, - "/system/ReloadSystem": { + "/system/getServerInfo": { "post": { "security": [ { @@ -2175,21 +2410,10 @@ var doc = `{ "tags": [ "System" ], - "summary": "重启系统", - "parameters": [ - { - "description": "重启系统", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.System" - } - } - ], + "summary": "获取服务器信息", "responses": { "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"重启系统成功\"}", + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", "schema": { "type": "string" } @@ -2197,7 +2421,7 @@ var doc = `{ } } }, - "/system/getServerInfo": { + "/system/getSystemConfig": { "post": { "security": [ { @@ -2210,7 +2434,7 @@ var doc = `{ "tags": [ "System" ], - "summary": "获取服务器信息", + "summary": "获取配置文件内容", "responses": { "200": { "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", @@ -2221,7 +2445,7 @@ var doc = `{ } } }, - "/system/getSystemConfig": { + "/system/reloadSystem": { "post": { "security": [ { @@ -2234,10 +2458,10 @@ var doc = `{ "tags": [ "System" ], - "summary": "获取配置文件内容", + "summary": "重启系统", "responses": { "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "description": "{\"code\":0,\"data\":{},\"msg\":\"重启系统成功\"}", "schema": { "type": "string" } @@ -2497,39 +2721,441 @@ var doc = `{ } } }, - "/workflow/createWorkFlow": { + "/workflowProcess/completeWorkflowMove": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "提交工作流", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/createWorkflowProcess": { "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "workflow" + "WorkflowProcess" ], - "summary": "注册工作流", + "summary": "创建WorkflowProcess", "parameters": [ { - "description": "注册工作流接口", + "description": "创建WorkflowProcess", "name": "data", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/model.SysWorkflow" + "$ref": "#/definitions/model.WorkflowProcess" } } ], "responses": { "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}", + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", "schema": { "type": "string" } } } } - } - }, - "definitions": { - "config.Captcha": { + }, + "/workflowProcess/deleteWorkflowProcess": { + "delete": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "删除WorkflowProcess", + "parameters": [ + { + "description": "删除WorkflowProcess", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.WorkflowProcess" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/deleteWorkflowProcessByIds": { + "delete": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "批量删除WorkflowProcess", + "parameters": [ + { + "description": "批量删除WorkflowProcess", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.IdsReq" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/findWorkflowProcess": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "用id查询WorkflowProcess", + "parameters": [ + { + "description": "用id查询WorkflowProcess", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.WorkflowProcess" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/findWorkflowStep": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "用id查询工作流步骤", + "parameters": [ + { + "description": "用id查询WorkflowProcess", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.WorkflowProcess" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/getMyNeed": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "我的待办", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/getMyStated": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "我发起的工作流", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/getWorkflowMoveByID": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "根据id获取当前节点详情和历史", + "parameters": [ + { + "description": "根据id获取当前节点详情和过往", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.GetById" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/getWorkflowProcessList": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "分页获取WorkflowProcess列表", + "parameters": [ + { + "description": "分页获取WorkflowProcess列表", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WorkflowProcessSearch" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/startWorkflow": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "开启工作流", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/updateWorkflowProcess": { + "put": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "更新WorkflowProcess", + "parameters": [ + { + "description": "更新WorkflowProcess", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.WorkflowProcess" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"更新成功\"}", + "schema": { + "type": "string" + } + } + } + } + } + }, + "definitions": { + "config.AliyunOSS": { + "type": "object", + "properties": { + "accessKeyId": { + "type": "string" + }, + "accessKeySecret": { + "type": "string" + }, + "bucketName": { + "type": "string" + }, + "bucketUrl": { + "type": "string" + }, + "endpoint": { + "type": "string" + } + } + }, + "config.Captcha": { "type": "object", "properties": { "imgHeight": { @@ -2577,9 +3203,23 @@ var doc = `{ } } }, + "config.Excel": { + "type": "object", + "properties": { + "dir": { + "type": "string" + } + } + }, "config.JWT": { "type": "object", "properties": { + "bufferTime": { + "type": "integer" + }, + "expiresTime": { + "type": "integer" + }, "signingKey": { "type": "string" } @@ -2605,6 +3245,9 @@ var doc = `{ "logMode": { "type": "boolean" }, + "logZap": { + "type": "string" + }, "maxIdleConns": { "type": "integer" }, @@ -2665,6 +3308,10 @@ var doc = `{ "config.Server": { "type": "object", "properties": { + "aliyunOSS": { + "type": "object", + "$ref": "#/definitions/config.AliyunOSS" + }, "captcha": { "type": "object", "$ref": "#/definitions/config.Captcha" @@ -2677,6 +3324,10 @@ var doc = `{ "type": "object", "$ref": "#/definitions/config.Email" }, + "excel": { + "type": "object", + "$ref": "#/definitions/config.Excel" + }, "jwt": { "type": "object", "$ref": "#/definitions/config.JWT" @@ -2703,6 +3354,10 @@ var doc = `{ "type": "object", "$ref": "#/definitions/config.System" }, + "tencentCOS": { + "type": "object", + "$ref": "#/definitions/config.TencentCOS" + }, "zap": { "type": "object", "$ref": "#/definitions/config.Zap" @@ -2729,6 +3384,29 @@ var doc = `{ } } }, + "config.TencentCOS": { + "type": "object", + "properties": { + "baseURL": { + "type": "string" + }, + "bucket": { + "type": "string" + }, + "pathPrefix": { + "type": "string" + }, + "region": { + "type": "string" + }, + "secretID": { + "type": "string" + }, + "secretKey": { + "type": "string" + } + } + }, "config.Zap": { "type": "object", "properties": { @@ -2756,7 +3434,39 @@ var doc = `{ "showLine": { "type": "boolean" }, - "stacktraceKey": { + "stacktraceKey": { + "type": "string" + } + } + }, + "model.AutoCodeStruct": { + "type": "object", + "properties": { + "abbreviation": { + "type": "string" + }, + "autoCreateApiToSql": { + "type": "boolean" + }, + "autoMoveFile": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/model.Field" + } + }, + "packageName": { + "type": "string" + }, + "structName": { + "type": "string" + }, + "tableName": { "type": "string" } } @@ -2817,6 +3527,55 @@ var doc = `{ } } }, + "model.ExcelInfo": { + "type": "object", + "properties": { + "fileName": { + "type": "string" + }, + "infoList": { + "type": "array", + "items": { + "$ref": "#/definitions/model.SysBaseMenu" + } + } + } + }, + "model.Field": { + "type": "object", + "properties": { + "columnName": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "dataType": { + "type": "string" + }, + "dataTypeLong": { + "type": "string" + }, + "dictType": { + "type": "string" + }, + "fieldDesc": { + "type": "string" + }, + "fieldJson": { + "type": "string" + }, + "fieldName": { + "type": "string" + }, + "fieldSearchType": { + "type": "string" + }, + "fieldType": { + "type": "string" + } + } + }, "model.SysApi": { "type": "object", "properties": { @@ -2867,6 +3626,9 @@ var doc = `{ "$ref": "#/definitions/model.SysAuthority" } }, + "defaultRouter": { + "type": "string" + }, "deletedAt": { "type": "string" }, @@ -2899,6 +3661,9 @@ var doc = `{ "$ref": "#/definitions/model.SysBaseMenu" } }, + "closeTab": { + "type": "boolean" + }, "component": { "type": "string" }, @@ -3114,40 +3879,76 @@ var doc = `{ } } }, - "model.SysWorkflow": { + "model.System": { + "type": "object", + "properties": { + "config": { + "type": "object", + "$ref": "#/definitions/config.Server" + } + } + }, + "model.WorkflowEdge": { "type": "object", "properties": { + "clazz": { + "type": "string" + }, + "conditionExpression": { + "type": "string" + }, "createdAt": { "type": "string" }, + "description": { + "type": "string" + }, + "endPoint": { + "description": "终点信息", + "type": "object", + "$ref": "#/definitions/model.WorkflowEndPoint" + }, + "hideIcon": { + "type": "boolean" + }, "id": { - "type": "integer" + "type": "string" }, - "updatedAt": { + "label": { "type": "string" }, - "workflowDescription": { - "description": "工作流描述", + "reverse": { + "type": "boolean" + }, + "seq": { "type": "string" }, - "workflowName": { - "description": "工作流英文id", + "shape": { "type": "string" }, - "workflowNickName": { - "description": "工作流名称", + "source": { "type": "string" }, - "workflowStep": { - "description": "工作流步骤", - "type": "array", - "items": { - "$ref": "#/definitions/model.SysWorkflowStepInfo" - } + "sourceAnchor": { + "type": "integer" + }, + "startPoint": { + "description": "起点信息", + "type": "object", + "$ref": "#/definitions/model.WorkflowStartPoint" + }, + "target": { + "type": "string" + }, + "targetAnchor": { + "type": "integer" + }, + "updatedAt": { + "type": "string" } } }, - "model.SysWorkflowStepInfo": { + "model.WorkflowEndPoint": { "type": "object", "properties": { "createdAt": { @@ -3156,41 +3957,172 @@ var doc = `{ "id": { "type": "integer" }, - "isEnd": { - "description": "是否是完结流节点", + "index": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "workflowEdgeID": { + "type": "string" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + } + }, + "model.WorkflowNode": { + "type": "object", + "properties": { + "assignType": { + "type": "string" + }, + "assignValue": { + "type": "string" + }, + "clazz": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "cycle": { + "type": "string" + }, + "description": { + "type": "string" + }, + "dueDate": { + "type": "string" + }, + "duration": { + "type": "string" + }, + "hideIcon": { "type": "boolean" }, - "isStart": { - "description": "是否是开始流节点", + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "shape": { + "type": "string" + }, + "stateValue": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "success": { "type": "boolean" }, - "stepAuthorityID": { - "description": "操作者级别id", + "to": { + "type": "string" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "view": { + "type": "string" + }, + "waitState": { "type": "string" }, - "stepName": { - "description": "工作流名称", + "workflowProcessID": { "type": "string" }, - "stepNo": { - "description": "步骤id (第几步)", + "x": { + "type": "number" + }, + "y": { "type": "number" + } + } + }, + "model.WorkflowProcess": { + "type": "object", + "properties": { + "category": { + "type": "string" + }, + "clazz": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "description": { + "type": "string" + }, + "edges": { + "description": "流程链接数据", + "type": "array", + "items": { + "$ref": "#/definitions/model.WorkflowEdge" + } + }, + "hideIcon": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "name": { + "type": "string" + }, + "nodes": { + "description": "流程节点数据", + "type": "array", + "items": { + "$ref": "#/definitions/model.WorkflowNode" + } }, "updatedAt": { "type": "string" }, - "workflowID": { - "description": "所属工作流ID", - "type": "integer" + "view": { + "type": "string" } } }, - "model.System": { + "model.WorkflowStartPoint": { "type": "object", "properties": { - "config": { - "type": "object", - "$ref": "#/definitions/config.Server" + "createdAt": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "index": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "workflowEdgeID": { + "type": "string" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" } } }, @@ -3277,6 +4209,30 @@ var doc = `{ } } }, + "request.InitDB": { + "type": "object", + "required": [ + "dbName", + "userName" + ], + "properties": { + "dbName": { + "type": "string" + }, + "host": { + "type": "string" + }, + "password": { + "type": "string" + }, + "port": { + "type": "string" + }, + "userName": { + "type": "string" + } + } + }, "request.Login": { "type": "object", "properties": { @@ -3481,6 +4437,61 @@ var doc = `{ } } }, + "request.WorkflowProcessSearch": { + "type": "object", + "properties": { + "category": { + "type": "string" + }, + "clazz": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "description": { + "type": "string" + }, + "edges": { + "description": "流程链接数据", + "type": "array", + "items": { + "$ref": "#/definitions/model.WorkflowEdge" + } + }, + "hideIcon": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "name": { + "type": "string" + }, + "nodes": { + "description": "流程节点数据", + "type": "array", + "items": { + "$ref": "#/definitions/model.WorkflowNode" + } + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "view": { + "type": "string" + } + } + }, "response.SysAuthorityCopyResponse": { "type": "object", "properties": { diff --git a/server/docs/swagger.json b/server/docs/swagger.json index c8bb402ecf38cc895b9b7790f2010479af870bc1..b90baea639625361ec1a52cb81d82de2933f760f 100644 --- a/server/docs/swagger.json +++ b/server/docs/swagger.json @@ -471,6 +471,17 @@ "AutoCode" ], "summary": "自动代码模板", + "parameters": [ + { + "description": "创建自动代码", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.AutoCodeStruct" + } + } + ], "responses": { "200": { "description": "{\"success\":true,\"data\":{},\"msg\":\"创建成功\"}", @@ -562,6 +573,44 @@ } } }, + "/autoCode/preview": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "AutoCode" + ], + "summary": "预览创建后的代码", + "parameters": [ + { + "description": "预览创建代码", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.AutoCodeStruct" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"创建成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/base/captcha": { "post": { "security": [ @@ -903,6 +952,134 @@ } } }, + "/excel/downloadTemplate": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "excel" + ], + "summary": "下载模板", + "parameters": [ + { + "type": "string", + "description": "模板名称", + "name": "fileName", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/excel/exportExcel": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/octet-stream" + ], + "tags": [ + "excel" + ], + "summary": "导出Excel", + "parameters": [ + { + "description": "导出Excel文件信息", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.ExcelInfo" + } + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/excel/importExcel": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "excel" + ], + "summary": "导入Excel文件", + "parameters": [ + { + "type": "file", + "description": "导入Excel文件", + "name": "file", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"导入成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/excel/loadExcel": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "excel" + ], + "summary": "加载Excel数据", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"加载数据成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/fileUploadAndDownload/breakpointContinue": { "post": { "security": [ @@ -1120,6 +1297,55 @@ } } }, + "/init/checkdb": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "CheckDB" + ], + "summary": "初始化用户数据库", + "responses": { + "200": { + "description": "{\"code\":0,\"data\":{},\"msg\":\"探测完成\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/init/initdb": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "InitDB" + ], + "summary": "初始化用户数据库", + "parameters": [ + { + "description": "初始化数据库参数", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.InitDB" + } + } + ], + "responses": { + "200": { + "description": "{\"code\":0,\"data\":{},\"msg\":\"自动创建数据库成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/jwt/jsonInBlacklist": { "post": { "security": [ @@ -1566,6 +1792,15 @@ "SimpleUploader" ], "summary": "断点续传插件版示例", + "parameters": [ + { + "type": "file", + "description": "断点续传插件版示例", + "name": "file", + "in": "formData", + "required": true + } + ], "responses": { "200": { "description": "{\"success\":true,\"data\":{},\"msg\":\"切片创建成功\"}", @@ -2146,7 +2381,7 @@ } } }, - "/system/ReloadSystem": { + "/system/getServerInfo": { "post": { "security": [ { @@ -2159,21 +2394,10 @@ "tags": [ "System" ], - "summary": "重启系统", - "parameters": [ - { - "description": "重启系统", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.System" - } - } - ], + "summary": "获取服务器信息", "responses": { "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"重启系统成功\"}", + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", "schema": { "type": "string" } @@ -2181,7 +2405,7 @@ } } }, - "/system/getServerInfo": { + "/system/getSystemConfig": { "post": { "security": [ { @@ -2194,7 +2418,7 @@ "tags": [ "System" ], - "summary": "获取服务器信息", + "summary": "获取配置文件内容", "responses": { "200": { "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", @@ -2205,7 +2429,7 @@ } } }, - "/system/getSystemConfig": { + "/system/reloadSystem": { "post": { "security": [ { @@ -2218,10 +2442,10 @@ "tags": [ "System" ], - "summary": "获取配置文件内容", + "summary": "重启系统", "responses": { "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "description": "{\"code\":0,\"data\":{},\"msg\":\"重启系统成功\"}", "schema": { "type": "string" } @@ -2481,39 +2705,441 @@ } } }, - "/workflow/createWorkFlow": { + "/workflowProcess/completeWorkflowMove": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "提交工作流", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/createWorkflowProcess": { "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "workflow" + "WorkflowProcess" ], - "summary": "注册工作流", + "summary": "创建WorkflowProcess", "parameters": [ { - "description": "注册工作流接口", + "description": "创建WorkflowProcess", "name": "data", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/model.SysWorkflow" + "$ref": "#/definitions/model.WorkflowProcess" } } ], "responses": { "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}", + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", "schema": { "type": "string" } } } } - } - }, - "definitions": { - "config.Captcha": { + }, + "/workflowProcess/deleteWorkflowProcess": { + "delete": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "删除WorkflowProcess", + "parameters": [ + { + "description": "删除WorkflowProcess", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.WorkflowProcess" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/deleteWorkflowProcessByIds": { + "delete": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "批量删除WorkflowProcess", + "parameters": [ + { + "description": "批量删除WorkflowProcess", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.IdsReq" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/findWorkflowProcess": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "用id查询WorkflowProcess", + "parameters": [ + { + "description": "用id查询WorkflowProcess", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.WorkflowProcess" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/findWorkflowStep": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "用id查询工作流步骤", + "parameters": [ + { + "description": "用id查询WorkflowProcess", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.WorkflowProcess" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/getMyNeed": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "我的待办", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/getMyStated": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "我发起的工作流", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/getWorkflowMoveByID": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "根据id获取当前节点详情和历史", + "parameters": [ + { + "description": "根据id获取当前节点详情和过往", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.GetById" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/getWorkflowProcessList": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "分页获取WorkflowProcess列表", + "parameters": [ + { + "description": "分页获取WorkflowProcess列表", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WorkflowProcessSearch" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/startWorkflow": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "开启工作流", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/workflowProcess/updateWorkflowProcess": { + "put": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "WorkflowProcess" + ], + "summary": "更新WorkflowProcess", + "parameters": [ + { + "description": "更新WorkflowProcess", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.WorkflowProcess" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"更新成功\"}", + "schema": { + "type": "string" + } + } + } + } + } + }, + "definitions": { + "config.AliyunOSS": { + "type": "object", + "properties": { + "accessKeyId": { + "type": "string" + }, + "accessKeySecret": { + "type": "string" + }, + "bucketName": { + "type": "string" + }, + "bucketUrl": { + "type": "string" + }, + "endpoint": { + "type": "string" + } + } + }, + "config.Captcha": { "type": "object", "properties": { "imgHeight": { @@ -2561,9 +3187,23 @@ } } }, + "config.Excel": { + "type": "object", + "properties": { + "dir": { + "type": "string" + } + } + }, "config.JWT": { "type": "object", "properties": { + "bufferTime": { + "type": "integer" + }, + "expiresTime": { + "type": "integer" + }, "signingKey": { "type": "string" } @@ -2589,6 +3229,9 @@ "logMode": { "type": "boolean" }, + "logZap": { + "type": "string" + }, "maxIdleConns": { "type": "integer" }, @@ -2649,6 +3292,10 @@ "config.Server": { "type": "object", "properties": { + "aliyunOSS": { + "type": "object", + "$ref": "#/definitions/config.AliyunOSS" + }, "captcha": { "type": "object", "$ref": "#/definitions/config.Captcha" @@ -2661,6 +3308,10 @@ "type": "object", "$ref": "#/definitions/config.Email" }, + "excel": { + "type": "object", + "$ref": "#/definitions/config.Excel" + }, "jwt": { "type": "object", "$ref": "#/definitions/config.JWT" @@ -2687,6 +3338,10 @@ "type": "object", "$ref": "#/definitions/config.System" }, + "tencentCOS": { + "type": "object", + "$ref": "#/definitions/config.TencentCOS" + }, "zap": { "type": "object", "$ref": "#/definitions/config.Zap" @@ -2713,6 +3368,29 @@ } } }, + "config.TencentCOS": { + "type": "object", + "properties": { + "baseURL": { + "type": "string" + }, + "bucket": { + "type": "string" + }, + "pathPrefix": { + "type": "string" + }, + "region": { + "type": "string" + }, + "secretID": { + "type": "string" + }, + "secretKey": { + "type": "string" + } + } + }, "config.Zap": { "type": "object", "properties": { @@ -2740,7 +3418,39 @@ "showLine": { "type": "boolean" }, - "stacktraceKey": { + "stacktraceKey": { + "type": "string" + } + } + }, + "model.AutoCodeStruct": { + "type": "object", + "properties": { + "abbreviation": { + "type": "string" + }, + "autoCreateApiToSql": { + "type": "boolean" + }, + "autoMoveFile": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/model.Field" + } + }, + "packageName": { + "type": "string" + }, + "structName": { + "type": "string" + }, + "tableName": { "type": "string" } } @@ -2801,6 +3511,55 @@ } } }, + "model.ExcelInfo": { + "type": "object", + "properties": { + "fileName": { + "type": "string" + }, + "infoList": { + "type": "array", + "items": { + "$ref": "#/definitions/model.SysBaseMenu" + } + } + } + }, + "model.Field": { + "type": "object", + "properties": { + "columnName": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "dataType": { + "type": "string" + }, + "dataTypeLong": { + "type": "string" + }, + "dictType": { + "type": "string" + }, + "fieldDesc": { + "type": "string" + }, + "fieldJson": { + "type": "string" + }, + "fieldName": { + "type": "string" + }, + "fieldSearchType": { + "type": "string" + }, + "fieldType": { + "type": "string" + } + } + }, "model.SysApi": { "type": "object", "properties": { @@ -2851,6 +3610,9 @@ "$ref": "#/definitions/model.SysAuthority" } }, + "defaultRouter": { + "type": "string" + }, "deletedAt": { "type": "string" }, @@ -2883,6 +3645,9 @@ "$ref": "#/definitions/model.SysBaseMenu" } }, + "closeTab": { + "type": "boolean" + }, "component": { "type": "string" }, @@ -3098,40 +3863,76 @@ } } }, - "model.SysWorkflow": { + "model.System": { + "type": "object", + "properties": { + "config": { + "type": "object", + "$ref": "#/definitions/config.Server" + } + } + }, + "model.WorkflowEdge": { "type": "object", "properties": { + "clazz": { + "type": "string" + }, + "conditionExpression": { + "type": "string" + }, "createdAt": { "type": "string" }, + "description": { + "type": "string" + }, + "endPoint": { + "description": "终点信息", + "type": "object", + "$ref": "#/definitions/model.WorkflowEndPoint" + }, + "hideIcon": { + "type": "boolean" + }, "id": { - "type": "integer" + "type": "string" }, - "updatedAt": { + "label": { "type": "string" }, - "workflowDescription": { - "description": "工作流描述", + "reverse": { + "type": "boolean" + }, + "seq": { "type": "string" }, - "workflowName": { - "description": "工作流英文id", + "shape": { "type": "string" }, - "workflowNickName": { - "description": "工作流名称", + "source": { "type": "string" }, - "workflowStep": { - "description": "工作流步骤", - "type": "array", - "items": { - "$ref": "#/definitions/model.SysWorkflowStepInfo" - } + "sourceAnchor": { + "type": "integer" + }, + "startPoint": { + "description": "起点信息", + "type": "object", + "$ref": "#/definitions/model.WorkflowStartPoint" + }, + "target": { + "type": "string" + }, + "targetAnchor": { + "type": "integer" + }, + "updatedAt": { + "type": "string" } } }, - "model.SysWorkflowStepInfo": { + "model.WorkflowEndPoint": { "type": "object", "properties": { "createdAt": { @@ -3140,41 +3941,172 @@ "id": { "type": "integer" }, - "isEnd": { - "description": "是否是完结流节点", + "index": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "workflowEdgeID": { + "type": "string" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + } + }, + "model.WorkflowNode": { + "type": "object", + "properties": { + "assignType": { + "type": "string" + }, + "assignValue": { + "type": "string" + }, + "clazz": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "cycle": { + "type": "string" + }, + "description": { + "type": "string" + }, + "dueDate": { + "type": "string" + }, + "duration": { + "type": "string" + }, + "hideIcon": { "type": "boolean" }, - "isStart": { - "description": "是否是开始流节点", + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "shape": { + "type": "string" + }, + "stateValue": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "success": { "type": "boolean" }, - "stepAuthorityID": { - "description": "操作者级别id", + "to": { + "type": "string" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "view": { + "type": "string" + }, + "waitState": { "type": "string" }, - "stepName": { - "description": "工作流名称", + "workflowProcessID": { "type": "string" }, - "stepNo": { - "description": "步骤id (第几步)", + "x": { + "type": "number" + }, + "y": { "type": "number" + } + } + }, + "model.WorkflowProcess": { + "type": "object", + "properties": { + "category": { + "type": "string" + }, + "clazz": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "description": { + "type": "string" + }, + "edges": { + "description": "流程链接数据", + "type": "array", + "items": { + "$ref": "#/definitions/model.WorkflowEdge" + } + }, + "hideIcon": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "name": { + "type": "string" + }, + "nodes": { + "description": "流程节点数据", + "type": "array", + "items": { + "$ref": "#/definitions/model.WorkflowNode" + } }, "updatedAt": { "type": "string" }, - "workflowID": { - "description": "所属工作流ID", - "type": "integer" + "view": { + "type": "string" } } }, - "model.System": { + "model.WorkflowStartPoint": { "type": "object", "properties": { - "config": { - "type": "object", - "$ref": "#/definitions/config.Server" + "createdAt": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "index": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "workflowEdgeID": { + "type": "string" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" } } }, @@ -3261,6 +4193,30 @@ } } }, + "request.InitDB": { + "type": "object", + "required": [ + "dbName", + "userName" + ], + "properties": { + "dbName": { + "type": "string" + }, + "host": { + "type": "string" + }, + "password": { + "type": "string" + }, + "port": { + "type": "string" + }, + "userName": { + "type": "string" + } + } + }, "request.Login": { "type": "object", "properties": { @@ -3465,6 +4421,61 @@ } } }, + "request.WorkflowProcessSearch": { + "type": "object", + "properties": { + "category": { + "type": "string" + }, + "clazz": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "description": { + "type": "string" + }, + "edges": { + "description": "流程链接数据", + "type": "array", + "items": { + "$ref": "#/definitions/model.WorkflowEdge" + } + }, + "hideIcon": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "name": { + "type": "string" + }, + "nodes": { + "description": "流程节点数据", + "type": "array", + "items": { + "$ref": "#/definitions/model.WorkflowNode" + } + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "view": { + "type": "string" + } + } + }, "response.SysAuthorityCopyResponse": { "type": "object", "properties": { diff --git a/server/docs/swagger.yaml b/server/docs/swagger.yaml index b0e5315b7c285e86c271b0de491ef1f8aee4a849..03318a51423969a7f51eedbf2b1c2fc19bcf69dc 100644 --- a/server/docs/swagger.yaml +++ b/server/docs/swagger.yaml @@ -1,5 +1,18 @@ basePath: / definitions: + config.AliyunOSS: + properties: + accessKeyId: + type: string + accessKeySecret: + type: string + bucketName: + type: string + bucketUrl: + type: string + endpoint: + type: string + type: object config.Captcha: properties: imgHeight: @@ -31,8 +44,17 @@ definitions: to: type: string type: object + config.Excel: + properties: + dir: + type: string + type: object config.JWT: properties: + bufferTime: + type: integer + expiresTime: + type: integer signingKey: type: string type: object @@ -49,6 +71,8 @@ definitions: type: string logMode: type: boolean + logZap: + type: string maxIdleConns: type: integer maxOpenConns: @@ -88,6 +112,9 @@ definitions: type: object config.Server: properties: + aliyunOSS: + $ref: '#/definitions/config.AliyunOSS' + type: object captcha: $ref: '#/definitions/config.Captcha' type: object @@ -97,6 +124,9 @@ definitions: email: $ref: '#/definitions/config.Email' type: object + excel: + $ref: '#/definitions/config.Excel' + type: object jwt: $ref: '#/definitions/config.JWT' type: object @@ -117,6 +147,9 @@ definitions: system: $ref: '#/definitions/config.System' type: object + tencentCOS: + $ref: '#/definitions/config.TencentCOS' + type: object zap: $ref: '#/definitions/config.Zap' type: object @@ -134,6 +167,21 @@ definitions: useMultipoint: type: boolean type: object + config.TencentCOS: + properties: + baseURL: + type: string + bucket: + type: string + pathPrefix: + type: string + region: + type: string + secretID: + type: string + secretKey: + type: string + type: object config.Zap: properties: director: @@ -155,6 +203,27 @@ definitions: stacktraceKey: type: string type: object + model.AutoCodeStruct: + properties: + abbreviation: + type: string + autoCreateApiToSql: + type: boolean + autoMoveFile: + type: boolean + description: + type: string + fields: + items: + $ref: '#/definitions/model.Field' + type: array + packageName: + type: string + structName: + type: string + tableName: + type: string + type: object model.ExaCustomer: properties: createdAt: @@ -192,6 +261,38 @@ definitions: url: type: string type: object + model.ExcelInfo: + properties: + fileName: + type: string + infoList: + items: + $ref: '#/definitions/model.SysBaseMenu' + type: array + type: object + model.Field: + properties: + columnName: + type: string + comment: + type: string + dataType: + type: string + dataTypeLong: + type: string + dictType: + type: string + fieldDesc: + type: string + fieldJson: + type: string + fieldName: + type: string + fieldSearchType: + type: string + fieldType: + type: string + type: object model.SysApi: properties: apiGroup: @@ -225,6 +326,8 @@ definitions: items: $ref: '#/definitions/model.SysAuthority' type: array + defaultRouter: + type: string deletedAt: type: string menus: @@ -246,6 +349,8 @@ definitions: items: $ref: '#/definitions/model.SysBaseMenu' type: array + closeTab: + type: boolean component: type: string createdAt: @@ -388,61 +493,170 @@ definitions: uuid: type: string type: object - model.SysWorkflow: + model.System: properties: + config: + $ref: '#/definitions/config.Server' + type: object + type: object + model.WorkflowEdge: + properties: + clazz: + type: string + conditionExpression: + type: string createdAt: type: string + description: + type: string + endPoint: + $ref: '#/definitions/model.WorkflowEndPoint' + description: 终点信息 + type: object + hideIcon: + type: boolean id: - type: integer - updatedAt: type: string - workflowDescription: - description: 工作流描述 + label: type: string - workflowName: - description: 工作流英文id + reverse: + type: boolean + seq: type: string - workflowNickName: - description: 工作流名称 + shape: + type: string + source: + type: string + sourceAnchor: + type: integer + startPoint: + $ref: '#/definitions/model.WorkflowStartPoint' + description: 起点信息 + type: object + target: + type: string + targetAnchor: + type: integer + updatedAt: type: string - workflowStep: - description: 工作流步骤 - items: - $ref: '#/definitions/model.SysWorkflowStepInfo' - type: array type: object - model.SysWorkflowStepInfo: + model.WorkflowEndPoint: properties: createdAt: type: string id: type: integer - isEnd: - description: 是否是完结流节点 + index: + type: integer + updatedAt: + type: string + workflowEdgeID: + type: string + x: + type: number + "y": + type: number + type: object + model.WorkflowNode: + properties: + assignType: + type: string + assignValue: + type: string + clazz: + type: string + content: + type: string + createdAt: + type: string + cycle: + type: string + description: + type: string + dueDate: + type: string + duration: + type: string + hideIcon: type: boolean - isStart: - description: 是否是开始流节点 + id: + type: string + label: + type: string + shape: + type: string + stateValue: + type: string + subject: + type: string + success: type: boolean - stepAuthorityID: - description: 操作者级别id + to: type: string - stepName: - description: 工作流名称 + type: + type: string + updatedAt: + type: string + view: type: string - stepNo: - description: 步骤id (第几步) + waitState: + type: string + workflowProcessID: + type: string + x: type: number + "y": + type: number + type: object + model.WorkflowProcess: + properties: + category: + type: string + clazz: + type: string + createdAt: + type: string + description: + type: string + edges: + description: 流程链接数据 + items: + $ref: '#/definitions/model.WorkflowEdge' + type: array + hideIcon: + type: boolean + id: + type: string + label: + type: string + name: + type: string + nodes: + description: 流程节点数据 + items: + $ref: '#/definitions/model.WorkflowNode' + type: array updatedAt: type: string - workflowID: - description: 所属工作流ID - type: integer + view: + type: string type: object - model.System: + model.WorkflowStartPoint: properties: - config: - $ref: '#/definitions/config.Server' - type: object + createdAt: + type: string + id: + type: integer + index: + type: integer + updatedAt: + type: string + workflowEdgeID: + type: string + x: + type: number + "y": + type: number type: object request.AddMenuAuthorityInfo: properties: @@ -497,6 +711,22 @@ definitions: type: integer type: array type: object + request.InitDB: + properties: + dbName: + type: string + host: + type: string + password: + type: string + port: + type: string + userName: + type: string + required: + - dbName + - userName + type: object request.Login: properties: captcha: @@ -631,6 +861,43 @@ definitions: user_id: type: integer type: object + request.WorkflowProcessSearch: + properties: + category: + type: string + clazz: + type: string + createdAt: + type: string + description: + type: string + edges: + description: 流程链接数据 + items: + $ref: '#/definitions/model.WorkflowEdge' + type: array + hideIcon: + type: boolean + id: + type: string + label: + type: string + name: + type: string + nodes: + description: 流程节点数据 + items: + $ref: '#/definitions/model.WorkflowNode' + type: array + page: + type: integer + pageSize: + type: integer + updatedAt: + type: string + view: + type: string + type: object response.SysAuthorityCopyResponse: properties: authority: @@ -919,6 +1186,13 @@ paths: post: consumes: - application/json + parameters: + - description: 创建自动代码 + in: body + name: data + required: true + schema: + $ref: '#/definitions/model.AutoCodeStruct' produces: - application/json responses: @@ -979,6 +1253,29 @@ paths: summary: 获取当前数据库所有表 tags: - AutoCode + /autoCode/preview: + post: + consumes: + - application/json + parameters: + - description: 预览创建代码 + in: body + name: data + required: true + schema: + $ref: '#/definitions/model.AutoCodeStruct' + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"创建成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 预览创建后的代码 + tags: + - AutoCode /base/captcha: post: consumes: @@ -1186,6 +1483,83 @@ paths: summary: 发送测试邮件 tags: - System + /excel/downloadTemplate: + get: + consumes: + - multipart/form-data + parameters: + - description: 模板名称 + in: query + name: fileName + required: true + type: string + produces: + - application/json + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: 下载模板 + tags: + - excel + /excel/exportExcel: + post: + consumes: + - application/json + parameters: + - description: 导出Excel文件信息 + in: body + name: data + required: true + schema: + $ref: '#/definitions/model.ExcelInfo' + produces: + - application/octet-stream + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: 导出Excel + tags: + - excel + /excel/importExcel: + post: + consumes: + - multipart/form-data + parameters: + - description: 导入Excel文件 + in: formData + name: file + required: true + type: file + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"导入成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 导入Excel文件 + tags: + - excel + /excel/loadExcel: + get: + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"加载数据成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 加载Excel数据 + tags: + - excel /fileUploadAndDownload/breakpointContinue: post: consumes: @@ -1318,6 +1692,37 @@ paths: summary: 上传文件示例 tags: - ExaFileUploadAndDownload + /init/checkdb: + post: + produces: + - application/json + responses: + "200": + description: '{"code":0,"data":{},"msg":"探测完成"}' + schema: + type: string + summary: 初始化用户数据库 + tags: + - CheckDB + /init/initdb: + post: + parameters: + - description: 初始化数据库参数 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.InitDB' + produces: + - application/json + responses: + "200": + description: '{"code":0,"data":{},"msg":"自动创建数据库成功"}' + schema: + type: string + summary: 初始化用户数据库 + tags: + - InitDB /jwt/jsonInBlacklist: post: consumes: @@ -1581,6 +1986,12 @@ paths: post: consumes: - multipart/form-data + parameters: + - description: 断点续传插件版示例 + in: formData + name: file + required: true + type: file produces: - application/json responses: @@ -1938,28 +2349,21 @@ paths: summary: 分页获取SysOperationRecord列表 tags: - SysOperationRecord - /system/ReloadSystem: + /system/getServerInfo: post: - parameters: - - description: 重启系统 - in: body - name: data - required: true - schema: - $ref: '#/definitions/model.System' produces: - application/json responses: "200": - description: '{"success":true,"data":{},"msg":"重启系统成功"}' + description: '{"success":true,"data":{},"msg":"获取成功"}' schema: type: string security: - ApiKeyAuth: [] - summary: 重启系统 + summary: 获取服务器信息 tags: - System - /system/getServerInfo: + /system/getSystemConfig: post: produces: - application/json @@ -1970,21 +2374,21 @@ paths: type: string security: - ApiKeyAuth: [] - summary: 获取服务器信息 + summary: 获取配置文件内容 tags: - System - /system/getSystemConfig: + /system/reloadSystem: post: produces: - application/json responses: "200": - description: '{"success":true,"data":{},"msg":"获取成功"}' + description: '{"code":0,"data":{},"msg":"重启系统成功"}' schema: type: string security: - ApiKeyAuth: [] - summary: 获取配置文件内容 + summary: 重启系统 tags: - System /system/setSystemConfig: @@ -2140,25 +2544,254 @@ paths: summary: 设置用户信息 tags: - SysUser - /workflow/createWorkFlow: + /workflowProcess/completeWorkflowMove: post: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"获取成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 提交工作流 + tags: + - WorkflowProcess + /workflowProcess/createWorkflowProcess: + post: + consumes: + - application/json parameters: - - description: 注册工作流接口 + - description: 创建WorkflowProcess in: body name: data required: true schema: - $ref: '#/definitions/model.SysWorkflow' + $ref: '#/definitions/model.WorkflowProcess' produces: - application/json responses: "200": - description: '{"success":true,"data":{},"msg":"注册成功"}' + description: '{"success":true,"data":{},"msg":"获取成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 创建WorkflowProcess + tags: + - WorkflowProcess + /workflowProcess/deleteWorkflowProcess: + delete: + consumes: + - application/json + parameters: + - description: 删除WorkflowProcess + in: body + name: data + required: true + schema: + $ref: '#/definitions/model.WorkflowProcess' + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"删除成功"}' schema: type: string - summary: 注册工作流 + security: + - ApiKeyAuth: [] + summary: 删除WorkflowProcess + tags: + - WorkflowProcess + /workflowProcess/deleteWorkflowProcessByIds: + delete: + consumes: + - application/json + parameters: + - description: 批量删除WorkflowProcess + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.IdsReq' + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"删除成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 批量删除WorkflowProcess + tags: + - WorkflowProcess + /workflowProcess/findWorkflowProcess: + get: + consumes: + - application/json + parameters: + - description: 用id查询WorkflowProcess + in: body + name: data + required: true + schema: + $ref: '#/definitions/model.WorkflowProcess' + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"查询成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 用id查询WorkflowProcess + tags: + - WorkflowProcess + /workflowProcess/findWorkflowStep: + get: + consumes: + - application/json + parameters: + - description: 用id查询WorkflowProcess + in: body + name: data + required: true + schema: + $ref: '#/definitions/model.WorkflowProcess' + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"查询成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 用id查询工作流步骤 + tags: + - WorkflowProcess + /workflowProcess/getMyNeed: + get: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"获取成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 我的待办 + tags: + - WorkflowProcess + /workflowProcess/getMyStated: + get: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"获取成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 我发起的工作流 + tags: + - WorkflowProcess + /workflowProcess/getWorkflowMoveByID: + get: + consumes: + - application/json + parameters: + - description: 根据id获取当前节点详情和过往 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.GetById' + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"获取成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 根据id获取当前节点详情和历史 + tags: + - WorkflowProcess + /workflowProcess/getWorkflowProcessList: + get: + consumes: + - application/json + parameters: + - description: 分页获取WorkflowProcess列表 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.WorkflowProcessSearch' + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"获取成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 分页获取WorkflowProcess列表 + tags: + - WorkflowProcess + /workflowProcess/startWorkflow: + post: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"获取成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 开启工作流 + tags: + - WorkflowProcess + /workflowProcess/updateWorkflowProcess: + put: + consumes: + - application/json + parameters: + - description: 更新WorkflowProcess + in: body + name: data + required: true + schema: + $ref: '#/definitions/model.WorkflowProcess' + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"更新成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 更新WorkflowProcess tags: - - workflow + - WorkflowProcess securityDefinitions: ApiKeyAuth: in: header