From 793c306d253cc901ba8649ef5f33d7c158e06354 Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期四, 24 八月 2023 17:45:52 +0800 Subject: [PATCH] fix --- router/test/supplier_type.go | 27 model/test/supplier_type.go | 17 service/test/supplier_type.go | 67 + api/v1/test/enter.go | 1 model/test/request/supplier_type.go | 14 router/test/enter.go | 1 api/v1/test/supplier_type.go | 166 ++++ docs/swagger.yaml | 479 ++++------- initialize/router.go | 1 docs/docs.go | 712 ++++++------------ docs/swagger.json | 771 ++++++++------------ service/test/enter.go | 1 12 files changed, 1,029 insertions(+), 1,228 deletions(-) diff --git a/api/v1/test/enter.go b/api/v1/test/enter.go index e3393f9..4a13db9 100644 --- a/api/v1/test/enter.go +++ b/api/v1/test/enter.go @@ -1,5 +1,6 @@ package test type ApiGroup struct { + SupplierTypeApi IndustryApi } diff --git a/api/v1/test/supplier_type.go b/api/v1/test/supplier_type.go new file mode 100644 index 0000000..9cd5b4d --- /dev/null +++ b/api/v1/test/supplier_type.go @@ -0,0 +1,166 @@ +package test + +import ( + "github.com/flipped-aurora/gin-vue-admin/server/global" + "github.com/flipped-aurora/gin-vue-admin/server/model/common/request" + "github.com/flipped-aurora/gin-vue-admin/server/model/common/response" + "github.com/flipped-aurora/gin-vue-admin/server/model/test" + testReq "github.com/flipped-aurora/gin-vue-admin/server/model/test/request" + "github.com/flipped-aurora/gin-vue-admin/server/service" + "github.com/gin-gonic/gin" + "go.uber.org/zap" +) + +type SupplierTypeApi struct { +} + +var stService = service.ServiceGroupApp.TestServiceGroup.SupplierTypeService + +// CreateSupplierType 鍒涘缓SupplierType +// @Tags SupplierType +// @Summary 鍒涘缓SupplierType +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body test.SupplierType true "鍒涘缓SupplierType" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"鑾峰彇鎴愬姛"}" +// @Router /st/createSupplierType [post] +func (stApi *SupplierTypeApi) CreateSupplierType(c *gin.Context) { + var st test.SupplierType + err := c.ShouldBindJSON(&st) + if err != nil { + response.FailWithMessage(err.Error(), c) + return + } + if err := stService.CreateSupplierType(&st); err != nil { + global.GVA_LOG.Error("鍒涘缓澶辫触!", zap.Error(err)) + response.FailWithMessage("鍒涘缓澶辫触", c) + } else { + response.OkWithMessage("鍒涘缓鎴愬姛", c) + } +} + +// DeleteSupplierType 鍒犻櫎SupplierType +// @Tags SupplierType +// @Summary 鍒犻櫎SupplierType +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body test.SupplierType true "鍒犻櫎SupplierType" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"鍒犻櫎鎴愬姛"}" +// @Router /st/deleteSupplierType [delete] +func (stApi *SupplierTypeApi) DeleteSupplierType(c *gin.Context) { + var st test.SupplierType + err := c.ShouldBindJSON(&st) + if err != nil { + response.FailWithMessage(err.Error(), c) + return + } + if err := stService.DeleteSupplierType(st); err != nil { + global.GVA_LOG.Error("鍒犻櫎澶辫触!", zap.Error(err)) + response.FailWithMessage("鍒犻櫎澶辫触", c) + } else { + response.OkWithMessage("鍒犻櫎鎴愬姛", c) + } +} + +// DeleteSupplierTypeByIds 鎵归噺鍒犻櫎SupplierType +// @Tags SupplierType +// @Summary 鎵归噺鍒犻櫎SupplierType +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body request.IdsReq true "鎵归噺鍒犻櫎SupplierType" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"鎵归噺鍒犻櫎鎴愬姛"}" +// @Router /st/deleteSupplierTypeByIds [delete] +func (stApi *SupplierTypeApi) DeleteSupplierTypeByIds(c *gin.Context) { + var IDS request.IdsReq + err := c.ShouldBindJSON(&IDS) + if err != nil { + response.FailWithMessage(err.Error(), c) + return + } + if err := stService.DeleteSupplierTypeByIds(IDS); err != nil { + global.GVA_LOG.Error("鎵归噺鍒犻櫎澶辫触!", zap.Error(err)) + response.FailWithMessage("鎵归噺鍒犻櫎澶辫触", c) + } else { + response.OkWithMessage("鎵归噺鍒犻櫎鎴愬姛", c) + } +} + +// UpdateSupplierType 鏇存柊SupplierType +// @Tags SupplierType +// @Summary 鏇存柊SupplierType +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body test.SupplierType true "鏇存柊SupplierType" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"鏇存柊鎴愬姛"}" +// @Router /st/updateSupplierType [put] +func (stApi *SupplierTypeApi) UpdateSupplierType(c *gin.Context) { + var st test.SupplierType + err := c.ShouldBindJSON(&st) + if err != nil { + response.FailWithMessage(err.Error(), c) + return + } + if err := stService.UpdateSupplierType(st); err != nil { + global.GVA_LOG.Error("鏇存柊澶辫触!", zap.Error(err)) + response.FailWithMessage("鏇存柊澶辫触", c) + } else { + response.OkWithMessage("鏇存柊鎴愬姛", c) + } +} + +// FindSupplierType 鐢╥d鏌ヨSupplierType +// @Tags SupplierType +// @Summary 鐢╥d鏌ヨSupplierType +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data query test.SupplierType true "鐢╥d鏌ヨSupplierType" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"鏌ヨ鎴愬姛"}" +// @Router /st/findSupplierType [get] +func (stApi *SupplierTypeApi) FindSupplierType(c *gin.Context) { + var st test.SupplierType + err := c.ShouldBindQuery(&st) + if err != nil { + response.FailWithMessage(err.Error(), c) + return + } + if rest, err := stService.GetSupplierType(st.ID); err != nil { + global.GVA_LOG.Error("鏌ヨ澶辫触!", zap.Error(err)) + response.FailWithMessage("鏌ヨ澶辫触", c) + } else { + response.OkWithData(gin.H{"rest": rest}, c) + } +} + +// GetSupplierTypeList 鍒嗛〉鑾峰彇SupplierType鍒楄〃 +// @Tags SupplierType +// @Summary 鍒嗛〉鑾峰彇SupplierType鍒楄〃 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data query testReq.SupplierTypeSearch true "鍒嗛〉鑾峰彇SupplierType鍒楄〃" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"鑾峰彇鎴愬姛"}" +// @Router /st/getSupplierTypeList [get] +func (stApi *SupplierTypeApi) GetSupplierTypeList(c *gin.Context) { + var pageInfo testReq.SupplierTypeSearch + err := c.ShouldBindQuery(&pageInfo) + if err != nil { + response.FailWithMessage(err.Error(), c) + return + } + if list, total, err := stService.GetSupplierTypeInfoList(pageInfo); err != nil { + global.GVA_LOG.Error("鑾峰彇澶辫触!", zap.Error(err)) + response.FailWithMessage("鑾峰彇澶辫触", c) + } else { + response.OkWithDetailed(response.PageResult{ + List: list, + Total: total, + Page: pageInfo.Page, + PageSize: pageInfo.PageSize, + }, "鑾峰彇鎴愬姛", c) + } +} diff --git a/docs/docs.go b/docs/docs.go index c2510fa..b119fe1 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -911,7 +911,7 @@ } ], "consumes": [ - "application/json" + "multipart/form-data" ], "produces": [ "application/json" @@ -919,21 +919,19 @@ "tags": [ "AutoCode" ], - "summary": "鍒涘缓鎻掍欢妯℃澘", + "summary": "瀹夎鎻掍欢", "parameters": [ { - "description": "鍒涘缓鎻掍欢妯℃澘", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/system.SysAutoCode" - } + "type": "file", + "description": "this is a test file", + "name": "plug", + "in": "formData", + "required": true } ], "responses": { "200": { - "description": "鍒涘缓鎻掍欢妯℃澘鎴愬姛", + "description": "瀹夎鎻掍欢鎴愬姛", "schema": { "allOf": [ { @@ -943,8 +941,10 @@ "type": "object", "properties": { "data": { - "type": "object", - "additionalProperties": true + "type": "array", + "items": { + "type": "object" + } }, "msg": { "type": "string" @@ -1378,60 +1378,6 @@ } } }, - "/autoCode/installPlugin": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], - "tags": [ - "AutoCode" - ], - "summary": "瀹夎鎻掍欢", - "parameters": [ - { - "type": "file", - "description": "this is a test file", - "name": "plug", - "in": "formData", - "required": true - } - ], - "responses": { - "200": { - "description": "瀹夎鎻掍欢鎴愬姛", - "schema": { - "allOf": [ - { - "$ref": "#/definitions/response.Response" - }, - { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object" - } - }, - "msg": { - "type": "string" - } - } - } - ] - } - } - } - } - }, "/autoCode/preview": { "post": { "security": [ @@ -1463,60 +1409,6 @@ "responses": { "200": { "description": "棰勮鍒涘缓鍚庣殑浠g爜", - "schema": { - "allOf": [ - { - "$ref": "#/definitions/response.Response" - }, - { - "type": "object", - "properties": { - "data": { - "type": "object", - "additionalProperties": true - }, - "msg": { - "type": "string" - } - } - } - ] - } - } - } - } - }, - "/autoCode/pubPlug": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "AutoCode" - ], - "summary": "鎵撳寘鎻掍欢", - "parameters": [ - { - "description": "鎵撳寘鎻掍欢", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/system.SysAutoCode" - } - } - ], - "responses": { - "200": { - "description": "鎵撳寘鎻掍欢鎴愬姛", "schema": { "allOf": [ { @@ -1800,6 +1692,12 @@ "parameters": [ { "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { + "type": "string", "description": "瀹㈡埛鍚�", "name": "customerName", "in": "query" @@ -1826,6 +1724,12 @@ "type": "integer", "description": "绠$悊ID", "name": "sysUserId", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" } ], @@ -2412,266 +2316,6 @@ } } ] - } - } - } - } - }, - "/i/createIndustry": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Industry" - ], - "summary": "鍒涘缓Industry", - "parameters": [ - { - "description": "鍒涘缓Industry", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/test.Industry" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"鑾峰彇鎴愬姛\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/i/deleteIndustry": { - "delete": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Industry" - ], - "summary": "鍒犻櫎Industry", - "parameters": [ - { - "description": "鍒犻櫎Industry", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/test.Industry" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"鍒犻櫎鎴愬姛\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/i/deleteIndustryByIds": { - "delete": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Industry" - ], - "summary": "鎵归噺鍒犻櫎Industry", - "parameters": [ - { - "description": "鎵归噺鍒犻櫎Industry", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.IdsReq" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"鎵归噺鍒犻櫎鎴愬姛\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/i/findIndustry": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Industry" - ], - "summary": "鐢╥d鏌ヨIndustry", - "parameters": [ - { - "type": "integer", - "description": "涓婚敭ID", - "name": "id", - "in": "query" - }, - { - "type": "string", - "name": "name", - "in": "query" - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"鏌ヨ鎴愬姛\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/i/getIndustryList": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Industry" - ], - "summary": "鍒嗛〉鑾峰彇Industry鍒楄〃", - "parameters": [ - { - "type": "string", - "name": "endCreatedAt", - "in": "query" - }, - { - "type": "integer", - "description": "涓婚敭ID", - "name": "id", - "in": "query" - }, - { - "type": "string", - "description": "鍏抽敭瀛�", - "name": "keyword", - "in": "query" - }, - { - "type": "string", - "name": "name", - "in": "query" - }, - { - "type": "integer", - "description": "椤电爜", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "姣忛〉澶у皬", - "name": "pageSize", - "in": "query" - }, - { - "type": "string", - "name": "startCreatedAt", - "in": "query" - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"鑾峰彇鎴愬姛\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/i/updateIndustry": { - "put": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Industry" - ], - "summary": "鏇存柊Industry", - "parameters": [ - { - "description": "鏇存柊Industry", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/test.Industry" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"鏇存柊鎴愬姛\"}", - "schema": { - "type": "string" } } } @@ -3373,6 +3017,12 @@ "parameters": [ { "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { + "type": "string", "description": "鎻忚堪", "name": "desc", "in": "query" @@ -3399,6 +3049,12 @@ "type": "string", "description": "瀛楀吀鍚嶏紙鑻憋級", "name": "type", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" } ], @@ -3448,6 +3104,12 @@ "parameters": [ { "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { + "type": "string", "description": "鎻忚堪", "name": "desc", "in": "query" @@ -3492,6 +3154,12 @@ "type": "string", "description": "瀛楀吀鍚嶏紙鑻憋級", "name": "type", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" } ], @@ -3689,6 +3357,12 @@ "summary": "鐢╥d鏌ヨSysDictionaryDetail", "parameters": [ { + "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { "type": "integer", "description": "涓婚敭ID", "name": "id", @@ -3716,6 +3390,12 @@ "type": "integer", "description": "鍏宠仈鏍囪", "name": "sysDictionaryID", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" }, { @@ -3770,6 +3450,12 @@ "summary": "鍒嗛〉鑾峰彇SysDictionaryDetail鍒楄〃", "parameters": [ { + "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { "type": "integer", "description": "涓婚敭ID", "name": "id", @@ -3815,6 +3501,12 @@ "type": "integer", "description": "鍏宠仈鏍囪", "name": "sysDictionaryID", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" }, { @@ -4081,6 +3773,12 @@ }, { "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { + "type": "string", "description": "閿欒淇℃伅", "name": "error_message", "in": "query" @@ -4125,6 +3823,12 @@ "type": "integer", "description": "璇锋眰鐘舵��", "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" }, { @@ -4192,6 +3896,12 @@ }, { "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { + "type": "string", "description": "閿欒淇℃伅", "name": "error_message", "in": "query" @@ -4254,6 +3964,12 @@ "type": "integer", "description": "璇锋眰鐘舵��", "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" }, { @@ -5222,12 +4938,15 @@ "type": "string" }, "path": { + "description": "鏈嶅姟鍣ㄥ湴鍧�:绔彛", "type": "string" }, "port": { + "description": ":绔彛", "type": "string" }, "prefix": { + "description": "鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥", "type": "string" }, "singular": { @@ -5235,7 +4954,7 @@ "type": "boolean" }, "username": { - "description": "鏁版嵁搴撳瘑鐮�", + "description": "鏁版嵁搴撶敤鎴峰悕", "type": "string" } } @@ -5277,12 +4996,15 @@ "type": "string" }, "path": { + "description": "鏈嶅姟鍣ㄥ湴鍧�:绔彛", "type": "string" }, "port": { + "description": ":绔彛", "type": "string" }, "prefix": { + "description": "鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥", "type": "string" }, "singular": { @@ -5290,7 +5012,7 @@ "type": "boolean" }, "username": { - "description": "鏁版嵁搴撳瘑鐮�", + "description": "鏁版嵁搴撶敤鎴峰悕", "type": "string" } } @@ -5332,12 +5054,15 @@ "type": "string" }, "path": { + "description": "鏈嶅姟鍣ㄥ湴鍧�:绔彛", "type": "string" }, "port": { + "description": ":绔彛", "type": "string" }, "prefix": { + "description": "鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥", "type": "string" }, "singular": { @@ -5345,7 +5070,7 @@ "type": "boolean" }, "username": { - "description": "鏁版嵁搴撳瘑鐮�", + "description": "鏁版嵁搴撶敤鎴峰悕", "type": "string" } } @@ -5387,12 +5112,15 @@ "type": "string" }, "path": { + "description": "鏈嶅姟鍣ㄥ湴鍧�:绔彛", "type": "string" }, "port": { + "description": ":绔彛", "type": "string" }, "prefix": { + "description": "鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥", "type": "string" }, "singular": { @@ -5400,7 +5128,7 @@ "type": "boolean" }, "username": { - "description": "鏁版嵁搴撳瘑鐮�", + "description": "鏁版嵁搴撶敤鎴峰悕", "type": "string" } } @@ -5532,9 +5260,6 @@ "redis": { "$ref": "#/definitions/config.Redis" }, - "sqlite": { - "$ref": "#/definitions/config.Sqlite" - }, "system": { "$ref": "#/definitions/config.System" }, @@ -5592,12 +5317,15 @@ "type": "string" }, "path": { + "description": "鏈嶅姟鍣ㄥ湴鍧�:绔彛", "type": "string" }, "port": { + "description": ":绔彛", "type": "string" }, "prefix": { + "description": "鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥", "type": "string" }, "singular": { @@ -5608,62 +5336,7 @@ "type": "string" }, "username": { - "description": "鏁版嵁搴撳瘑鐮�", - "type": "string" - } - } - }, - "config.Sqlite": { - "type": "object", - "properties": { - "config": { - "description": "楂樼骇閰嶇疆", - "type": "string" - }, - "db-name": { - "description": "鏁版嵁搴撳悕", - "type": "string" - }, - "engine": { - "description": "鏁版嵁搴撳紩鎿庯紝榛樿InnoDB", - "type": "string", - "default": "InnoDB" - }, - "log-mode": { - "description": "鏄惁寮�鍚疓orm鍏ㄥ眬鏃ュ織", - "type": "string" - }, - "log-zap": { - "description": "鏄惁閫氳繃zap鍐欏叆鏃ュ織鏂囦欢", - "type": "boolean" - }, - "max-idle-conns": { - "description": "绌洪棽涓殑鏈�澶ц繛鎺ユ暟", - "type": "integer" - }, - "max-open-conns": { - "description": "鎵撳紑鍒版暟鎹簱鐨勬渶澶ц繛鎺ユ暟", - "type": "integer" - }, - "password": { - "description": "鏁版嵁搴撳瘑鐮�", - "type": "string" - }, - "path": { - "type": "string" - }, - "port": { - "type": "string" - }, - "prefix": { - "type": "string" - }, - "singular": { - "description": "鏄惁寮�鍚叏灞�绂佺敤澶嶆暟锛宼rue琛ㄧず寮�鍚�", - "type": "boolean" - }, - "username": { - "description": "鏁版嵁搴撳瘑鐮�", + "description": "鏁版嵁搴撶敤鎴峰悕", "type": "string" } } @@ -5796,6 +5469,10 @@ "example.ExaCustomer": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "customerName": { "description": "瀹㈡埛鍚�", "type": "string" @@ -5823,6 +5500,10 @@ "sysUserId": { "description": "绠$悊ID", "type": "integer" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, @@ -5831,6 +5512,10 @@ "properties": { "chunkTotal": { "type": "integer" + }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" }, "exaFileChunk": { "type": "array", @@ -5853,12 +5538,20 @@ }, "isFinish": { "type": "boolean" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, "example.ExaFileChunk": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "exaFileID": { "type": "integer" }, @@ -5871,12 +5564,20 @@ "id": { "description": "涓婚敭ID", "type": "integer" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, "example.ExaFileUploadAndDownload": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "id": { "description": "涓婚敭ID", "type": "integer" @@ -5893,6 +5594,10 @@ "description": "鏂囦欢鏍囩", "type": "string" }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" + }, "url": { "description": "鏂囦欢鍦板潃", "type": "string" @@ -5903,31 +5608,31 @@ "type": "object", "properties": { "from": { - "description": "鍙戜欢浜� 浣犺嚜宸辫鍙戦偖浠剁殑閭", + "description": "鏀朵欢浜�", "type": "string" }, "host": { - "description": "鏈嶅姟鍣ㄥ湴鍧� 渚嬪 smtp.qq.com 璇峰墠寰�QQ鎴栬�呬綘瑕佸彂閭欢鐨勯偖绠辨煡鐪嬪叾smtp鍗忚", + "description": "鏈嶅姟鍣ㄥ湴鍧�", "type": "string" }, "is-ssl": { - "description": "鏄惁SSL 鏄惁寮�鍚疭SL", + "description": "鏄惁SSL", "type": "boolean" }, "nickname": { - "description": "鏄电О 鍙戜欢浜烘樀绉� 閫氬父涓鸿嚜宸辩殑閭", + "description": "鏄电О", "type": "string" }, "port": { - "description": "绔彛 璇峰墠寰�QQ鎴栬�呬綘瑕佸彂閭欢鐨勯偖绠辨煡鐪嬪叾smtp鍗忚 澶у涓� 465", + "description": "绔彛", "type": "integer" }, "secret": { - "description": "瀵嗛挜 鐢ㄤ簬鐧诲綍鐨勫瘑閽� 鏈�濂戒笉瑕佺敤閭瀵嗙爜 鍘婚偖绠眘mtp鐢宠涓�涓敤浜庣櫥褰曠殑瀵嗛挜", + "description": "瀵嗛挜", "type": "string" }, "to": { - "description": "鏀朵欢浜�:澶氫釜浠ヨ嫳鏂囬�楀彿鍒嗛殧 渚嬶細a@qq.com b@qq.com 姝e紡寮�鍙戜腑璇锋妸姝ら」鐩綔涓哄弬鏁颁娇鐢�", + "description": "鏀朵欢浜�:澶氫釜浠ヨ嫳鏂囬�楀彿鍒嗛殧", "type": "string" } } @@ -6023,15 +5728,12 @@ "request.InitDB": { "type": "object", "required": [ - "dbName" + "dbName", + "userName" ], "properties": { "dbName": { "description": "鏁版嵁搴撳悕", - "type": "string" - }, - "dbPath": { - "description": "sqlite鏁版嵁搴撴枃浠惰矾寰�", "type": "string" }, "dbType": { @@ -6155,6 +5857,10 @@ "description": "api缁�", "type": "string" }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "desc": { "description": "鎺掑簭鏂瑰紡:鍗囧簭false(榛樿)|闄嶅簭true", "type": "boolean" @@ -6189,6 +5895,10 @@ }, "path": { "description": "api璺緞", + "type": "string" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", "type": "string" } } @@ -6614,6 +6324,10 @@ "description": "api缁�", "type": "string" }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "description": { "description": "api涓枃鎻忚堪", "type": "string" @@ -6628,6 +6342,10 @@ }, "path": { "description": "api璺緞", + "type": "string" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", "type": "string" } } @@ -6685,6 +6403,10 @@ "system.SysAutoCode": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "desc": { "type": "string" }, @@ -6696,6 +6418,10 @@ "type": "string" }, "packageName": { + "type": "string" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", "type": "string" } } @@ -6717,6 +6443,10 @@ }, "component": { "description": "瀵瑰簲鍓嶇鏂囦欢璺緞", + "type": "string" + }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", "type": "string" }, "hidden": { @@ -6762,12 +6492,20 @@ "sort": { "description": "鎺掑簭鏍囪", "type": "integer" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, "system.SysBaseMenuBtn": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "desc": { "type": "string" }, @@ -6780,12 +6518,20 @@ }, "sysBaseMenuID": { "type": "integer" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, "system.SysBaseMenuParameter": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "id": { "description": "涓婚敭ID", "type": "integer" @@ -6801,6 +6547,10 @@ "description": "鍦板潃鏍忔惡甯﹀弬鏁颁负params杩樻槸query", "type": "string" }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" + }, "value": { "description": "鍦板潃鏍忔惡甯﹀弬鏁扮殑鍊�", "type": "string" @@ -6810,6 +6560,10 @@ "system.SysDictionary": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "desc": { "description": "鎻忚堪", "type": "string" @@ -6835,12 +6589,20 @@ "type": { "description": "瀛楀吀鍚嶏紙鑻憋級", "type": "string" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, "system.SysDictionaryDetail": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "id": { "description": "涓婚敭ID", "type": "integer" @@ -6860,6 +6622,10 @@ "sysDictionaryID": { "description": "鍏宠仈鏍囪", "type": "integer" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" }, "value": { "description": "瀛楀吀鍊�", @@ -6890,6 +6656,10 @@ }, "component": { "description": "瀵瑰簲鍓嶇鏂囦欢璺緞", + "type": "string" + }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", "type": "string" }, "hidden": { @@ -6938,6 +6708,10 @@ "sort": { "description": "鎺掑簭鏍囪", "type": "integer" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, @@ -6950,6 +6724,10 @@ }, "body": { "description": "璇锋眰Body", + "type": "string" + }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", "type": "string" }, "error_message": { @@ -6984,6 +6762,10 @@ "description": "璇锋眰鐘舵��", "type": "integer" }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" + }, "user": { "$ref": "#/definitions/system.SysUser" }, @@ -7017,6 +6799,10 @@ "description": "鍩虹棰滆壊", "type": "string" }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "email": { "description": "鐢ㄦ埛閭", "type": "string" @@ -7045,6 +6831,10 @@ "description": "鐢ㄦ埛渚ц竟涓婚", "type": "string" }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" + }, "userName": { "description": "鐢ㄦ埛鐧诲綍鍚�", "type": "string" @@ -7060,18 +6850,6 @@ "properties": { "config": { "$ref": "#/definitions/config.Server" - } - } - }, - "test.Industry": { - "type": "object", - "properties": { - "id": { - "description": "涓婚敭ID", - "type": "integer" - }, - "name": { - "type": "string" } } } diff --git a/docs/swagger.json b/docs/swagger.json index 67af432..3e5cb93 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -902,7 +902,7 @@ } ], "consumes": [ - "application/json" + "multipart/form-data" ], "produces": [ "application/json" @@ -910,21 +910,19 @@ "tags": [ "AutoCode" ], - "summary": "鍒涘缓鎻掍欢妯℃澘", + "summary": "瀹夎鎻掍欢", "parameters": [ { - "description": "鍒涘缓鎻掍欢妯℃澘", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/system.SysAutoCode" - } + "type": "file", + "description": "this is a test file", + "name": "plug", + "in": "formData", + "required": true } ], "responses": { "200": { - "description": "鍒涘缓鎻掍欢妯℃澘鎴愬姛", + "description": "瀹夎鎻掍欢鎴愬姛", "schema": { "allOf": [ { @@ -934,8 +932,10 @@ "type": "object", "properties": { "data": { - "type": "object", - "additionalProperties": true + "type": "array", + "items": { + "type": "object" + } }, "msg": { "type": "string" @@ -1369,60 +1369,6 @@ } } }, - "/autoCode/installPlugin": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], - "tags": [ - "AutoCode" - ], - "summary": "瀹夎鎻掍欢", - "parameters": [ - { - "type": "file", - "description": "this is a test file", - "name": "plug", - "in": "formData", - "required": true - } - ], - "responses": { - "200": { - "description": "瀹夎鎻掍欢鎴愬姛", - "schema": { - "allOf": [ - { - "$ref": "#/definitions/response.Response" - }, - { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object" - } - }, - "msg": { - "type": "string" - } - } - } - ] - } - } - } - } - }, "/autoCode/preview": { "post": { "security": [ @@ -1454,60 +1400,6 @@ "responses": { "200": { "description": "棰勮鍒涘缓鍚庣殑浠g爜", - "schema": { - "allOf": [ - { - "$ref": "#/definitions/response.Response" - }, - { - "type": "object", - "properties": { - "data": { - "type": "object", - "additionalProperties": true - }, - "msg": { - "type": "string" - } - } - } - ] - } - } - } - } - }, - "/autoCode/pubPlug": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "AutoCode" - ], - "summary": "鎵撳寘鎻掍欢", - "parameters": [ - { - "description": "鎵撳寘鎻掍欢", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/system.SysAutoCode" - } - } - ], - "responses": { - "200": { - "description": "鎵撳寘鎻掍欢鎴愬姛", "schema": { "allOf": [ { @@ -1791,6 +1683,12 @@ "parameters": [ { "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { + "type": "string", "description": "瀹㈡埛鍚�", "name": "customerName", "in": "query" @@ -1817,6 +1715,12 @@ "type": "integer", "description": "绠$悊ID", "name": "sysUserId", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" } ], @@ -2403,266 +2307,6 @@ } } ] - } - } - } - } - }, - "/i/createIndustry": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Industry" - ], - "summary": "鍒涘缓Industry", - "parameters": [ - { - "description": "鍒涘缓Industry", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/test.Industry" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"鑾峰彇鎴愬姛\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/i/deleteIndustry": { - "delete": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Industry" - ], - "summary": "鍒犻櫎Industry", - "parameters": [ - { - "description": "鍒犻櫎Industry", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/test.Industry" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"鍒犻櫎鎴愬姛\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/i/deleteIndustryByIds": { - "delete": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Industry" - ], - "summary": "鎵归噺鍒犻櫎Industry", - "parameters": [ - { - "description": "鎵归噺鍒犻櫎Industry", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.IdsReq" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"鎵归噺鍒犻櫎鎴愬姛\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/i/findIndustry": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Industry" - ], - "summary": "鐢╥d鏌ヨIndustry", - "parameters": [ - { - "type": "integer", - "description": "涓婚敭ID", - "name": "id", - "in": "query" - }, - { - "type": "string", - "name": "name", - "in": "query" - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"鏌ヨ鎴愬姛\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/i/getIndustryList": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Industry" - ], - "summary": "鍒嗛〉鑾峰彇Industry鍒楄〃", - "parameters": [ - { - "type": "string", - "name": "endCreatedAt", - "in": "query" - }, - { - "type": "integer", - "description": "涓婚敭ID", - "name": "id", - "in": "query" - }, - { - "type": "string", - "description": "鍏抽敭瀛�", - "name": "keyword", - "in": "query" - }, - { - "type": "string", - "name": "name", - "in": "query" - }, - { - "type": "integer", - "description": "椤电爜", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "姣忛〉澶у皬", - "name": "pageSize", - "in": "query" - }, - { - "type": "string", - "name": "startCreatedAt", - "in": "query" - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"鑾峰彇鎴愬姛\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/i/updateIndustry": { - "put": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Industry" - ], - "summary": "鏇存柊Industry", - "parameters": [ - { - "description": "鏇存柊Industry", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/test.Industry" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"鏇存柊鎴愬姛\"}", - "schema": { - "type": "string" } } } @@ -3364,6 +3008,12 @@ "parameters": [ { "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { + "type": "string", "description": "鎻忚堪", "name": "desc", "in": "query" @@ -3390,6 +3040,12 @@ "type": "string", "description": "瀛楀吀鍚嶏紙鑻憋級", "name": "type", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" } ], @@ -3439,6 +3095,12 @@ "parameters": [ { "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { + "type": "string", "description": "鎻忚堪", "name": "desc", "in": "query" @@ -3483,6 +3145,12 @@ "type": "string", "description": "瀛楀吀鍚嶏紙鑻憋級", "name": "type", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" } ], @@ -3680,6 +3348,12 @@ "summary": "鐢╥d鏌ヨSysDictionaryDetail", "parameters": [ { + "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { "type": "integer", "description": "涓婚敭ID", "name": "id", @@ -3707,6 +3381,12 @@ "type": "integer", "description": "鍏宠仈鏍囪", "name": "sysDictionaryID", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" }, { @@ -3761,6 +3441,12 @@ "summary": "鍒嗛〉鑾峰彇SysDictionaryDetail鍒楄〃", "parameters": [ { + "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { "type": "integer", "description": "涓婚敭ID", "name": "id", @@ -3806,6 +3492,12 @@ "type": "integer", "description": "鍏宠仈鏍囪", "name": "sysDictionaryID", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" }, { @@ -4072,6 +3764,12 @@ }, { "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { + "type": "string", "description": "閿欒淇℃伅", "name": "error_message", "in": "query" @@ -4116,6 +3814,12 @@ "type": "integer", "description": "璇锋眰鐘舵��", "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" }, { @@ -4183,6 +3887,12 @@ }, { "type": "string", + "description": "鍒涘缓鏃堕棿", + "name": "createdAt", + "in": "query" + }, + { + "type": "string", "description": "閿欒淇℃伅", "name": "error_message", "in": "query" @@ -4245,6 +3955,12 @@ "type": "integer", "description": "璇锋眰鐘舵��", "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "鏇存柊鏃堕棿", + "name": "updatedAt", "in": "query" }, { @@ -5213,12 +4929,15 @@ "type": "string" }, "path": { + "description": "鏈嶅姟鍣ㄥ湴鍧�:绔彛", "type": "string" }, "port": { + "description": ":绔彛", "type": "string" }, "prefix": { + "description": "鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥", "type": "string" }, "singular": { @@ -5226,7 +4945,7 @@ "type": "boolean" }, "username": { - "description": "鏁版嵁搴撳瘑鐮�", + "description": "鏁版嵁搴撶敤鎴峰悕", "type": "string" } } @@ -5268,12 +4987,15 @@ "type": "string" }, "path": { + "description": "鏈嶅姟鍣ㄥ湴鍧�:绔彛", "type": "string" }, "port": { + "description": ":绔彛", "type": "string" }, "prefix": { + "description": "鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥", "type": "string" }, "singular": { @@ -5281,7 +5003,7 @@ "type": "boolean" }, "username": { - "description": "鏁版嵁搴撳瘑鐮�", + "description": "鏁版嵁搴撶敤鎴峰悕", "type": "string" } } @@ -5323,12 +5045,15 @@ "type": "string" }, "path": { + "description": "鏈嶅姟鍣ㄥ湴鍧�:绔彛", "type": "string" }, "port": { + "description": ":绔彛", "type": "string" }, "prefix": { + "description": "鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥", "type": "string" }, "singular": { @@ -5336,7 +5061,7 @@ "type": "boolean" }, "username": { - "description": "鏁版嵁搴撳瘑鐮�", + "description": "鏁版嵁搴撶敤鎴峰悕", "type": "string" } } @@ -5378,12 +5103,15 @@ "type": "string" }, "path": { + "description": "鏈嶅姟鍣ㄥ湴鍧�:绔彛", "type": "string" }, "port": { + "description": ":绔彛", "type": "string" }, "prefix": { + "description": "鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥", "type": "string" }, "singular": { @@ -5391,7 +5119,65 @@ "type": "boolean" }, "username": { + "description": "鏁版嵁搴撶敤鎴峰悕", + "type": "string" + } + } + }, + "config.Sqlite": { + "type": "object", + "properties": { + "config": { + "description": "楂樼骇閰嶇疆", + "type": "string" + }, + "db-name": { + "description": "鏁版嵁搴撳悕", + "type": "string" + }, + "engine": { + "description": "鏁版嵁搴撳紩鎿庯紝榛樿InnoDB", + "type": "string", + "default": "InnoDB" + }, + "log-mode": { + "description": "鏄惁寮�鍚疓orm鍏ㄥ眬鏃ュ織", + "type": "string" + }, + "log-zap": { + "description": "鏄惁閫氳繃zap鍐欏叆鏃ュ織鏂囦欢", + "type": "boolean" + }, + "max-idle-conns": { + "description": "绌洪棽涓殑鏈�澶ц繛鎺ユ暟", + "type": "integer" + }, + "max-open-conns": { + "description": "鎵撳紑鍒版暟鎹簱鐨勬渶澶ц繛鎺ユ暟", + "type": "integer" + }, + "password": { "description": "鏁版嵁搴撳瘑鐮�", + "type": "string" + }, + "path": { + "description": "鏈嶅姟鍣ㄥ湴鍧�:绔彛", + "type": "string" + }, + "port": { + "description": ":绔彛", + "type": "string" + }, + "prefix": { + "description": "鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥", + "type": "string" + }, + "singular": { + "description": "鏄惁寮�鍚叏灞�绂佺敤澶嶆暟锛宼rue琛ㄧず寮�鍚�", + "type": "boolean" + }, + "username": { + "description": "鏁版嵁搴撶敤鎴峰悕", "type": "string" } } @@ -5517,14 +5303,14 @@ "pgsql": { "$ref": "#/definitions/config.Pgsql" }, + "sqlite": { + "$ref": "#/definitions/config.Sqlite" + }, "qiniu": { "$ref": "#/definitions/config.Qiniu" }, "redis": { "$ref": "#/definitions/config.Redis" - }, - "sqlite": { - "$ref": "#/definitions/config.Sqlite" }, "system": { "$ref": "#/definitions/config.System" @@ -5583,12 +5369,15 @@ "type": "string" }, "path": { + "description": "鏈嶅姟鍣ㄥ湴鍧�:绔彛", "type": "string" }, "port": { + "description": ":绔彛", "type": "string" }, "prefix": { + "description": "鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥", "type": "string" }, "singular": { @@ -5599,62 +5388,7 @@ "type": "string" }, "username": { - "description": "鏁版嵁搴撳瘑鐮�", - "type": "string" - } - } - }, - "config.Sqlite": { - "type": "object", - "properties": { - "config": { - "description": "楂樼骇閰嶇疆", - "type": "string" - }, - "db-name": { - "description": "鏁版嵁搴撳悕", - "type": "string" - }, - "engine": { - "description": "鏁版嵁搴撳紩鎿庯紝榛樿InnoDB", - "type": "string", - "default": "InnoDB" - }, - "log-mode": { - "description": "鏄惁寮�鍚疓orm鍏ㄥ眬鏃ュ織", - "type": "string" - }, - "log-zap": { - "description": "鏄惁閫氳繃zap鍐欏叆鏃ュ織鏂囦欢", - "type": "boolean" - }, - "max-idle-conns": { - "description": "绌洪棽涓殑鏈�澶ц繛鎺ユ暟", - "type": "integer" - }, - "max-open-conns": { - "description": "鎵撳紑鍒版暟鎹簱鐨勬渶澶ц繛鎺ユ暟", - "type": "integer" - }, - "password": { - "description": "鏁版嵁搴撳瘑鐮�", - "type": "string" - }, - "path": { - "type": "string" - }, - "port": { - "type": "string" - }, - "prefix": { - "type": "string" - }, - "singular": { - "description": "鏄惁寮�鍚叏灞�绂佺敤澶嶆暟锛宼rue琛ㄧず寮�鍚�", - "type": "boolean" - }, - "username": { - "description": "鏁版嵁搴撳瘑鐮�", + "description": "鏁版嵁搴撶敤鎴峰悕", "type": "string" } } @@ -5787,6 +5521,10 @@ "example.ExaCustomer": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "customerName": { "description": "瀹㈡埛鍚�", "type": "string" @@ -5814,6 +5552,10 @@ "sysUserId": { "description": "绠$悊ID", "type": "integer" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, @@ -5822,6 +5564,10 @@ "properties": { "chunkTotal": { "type": "integer" + }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" }, "exaFileChunk": { "type": "array", @@ -5844,12 +5590,20 @@ }, "isFinish": { "type": "boolean" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, "example.ExaFileChunk": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "exaFileID": { "type": "integer" }, @@ -5862,12 +5616,20 @@ "id": { "description": "涓婚敭ID", "type": "integer" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, "example.ExaFileUploadAndDownload": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "id": { "description": "涓婚敭ID", "type": "integer" @@ -5884,6 +5646,10 @@ "description": "鏂囦欢鏍囩", "type": "string" }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" + }, "url": { "description": "鏂囦欢鍦板潃", "type": "string" @@ -5894,31 +5660,31 @@ "type": "object", "properties": { "from": { - "description": "鍙戜欢浜� 浣犺嚜宸辫鍙戦偖浠剁殑閭", + "description": "鏀朵欢浜�", "type": "string" }, "host": { - "description": "鏈嶅姟鍣ㄥ湴鍧� 渚嬪 smtp.qq.com 璇峰墠寰�QQ鎴栬�呬綘瑕佸彂閭欢鐨勯偖绠辨煡鐪嬪叾smtp鍗忚", + "description": "鏈嶅姟鍣ㄥ湴鍧�", "type": "string" }, "is-ssl": { - "description": "鏄惁SSL 鏄惁寮�鍚疭SL", + "description": "鏄惁SSL", "type": "boolean" }, "nickname": { - "description": "鏄电О 鍙戜欢浜烘樀绉� 閫氬父涓鸿嚜宸辩殑閭", + "description": "鏄电О", "type": "string" }, "port": { - "description": "绔彛 璇峰墠寰�QQ鎴栬�呬綘瑕佸彂閭欢鐨勯偖绠辨煡鐪嬪叾smtp鍗忚 澶у涓� 465", + "description": "绔彛", "type": "integer" }, "secret": { - "description": "瀵嗛挜 鐢ㄤ簬鐧诲綍鐨勫瘑閽� 鏈�濂戒笉瑕佺敤閭瀵嗙爜 鍘婚偖绠眘mtp鐢宠涓�涓敤浜庣櫥褰曠殑瀵嗛挜", + "description": "瀵嗛挜", "type": "string" }, "to": { - "description": "鏀朵欢浜�:澶氫釜浠ヨ嫳鏂囬�楀彿鍒嗛殧 渚嬶細a@qq.com b@qq.com 姝e紡寮�鍙戜腑璇锋妸姝ら」鐩綔涓哄弬鏁颁娇鐢�", + "description": "鏀朵欢浜�:澶氫釜浠ヨ嫳鏂囬�楀彿鍒嗛殧", "type": "string" } } @@ -6014,15 +5780,12 @@ "request.InitDB": { "type": "object", "required": [ - "dbName" + "dbName", + "userName" ], "properties": { "dbName": { "description": "鏁版嵁搴撳悕", - "type": "string" - }, - "dbPath": { - "description": "sqlite鏁版嵁搴撴枃浠惰矾寰�", "type": "string" }, "dbType": { @@ -6146,6 +5909,10 @@ "description": "api缁�", "type": "string" }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "desc": { "description": "鎺掑簭鏂瑰紡:鍗囧簭false(榛樿)|闄嶅簭true", "type": "boolean" @@ -6180,6 +5947,10 @@ }, "path": { "description": "api璺緞", + "type": "string" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", "type": "string" } } @@ -6605,6 +6376,10 @@ "description": "api缁�", "type": "string" }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "description": { "description": "api涓枃鎻忚堪", "type": "string" @@ -6619,6 +6394,10 @@ }, "path": { "description": "api璺緞", + "type": "string" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", "type": "string" } } @@ -6676,6 +6455,10 @@ "system.SysAutoCode": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "desc": { "type": "string" }, @@ -6687,6 +6470,10 @@ "type": "string" }, "packageName": { + "type": "string" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", "type": "string" } } @@ -6708,6 +6495,10 @@ }, "component": { "description": "瀵瑰簲鍓嶇鏂囦欢璺緞", + "type": "string" + }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", "type": "string" }, "hidden": { @@ -6753,12 +6544,20 @@ "sort": { "description": "鎺掑簭鏍囪", "type": "integer" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, "system.SysBaseMenuBtn": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "desc": { "type": "string" }, @@ -6771,12 +6570,20 @@ }, "sysBaseMenuID": { "type": "integer" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, "system.SysBaseMenuParameter": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "id": { "description": "涓婚敭ID", "type": "integer" @@ -6792,6 +6599,10 @@ "description": "鍦板潃鏍忔惡甯﹀弬鏁颁负params杩樻槸query", "type": "string" }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" + }, "value": { "description": "鍦板潃鏍忔惡甯﹀弬鏁扮殑鍊�", "type": "string" @@ -6801,6 +6612,10 @@ "system.SysDictionary": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "desc": { "description": "鎻忚堪", "type": "string" @@ -6826,12 +6641,20 @@ "type": { "description": "瀛楀吀鍚嶏紙鑻憋級", "type": "string" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, "system.SysDictionaryDetail": { "type": "object", "properties": { + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "id": { "description": "涓婚敭ID", "type": "integer" @@ -6851,6 +6674,10 @@ "sysDictionaryID": { "description": "鍏宠仈鏍囪", "type": "integer" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" }, "value": { "description": "瀛楀吀鍊�", @@ -6881,6 +6708,10 @@ }, "component": { "description": "瀵瑰簲鍓嶇鏂囦欢璺緞", + "type": "string" + }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", "type": "string" }, "hidden": { @@ -6929,6 +6760,10 @@ "sort": { "description": "鎺掑簭鏍囪", "type": "integer" + }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" } } }, @@ -6941,6 +6776,10 @@ }, "body": { "description": "璇锋眰Body", + "type": "string" + }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", "type": "string" }, "error_message": { @@ -6975,6 +6814,10 @@ "description": "璇锋眰鐘舵��", "type": "integer" }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" + }, "user": { "$ref": "#/definitions/system.SysUser" }, @@ -7008,6 +6851,10 @@ "description": "鍩虹棰滆壊", "type": "string" }, + "createdAt": { + "description": "鍒涘缓鏃堕棿", + "type": "string" + }, "email": { "description": "鐢ㄦ埛閭", "type": "string" @@ -7036,6 +6883,10 @@ "description": "鐢ㄦ埛渚ц竟涓婚", "type": "string" }, + "updatedAt": { + "description": "鏇存柊鏃堕棿", + "type": "string" + }, "userName": { "description": "鐢ㄦ埛鐧诲綍鍚�", "type": "string" @@ -7051,18 +6902,6 @@ "properties": { "config": { "$ref": "#/definitions/config.Server" - } - } - }, - "test.Industry": { - "type": "object", - "properties": { - "id": { - "description": "涓婚敭ID", - "type": "integer" - }, - "name": { - "type": "string" } } } diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 4fda951..4f1a697 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -188,16 +188,19 @@ description: 鏁版嵁搴撳瘑鐮� type: string path: + description: 鏈嶅姟鍣ㄥ湴鍧�:绔彛 type: string port: + description: :绔彛 type: string prefix: + description: 鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥 type: string singular: description: 鏄惁寮�鍚叏灞�绂佺敤澶嶆暟锛宼rue琛ㄧず寮�鍚� type: boolean username: - description: 鏁版嵁搴撳瘑鐮� + description: 鏁版嵁搴撶敤鎴峰悕 type: string type: object config.Mysql: @@ -228,16 +231,19 @@ description: 鏁版嵁搴撳瘑鐮� type: string path: + description: 鏈嶅姟鍣ㄥ湴鍧�:绔彛 type: string port: + description: :绔彛 type: string prefix: + description: 鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥 type: string singular: description: 鏄惁寮�鍚叏灞�绂佺敤澶嶆暟锛宼rue琛ㄧず寮�鍚� type: boolean username: - description: 鏁版嵁搴撳瘑鐮� + description: 鏁版嵁搴撶敤鎴峰悕 type: string type: object config.Oracle: @@ -268,16 +274,19 @@ description: 鏁版嵁搴撳瘑鐮� type: string path: + description: 鏈嶅姟鍣ㄥ湴鍧�:绔彛 type: string port: + description: :绔彛 type: string prefix: + description: 鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥 type: string singular: description: 鏄惁寮�鍚叏灞�绂佺敤澶嶆暟锛宼rue琛ㄧず寮�鍚� type: boolean username: - description: 鏁版嵁搴撳瘑鐮� + description: 鏁版嵁搴撶敤鎴峰悕 type: string type: object config.Pgsql: @@ -308,16 +317,19 @@ description: 鏁版嵁搴撳瘑鐮� type: string path: + description: 鏈嶅姟鍣ㄥ湴鍧�:绔彛 type: string port: + description: :绔彛 type: string prefix: + description: 鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥 type: string singular: description: 鏄惁寮�鍚叏灞�绂佺敤澶嶆暟锛宼rue琛ㄧず寮�鍚� type: boolean username: - description: 鏁版嵁搴撳瘑鐮� + description: 鏁版嵁搴撶敤鎴峰悕 type: string type: object config.Qiniu: @@ -402,8 +414,6 @@ $ref: '#/definitions/config.Qiniu' redis: $ref: '#/definitions/config.Redis' - sqlite: - $ref: '#/definitions/config.Sqlite' system: $ref: '#/definitions/config.System' tencent-cos: @@ -445,10 +455,13 @@ description: 鏁版嵁搴撳瘑鐮� type: string path: + description: 鏈嶅姟鍣ㄥ湴鍧�:绔彛 type: string port: + description: :绔彛 type: string prefix: + description: 鍏ㄥ眬琛ㄥ墠缂�锛屽崟鐙畾涔塗ableName鍒欎笉鐢熸晥 type: string singular: description: 鏄惁寮�鍚叏灞�绂佺敤澶嶆暟锛宼rue琛ㄧず寮�鍚� @@ -456,47 +469,7 @@ type: type: string username: - description: 鏁版嵁搴撳瘑鐮� - type: string - type: object - config.Sqlite: - properties: - config: - description: 楂樼骇閰嶇疆 - type: string - db-name: - description: 鏁版嵁搴撳悕 - type: string - engine: - default: InnoDB - description: 鏁版嵁搴撳紩鎿庯紝榛樿InnoDB - type: string - log-mode: - description: 鏄惁寮�鍚疓orm鍏ㄥ眬鏃ュ織 - type: string - log-zap: - description: 鏄惁閫氳繃zap鍐欏叆鏃ュ織鏂囦欢 - type: boolean - max-idle-conns: - description: 绌洪棽涓殑鏈�澶ц繛鎺ユ暟 - type: integer - max-open-conns: - description: 鎵撳紑鍒版暟鎹簱鐨勬渶澶ц繛鎺ユ暟 - type: integer - password: - description: 鏁版嵁搴撳瘑鐮� - type: string - path: - type: string - port: - type: string - prefix: - type: string - singular: - description: 鏄惁寮�鍚叏灞�绂佺敤澶嶆暟锛宼rue琛ㄧず寮�鍚� - type: boolean - username: - description: 鏁版嵁搴撳瘑鐮� + description: 鏁版嵁搴撶敤鎴峰悕 type: string type: object config.System: @@ -589,6 +562,9 @@ type: object example.ExaCustomer: properties: + createdAt: + description: 鍒涘缓鏃堕棿 + type: string customerName: description: 瀹㈡埛鍚� type: string @@ -608,11 +584,17 @@ sysUserId: description: 绠$悊ID type: integer + updatedAt: + description: 鏇存柊鏃堕棿 + type: string type: object example.ExaFile: properties: chunkTotal: type: integer + createdAt: + description: 鍒涘缓鏃堕棿 + type: string exaFileChunk: items: $ref: '#/definitions/example.ExaFileChunk' @@ -628,9 +610,15 @@ type: integer isFinish: type: boolean + updatedAt: + description: 鏇存柊鏃堕棿 + type: string type: object example.ExaFileChunk: properties: + createdAt: + description: 鍒涘缓鏃堕棿 + type: string exaFileID: type: integer fileChunkNumber: @@ -640,9 +628,15 @@ id: description: 涓婚敭ID type: integer + updatedAt: + description: 鏇存柊鏃堕棿 + type: string type: object example.ExaFileUploadAndDownload: properties: + createdAt: + description: 鍒涘缓鏃堕棿 + type: string id: description: 涓婚敭ID type: integer @@ -655,6 +649,9 @@ tag: description: 鏂囦欢鏍囩 type: string + updatedAt: + description: 鏇存柊鏃堕棿 + type: string url: description: 鏂囦欢鍦板潃 type: string @@ -662,25 +659,25 @@ github_com_flipped-aurora_gin-vue-admin_server_config.Email: properties: from: - description: 鍙戜欢浜� 浣犺嚜宸辫鍙戦偖浠剁殑閭 + description: 鏀朵欢浜� type: string host: - description: 鏈嶅姟鍣ㄥ湴鍧� 渚嬪 smtp.qq.com 璇峰墠寰�QQ鎴栬�呬綘瑕佸彂閭欢鐨勯偖绠辨煡鐪嬪叾smtp鍗忚 + description: 鏈嶅姟鍣ㄥ湴鍧� type: string is-ssl: - description: 鏄惁SSL 鏄惁寮�鍚疭SL + description: 鏄惁SSL type: boolean nickname: - description: 鏄电О 鍙戜欢浜烘樀绉� 閫氬父涓鸿嚜宸辩殑閭 + description: 鏄电О type: string port: - description: 绔彛 璇峰墠寰�QQ鎴栬�呬綘瑕佸彂閭欢鐨勯偖绠辨煡鐪嬪叾smtp鍗忚 澶у涓� 465 + description: 绔彛 type: integer secret: - description: 瀵嗛挜 鐢ㄤ簬鐧诲綍鐨勫瘑閽� 鏈�濂戒笉瑕佺敤閭瀵嗙爜 鍘婚偖绠眘mtp鐢宠涓�涓敤浜庣櫥褰曠殑瀵嗛挜 + description: 瀵嗛挜 type: string to: - description: 鏀朵欢浜�:澶氫釜浠ヨ嫳鏂囬�楀彿鍒嗛殧 渚嬶細a@qq.com b@qq.com 姝e紡寮�鍙戜腑璇锋妸姝ら」鐩綔涓哄弬鏁颁娇鐢� + description: 鏀朵欢浜�:澶氫釜浠ヨ嫳鏂囬�楀彿鍒嗛殧 type: string type: object request.AddMenuAuthorityInfo: @@ -747,9 +744,6 @@ dbName: description: 鏁版嵁搴撳悕 type: string - dbPath: - description: sqlite鏁版嵁搴撴枃浠惰矾寰� - type: string dbType: description: 鏁版嵁搴撶被鍨� type: string @@ -767,6 +761,7 @@ type: string required: - dbName + - userName type: object request.Login: properties: @@ -839,6 +834,9 @@ apiGroup: description: api缁� type: string + createdAt: + description: 鍒涘缓鏃堕棿 + type: string desc: description: 鎺掑簭鏂瑰紡:鍗囧簭false(榛樿)|闄嶅簭true type: boolean @@ -865,6 +863,9 @@ type: integer path: description: api璺緞 + type: string + updatedAt: + description: 鏇存柊鏃堕棿 type: string type: object request.SetUserAuth: @@ -1152,6 +1153,9 @@ apiGroup: description: api缁� type: string + createdAt: + description: 鍒涘缓鏃堕棿 + type: string description: description: api涓枃鎻忚堪 type: string @@ -1163,6 +1167,9 @@ type: string path: description: api璺緞 + type: string + updatedAt: + description: 鏇存柊鏃堕棿 type: string type: object system.SysAuthority: @@ -1202,6 +1209,9 @@ type: object system.SysAutoCode: properties: + createdAt: + description: 鍒涘缓鏃堕棿 + type: string desc: type: string id: @@ -1210,6 +1220,9 @@ label: type: string packageName: + type: string + updatedAt: + description: 鏇存柊鏃堕棿 type: string type: object system.SysBaseMenu: @@ -1224,6 +1237,9 @@ type: array component: description: 瀵瑰簲鍓嶇鏂囦欢璺緞 + type: string + createdAt: + description: 鍒涘缓鏃堕棿 type: string hidden: description: 鏄惁鍦ㄥ垪琛ㄩ殣钘� @@ -1255,9 +1271,15 @@ sort: description: 鎺掑簭鏍囪 type: integer + updatedAt: + description: 鏇存柊鏃堕棿 + type: string type: object system.SysBaseMenuBtn: properties: + createdAt: + description: 鍒涘缓鏃堕棿 + type: string desc: type: string id: @@ -1267,9 +1289,15 @@ type: string sysBaseMenuID: type: integer + updatedAt: + description: 鏇存柊鏃堕棿 + type: string type: object system.SysBaseMenuParameter: properties: + createdAt: + description: 鍒涘缓鏃堕棿 + type: string id: description: 涓婚敭ID type: integer @@ -1281,12 +1309,18 @@ type: description: 鍦板潃鏍忔惡甯﹀弬鏁颁负params杩樻槸query type: string + updatedAt: + description: 鏇存柊鏃堕棿 + type: string value: description: 鍦板潃鏍忔惡甯﹀弬鏁扮殑鍊� type: string type: object system.SysDictionary: properties: + createdAt: + description: 鍒涘缓鏃堕棿 + type: string desc: description: 鎻忚堪 type: string @@ -1306,9 +1340,15 @@ type: description: 瀛楀吀鍚嶏紙鑻憋級 type: string + updatedAt: + description: 鏇存柊鏃堕棿 + type: string type: object system.SysDictionaryDetail: properties: + createdAt: + description: 鍒涘缓鏃堕棿 + type: string id: description: 涓婚敭ID type: integer @@ -1324,6 +1364,9 @@ sysDictionaryID: description: 鍏宠仈鏍囪 type: integer + updatedAt: + description: 鏇存柊鏃堕棿 + type: string value: description: 瀛楀吀鍊� type: integer @@ -1344,6 +1387,9 @@ type: array component: description: 瀵瑰簲鍓嶇鏂囦欢璺緞 + type: string + createdAt: + description: 鍒涘缓鏃堕棿 type: string hidden: description: 鏄惁鍦ㄥ垪琛ㄩ殣钘� @@ -1377,6 +1423,9 @@ sort: description: 鎺掑簭鏍囪 type: integer + updatedAt: + description: 鏇存柊鏃堕棿 + type: string type: object system.SysOperationRecord: properties: @@ -1385,6 +1434,9 @@ type: string body: description: 璇锋眰Body + type: string + createdAt: + description: 鍒涘缓鏃堕棿 type: string error_message: description: 閿欒淇℃伅 @@ -1410,6 +1462,9 @@ status: description: 璇锋眰鐘舵�� type: integer + updatedAt: + description: 鏇存柊鏃堕棿 + type: string user: $ref: '#/definitions/system.SysUser' user_id: @@ -1433,6 +1488,9 @@ baseColor: description: 鍩虹棰滆壊 type: string + createdAt: + description: 鍒涘缓鏃堕棿 + type: string email: description: 鐢ㄦ埛閭 type: string @@ -1454,6 +1512,9 @@ sideMode: description: 鐢ㄦ埛渚ц竟涓婚 type: string + updatedAt: + description: 鏇存柊鏃堕棿 + type: string userName: description: 鐢ㄦ埛鐧诲綍鍚� type: string @@ -1465,14 +1526,6 @@ properties: config: $ref: '#/definitions/config.Server' - type: object - test.Industry: - properties: - id: - description: 涓婚敭ID - type: integer - name: - type: string type: object info: contact: {} @@ -1981,32 +2034,32 @@ /autoCode/createPlug: post: consumes: - - application/json + - multipart/form-data parameters: - - description: 鍒涘缓鎻掍欢妯℃澘 - in: body - name: data + - description: this is a test file + in: formData + name: plug required: true - schema: - $ref: '#/definitions/system.SysAutoCode' + type: file produces: - application/json responses: "200": - description: 鍒涘缓鎻掍欢妯℃澘鎴愬姛 + description: 瀹夎鎻掍欢鎴愬姛 schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: - additionalProperties: true - type: object + items: + type: object + type: array msg: type: string type: object security: - ApiKeyAuth: [] - summary: 鍒涘缓鎻掍欢妯℃澘 + summary: 瀹夎鎻掍欢 tags: - AutoCode /autoCode/createTemp: @@ -2248,37 +2301,6 @@ summary: 鑾峰彇褰撳墠鏁版嵁搴撴墍鏈夎〃 tags: - AutoCode - /autoCode/installPlugin: - post: - consumes: - - multipart/form-data - parameters: - - description: this is a test file - in: formData - name: plug - required: true - type: file - produces: - - application/json - responses: - "200": - description: 瀹夎鎻掍欢鎴愬姛 - schema: - allOf: - - $ref: '#/definitions/response.Response' - - properties: - data: - items: - type: object - type: array - msg: - type: string - type: object - security: - - ApiKeyAuth: [] - summary: 瀹夎鎻掍欢 - tags: - - AutoCode /autoCode/preview: post: consumes: @@ -2308,37 +2330,6 @@ security: - ApiKeyAuth: [] summary: 棰勮鍒涘缓鍚庣殑浠g爜 - tags: - - AutoCode - /autoCode/pubPlug: - get: - consumes: - - application/json - parameters: - - description: 鎵撳寘鎻掍欢 - in: body - name: data - required: true - schema: - $ref: '#/definitions/system.SysAutoCode' - produces: - - application/json - responses: - "200": - description: 鎵撳寘鎻掍欢鎴愬姛 - schema: - allOf: - - $ref: '#/definitions/response.Response' - - properties: - data: - additionalProperties: true - type: object - msg: - type: string - type: object - security: - - ApiKeyAuth: [] - summary: 鎵撳寘鎻掍欢 tags: - AutoCode /autoCode/rollback: @@ -2508,6 +2499,10 @@ consumes: - application/json parameters: + - description: 鍒涘缓鏃堕棿 + in: query + name: createdAt + type: string - description: 瀹㈡埛鍚� in: query name: customerName @@ -2528,6 +2523,10 @@ in: query name: sysUserId type: integer + - description: 鏇存柊鏃堕棿 + in: query + name: updatedAt + type: string produces: - application/json responses: @@ -2840,164 +2839,6 @@ summary: 涓婁紶鏂囦欢绀轰緥 tags: - ExaFileUploadAndDownload - /i/createIndustry: - post: - consumes: - - application/json - parameters: - - description: 鍒涘缓Industry - in: body - name: data - required: true - schema: - $ref: '#/definitions/test.Industry' - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"鑾峰彇鎴愬姛"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 鍒涘缓Industry - tags: - - Industry - /i/deleteIndustry: - delete: - consumes: - - application/json - parameters: - - description: 鍒犻櫎Industry - in: body - name: data - required: true - schema: - $ref: '#/definitions/test.Industry' - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"鍒犻櫎鎴愬姛"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 鍒犻櫎Industry - tags: - - Industry - /i/deleteIndustryByIds: - delete: - consumes: - - application/json - parameters: - - description: 鎵归噺鍒犻櫎Industry - 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: 鎵归噺鍒犻櫎Industry - tags: - - Industry - /i/findIndustry: - get: - consumes: - - application/json - parameters: - - description: 涓婚敭ID - in: query - name: id - type: integer - - in: query - name: name - type: string - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"鏌ヨ鎴愬姛"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 鐢╥d鏌ヨIndustry - tags: - - Industry - /i/getIndustryList: - get: - consumes: - - application/json - parameters: - - in: query - name: endCreatedAt - type: string - - description: 涓婚敭ID - in: query - name: id - type: integer - - description: 鍏抽敭瀛� - in: query - name: keyword - type: string - - in: query - name: name - type: string - - description: 椤电爜 - in: query - name: page - type: integer - - description: 姣忛〉澶у皬 - in: query - name: pageSize - type: integer - - in: query - name: startCreatedAt - type: string - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"鑾峰彇鎴愬姛"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 鍒嗛〉鑾峰彇Industry鍒楄〃 - tags: - - Industry - /i/updateIndustry: - put: - consumes: - - application/json - parameters: - - description: 鏇存柊Industry - in: body - name: data - required: true - schema: - $ref: '#/definitions/test.Industry' - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"鏇存柊鎴愬姛"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 鏇存柊Industry - tags: - - Industry /init/checkdb: post: produces: @@ -3383,6 +3224,10 @@ consumes: - application/json parameters: + - description: 鍒涘缓鏃堕棿 + in: query + name: createdAt + type: string - description: 鎻忚堪 in: query name: desc @@ -3402,6 +3247,10 @@ - description: 瀛楀吀鍚嶏紙鑻憋級 in: query name: type + type: string + - description: 鏇存柊鏃堕棿 + in: query + name: updatedAt type: string produces: - application/json @@ -3428,6 +3277,10 @@ consumes: - application/json parameters: + - description: 鍒涘缓鏃堕棿 + in: query + name: createdAt + type: string - description: 鎻忚堪 in: query name: desc @@ -3459,6 +3312,10 @@ - description: 瀛楀吀鍚嶏紙鑻憋級 in: query name: type + type: string + - description: 鏇存柊鏃堕棿 + in: query + name: updatedAt type: string produces: - application/json @@ -3568,6 +3425,10 @@ consumes: - application/json parameters: + - description: 鍒涘缓鏃堕棿 + in: query + name: createdAt + type: string - description: 涓婚敭ID in: query name: id @@ -3588,6 +3449,10 @@ in: query name: sysDictionaryID type: integer + - description: 鏇存柊鏃堕棿 + in: query + name: updatedAt + type: string - description: 瀛楀吀鍊� in: query name: value @@ -3617,6 +3482,10 @@ consumes: - application/json parameters: + - description: 鍒涘缓鏃堕棿 + in: query + name: createdAt + type: string - description: 涓婚敭ID in: query name: id @@ -3649,6 +3518,10 @@ in: query name: sysDictionaryID type: integer + - description: 鏇存柊鏃堕棿 + in: query + name: updatedAt + type: string - description: 瀛楀吀鍊� in: query name: value @@ -3797,6 +3670,10 @@ in: query name: body type: string + - description: 鍒涘缓鏃堕棿 + in: query + name: createdAt + type: string - description: 閿欒淇℃伅 in: query name: error_message @@ -3829,6 +3706,10 @@ in: query name: status type: integer + - description: 鏇存柊鏃堕棿 + in: query + name: updatedAt + type: string - description: 鐢ㄦ埛id in: query name: user_id @@ -3865,6 +3746,10 @@ - description: 璇锋眰Body in: query name: body + type: string + - description: 鍒涘缓鏃堕棿 + in: query + name: createdAt type: string - description: 閿欒淇℃伅 in: query @@ -3910,6 +3795,10 @@ in: query name: status type: integer + - description: 鏇存柊鏃堕棿 + in: query + name: updatedAt + type: string - description: 鐢ㄦ埛id in: query name: user_id diff --git a/initialize/router.go b/initialize/router.go index 30c761b..d857ef7 100644 --- a/initialize/router.go +++ b/initialize/router.go @@ -74,6 +74,7 @@ { testRouter := router.RouterGroupApp.Test testRouter.InitIndustryRouter(PrivateGroup) + testRouter.InitSupplierTypeRouter(PrivateGroup) } global.GVA_LOG.Info("router register success") diff --git a/model/test/request/supplier_type.go b/model/test/request/supplier_type.go new file mode 100644 index 0000000..78ac862 --- /dev/null +++ b/model/test/request/supplier_type.go @@ -0,0 +1,14 @@ +package request + +import ( + "github.com/flipped-aurora/gin-vue-admin/server/model/common/request" + "github.com/flipped-aurora/gin-vue-admin/server/model/test" + "time" +) + +type SupplierTypeSearch struct { + test.SupplierType + StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"` + EndCreatedAt *time.Time `json:"endCreatedAt" form:"endCreatedAt"` + request.PageInfo +} diff --git a/model/test/supplier_type.go b/model/test/supplier_type.go new file mode 100644 index 0000000..d2fa09d --- /dev/null +++ b/model/test/supplier_type.go @@ -0,0 +1,17 @@ +// 鑷姩鐢熸垚妯℃澘SupplierType +package test + +import ( + "github.com/flipped-aurora/gin-vue-admin/server/global" +) + +// SupplierType 缁撴瀯浣� +type SupplierType struct { + global.GVA_MODEL + Name string `json:"name" form:"name" gorm:"column:name;comment:;size:255;"` +} + +// TableName SupplierType 琛ㄥ悕 +func (SupplierType) TableName() string { + return "supplier_type" +} diff --git a/router/test/enter.go b/router/test/enter.go index b1aff73..5edfdcb 100644 --- a/router/test/enter.go +++ b/router/test/enter.go @@ -1,5 +1,6 @@ package test type RouterGroup struct { + SupplierTypeRouter IndustryRouter } diff --git a/router/test/supplier_type.go b/router/test/supplier_type.go new file mode 100644 index 0000000..7310ba6 --- /dev/null +++ b/router/test/supplier_type.go @@ -0,0 +1,27 @@ +package test + +import ( + "github.com/flipped-aurora/gin-vue-admin/server/api/v1" + "github.com/flipped-aurora/gin-vue-admin/server/middleware" + "github.com/gin-gonic/gin" +) + +type SupplierTypeRouter struct { +} + +// InitSupplierTypeRouter 鍒濆鍖� SupplierType 璺敱淇℃伅 +func (s *SupplierTypeRouter) InitSupplierTypeRouter(Router *gin.RouterGroup) { + stRouter := Router.Group("st").Use(middleware.OperationRecord()) + stRouterWithoutRecord := Router.Group("st") + var stApi = v1.ApiGroupApp.TestApiGroup.SupplierTypeApi + { + stRouter.POST("createSupplierType", stApi.CreateSupplierType) // 鏂板缓SupplierType + stRouter.DELETE("deleteSupplierType", stApi.DeleteSupplierType) // 鍒犻櫎SupplierType + stRouter.DELETE("deleteSupplierTypeByIds", stApi.DeleteSupplierTypeByIds) // 鎵归噺鍒犻櫎SupplierType + stRouter.PUT("updateSupplierType", stApi.UpdateSupplierType) // 鏇存柊SupplierType + } + { + stRouterWithoutRecord.GET("findSupplierType", stApi.FindSupplierType) // 鏍规嵁ID鑾峰彇SupplierType + stRouterWithoutRecord.GET("getSupplierTypeList", stApi.GetSupplierTypeList) // 鑾峰彇SupplierType鍒楄〃 + } +} diff --git a/service/test/enter.go b/service/test/enter.go index 4f7c036..2dce8bc 100644 --- a/service/test/enter.go +++ b/service/test/enter.go @@ -1,5 +1,6 @@ package test type ServiceGroup struct { + SupplierTypeService IndustryService } diff --git a/service/test/supplier_type.go b/service/test/supplier_type.go new file mode 100644 index 0000000..296c631 --- /dev/null +++ b/service/test/supplier_type.go @@ -0,0 +1,67 @@ +package test + +import ( + "github.com/flipped-aurora/gin-vue-admin/server/global" + "github.com/flipped-aurora/gin-vue-admin/server/model/common/request" + "github.com/flipped-aurora/gin-vue-admin/server/model/test" + testReq "github.com/flipped-aurora/gin-vue-admin/server/model/test/request" +) + +type SupplierTypeService struct { +} + +// CreateSupplierType 鍒涘缓SupplierType璁板綍 +// Author [piexlmax](https://github.com/piexlmax) +func (stService *SupplierTypeService) CreateSupplierType(st *test.SupplierType) (err error) { + err = global.GVA_DB.Create(st).Error + return err +} + +// DeleteSupplierType 鍒犻櫎SupplierType璁板綍 +// Author [piexlmax](https://github.com/piexlmax) +func (stService *SupplierTypeService) DeleteSupplierType(st test.SupplierType) (err error) { + err = global.GVA_DB.Delete(&st).Error + return err +} + +// DeleteSupplierTypeByIds 鎵归噺鍒犻櫎SupplierType璁板綍 +// Author [piexlmax](https://github.com/piexlmax) +func (stService *SupplierTypeService) DeleteSupplierTypeByIds(ids request.IdsReq) (err error) { + err = global.GVA_DB.Delete(&[]test.SupplierType{}, "id in ?", ids.Ids).Error + return err +} + +// UpdateSupplierType 鏇存柊SupplierType璁板綍 +// Author [piexlmax](https://github.com/piexlmax) +func (stService *SupplierTypeService) UpdateSupplierType(st test.SupplierType) (err error) { + err = global.GVA_DB.Save(&st).Error + return err +} + +// GetSupplierType 鏍规嵁id鑾峰彇SupplierType璁板綍 +// Author [piexlmax](https://github.com/piexlmax) +func (stService *SupplierTypeService) GetSupplierType(id uint) (st test.SupplierType, err error) { + err = global.GVA_DB.Where("id = ?", id).First(&st).Error + return +} + +// GetSupplierTypeInfoList 鍒嗛〉鑾峰彇SupplierType璁板綍 +// Author [piexlmax](https://github.com/piexlmax) +func (stService *SupplierTypeService) GetSupplierTypeInfoList(info testReq.SupplierTypeSearch) (list []test.SupplierType, total int64, err error) { + limit := info.PageSize + offset := info.PageSize * (info.Page - 1) + // 鍒涘缓db + db := global.GVA_DB.Model(&test.SupplierType{}) + var sts []test.SupplierType + // 濡傛灉鏈夋潯浠舵悳绱� 涓嬫柟浼氳嚜鍔ㄥ垱寤烘悳绱㈣鍙� + if info.StartCreatedAt != nil && info.EndCreatedAt != nil { + db = db.Where("created_at BETWEEN ? AND ?", info.StartCreatedAt, info.EndCreatedAt) + } + err = db.Count(&total).Error + if err != nil { + return + } + + err = db.Limit(limit).Offset(offset).Find(&sts).Error + return sts, total, err +} -- Gitblit v1.8.0