| | |
| | | package test |
| | | |
| | | type ApiGroup struct { |
| | | SupplierTypeApi |
| | | IndustryApi |
| | | } |
| New file |
| | |
| | | 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 用id查询SupplierType |
| | | // @Tags SupplierType |
| | | // @Summary 用id查询SupplierType |
| | | // @Security ApiKeyAuth |
| | | // @accept application/json |
| | | // @Produce application/json |
| | | // @Param data query test.SupplierType true "用id查询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) |
| | | } |
| | | } |
| | |
| | | } |
| | | ], |
| | | "consumes": [ |
| | | "application/json" |
| | | "multipart/form-data" |
| | | ], |
| | | "produces": [ |
| | | "application/json" |
| | |
| | | "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": [ |
| | | { |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "object", |
| | | "additionalProperties": true |
| | | "type": "array", |
| | | "items": { |
| | | "type": "object" |
| | | } |
| | | }, |
| | | "msg": { |
| | | "type": "string" |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/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": [ |
| | |
| | | "responses": { |
| | | "200": { |
| | | "description": "预览创建后的代码", |
| | | "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": [ |
| | | { |
| | |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "客户名", |
| | | "name": "customerName", |
| | | "in": "query" |
| | |
| | | "type": "integer", |
| | | "description": "管理ID", |
| | | "name": "sysUserId", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | } |
| | | ], |
| | |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/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": "用id查询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" |
| | | } |
| | | } |
| | | } |
| | |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "描述", |
| | | "name": "desc", |
| | | "in": "query" |
| | |
| | | "type": "string", |
| | | "description": "字典名(英)", |
| | | "name": "type", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | } |
| | | ], |
| | |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "描述", |
| | | "name": "desc", |
| | | "in": "query" |
| | |
| | | "type": "string", |
| | | "description": "字典名(英)", |
| | | "name": "type", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | } |
| | | ], |
| | |
| | | "summary": "用id查询SysDictionaryDetail", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "主键ID", |
| | | "name": "id", |
| | |
| | | "type": "integer", |
| | | "description": "关联标记", |
| | | "name": "sysDictionaryID", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | |
| | | "summary": "分页获取SysDictionaryDetail列表", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "主键ID", |
| | | "name": "id", |
| | |
| | | "type": "integer", |
| | | "description": "关联标记", |
| | | "name": "sysDictionaryID", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "错误信息", |
| | | "name": "error_message", |
| | | "in": "query" |
| | |
| | | "type": "integer", |
| | | "description": "请求状态", |
| | | "name": "status", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "错误信息", |
| | | "name": "error_message", |
| | | "in": "query" |
| | |
| | | "type": "integer", |
| | | "description": "请求状态", |
| | | "name": "status", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | |
| | | "type": "string" |
| | | }, |
| | | "path": { |
| | | "description": "服务器地址:端口", |
| | | "type": "string" |
| | | }, |
| | | "port": { |
| | | "description": ":端口", |
| | | "type": "string" |
| | | }, |
| | | "prefix": { |
| | | "description": "全局表前缀,单独定义TableName则不生效", |
| | | "type": "string" |
| | | }, |
| | | "singular": { |
| | |
| | | "type": "boolean" |
| | | }, |
| | | "username": { |
| | | "description": "数据库密码", |
| | | "description": "数据库用户名", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "type": "string" |
| | | }, |
| | | "path": { |
| | | "description": "服务器地址:端口", |
| | | "type": "string" |
| | | }, |
| | | "port": { |
| | | "description": ":端口", |
| | | "type": "string" |
| | | }, |
| | | "prefix": { |
| | | "description": "全局表前缀,单独定义TableName则不生效", |
| | | "type": "string" |
| | | }, |
| | | "singular": { |
| | |
| | | "type": "boolean" |
| | | }, |
| | | "username": { |
| | | "description": "数据库密码", |
| | | "description": "数据库用户名", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "type": "string" |
| | | }, |
| | | "path": { |
| | | "description": "服务器地址:端口", |
| | | "type": "string" |
| | | }, |
| | | "port": { |
| | | "description": ":端口", |
| | | "type": "string" |
| | | }, |
| | | "prefix": { |
| | | "description": "全局表前缀,单独定义TableName则不生效", |
| | | "type": "string" |
| | | }, |
| | | "singular": { |
| | |
| | | "type": "boolean" |
| | | }, |
| | | "username": { |
| | | "description": "数据库密码", |
| | | "description": "数据库用户名", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "type": "string" |
| | | }, |
| | | "path": { |
| | | "description": "服务器地址:端口", |
| | | "type": "string" |
| | | }, |
| | | "port": { |
| | | "description": ":端口", |
| | | "type": "string" |
| | | }, |
| | | "prefix": { |
| | | "description": "全局表前缀,单独定义TableName则不生效", |
| | | "type": "string" |
| | | }, |
| | | "singular": { |
| | |
| | | "type": "boolean" |
| | | }, |
| | | "username": { |
| | | "description": "数据库密码", |
| | | "description": "数据库用户名", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "redis": { |
| | | "$ref": "#/definitions/config.Redis" |
| | | }, |
| | | "sqlite": { |
| | | "$ref": "#/definitions/config.Sqlite" |
| | | }, |
| | | "system": { |
| | | "$ref": "#/definitions/config.System" |
| | | }, |
| | |
| | | "type": "string" |
| | | }, |
| | | "path": { |
| | | "description": "服务器地址:端口", |
| | | "type": "string" |
| | | }, |
| | | "port": { |
| | | "description": ":端口", |
| | | "type": "string" |
| | | }, |
| | | "prefix": { |
| | | "description": "全局表前缀,单独定义TableName则不生效", |
| | | "type": "string" |
| | | }, |
| | | "singular": { |
| | |
| | | "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": "是否开启Gorm全局日志", |
| | | "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": "是否开启全局禁用复数,true表示开启", |
| | | "type": "boolean" |
| | | }, |
| | | "username": { |
| | | "description": "数据库密码", |
| | | "description": "数据库用户名", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "example.ExaCustomer": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "customerName": { |
| | | "description": "客户名", |
| | | "type": "string" |
| | |
| | | "sysUserId": { |
| | | "description": "管理ID", |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "properties": { |
| | | "chunkTotal": { |
| | | "type": "integer" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "exaFileChunk": { |
| | | "type": "array", |
| | |
| | | }, |
| | | "isFinish": { |
| | | "type": "boolean" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "example.ExaFileChunk": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "exaFileID": { |
| | | "type": "integer" |
| | | }, |
| | |
| | | "id": { |
| | | "description": "主键ID", |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "example.ExaFileUploadAndDownload": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "id": { |
| | | "description": "主键ID", |
| | | "type": "integer" |
| | |
| | | "description": "文件标签", |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | }, |
| | | "url": { |
| | | "description": "文件地址", |
| | | "type": "string" |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "from": { |
| | | "description": "发件人 你自己要发邮件的邮箱", |
| | | "description": "收件人", |
| | | "type": "string" |
| | | }, |
| | | "host": { |
| | | "description": "服务器地址 例如 smtp.qq.com 请前往QQ或者你要发邮件的邮箱查看其smtp协议", |
| | | "description": "服务器地址", |
| | | "type": "string" |
| | | }, |
| | | "is-ssl": { |
| | | "description": "是否SSL 是否开启SSL", |
| | | "description": "是否SSL", |
| | | "type": "boolean" |
| | | }, |
| | | "nickname": { |
| | | "description": "昵称 发件人昵称 通常为自己的邮箱", |
| | | "description": "昵称", |
| | | "type": "string" |
| | | }, |
| | | "port": { |
| | | "description": "端口 请前往QQ或者你要发邮件的邮箱查看其smtp协议 大多为 465", |
| | | "description": "端口", |
| | | "type": "integer" |
| | | }, |
| | | "secret": { |
| | | "description": "密钥 用于登录的密钥 最好不要用邮箱密码 去邮箱smtp申请一个用于登录的密钥", |
| | | "description": "密钥", |
| | | "type": "string" |
| | | }, |
| | | "to": { |
| | | "description": "收件人:多个以英文逗号分隔 例:a@qq.com b@qq.com 正式开发中请把此项目作为参数使用", |
| | | "description": "收件人:多个以英文逗号分隔", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "request.InitDB": { |
| | | "type": "object", |
| | | "required": [ |
| | | "dbName" |
| | | "dbName", |
| | | "userName" |
| | | ], |
| | | "properties": { |
| | | "dbName": { |
| | | "description": "数据库名", |
| | | "type": "string" |
| | | }, |
| | | "dbPath": { |
| | | "description": "sqlite数据库文件路径", |
| | | "type": "string" |
| | | }, |
| | | "dbType": { |
| | |
| | | "description": "api组", |
| | | "type": "string" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "desc": { |
| | | "description": "排序方式:升序false(默认)|降序true", |
| | | "type": "boolean" |
| | |
| | | }, |
| | | "path": { |
| | | "description": "api路径", |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "description": "api组", |
| | | "type": "string" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "description": { |
| | | "description": "api中文描述", |
| | | "type": "string" |
| | |
| | | }, |
| | | "path": { |
| | | "description": "api路径", |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "system.SysAutoCode": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "desc": { |
| | | "type": "string" |
| | | }, |
| | |
| | | "type": "string" |
| | | }, |
| | | "packageName": { |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | }, |
| | | "component": { |
| | | "description": "对应前端文件路径", |
| | | "type": "string" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "hidden": { |
| | |
| | | "sort": { |
| | | "description": "排序标记", |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "system.SysBaseMenuBtn": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "desc": { |
| | | "type": "string" |
| | | }, |
| | |
| | | }, |
| | | "sysBaseMenuID": { |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "system.SysBaseMenuParameter": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "id": { |
| | | "description": "主键ID", |
| | | "type": "integer" |
| | |
| | | "description": "地址栏携带参数为params还是query", |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | }, |
| | | "value": { |
| | | "description": "地址栏携带参数的值", |
| | | "type": "string" |
| | |
| | | "system.SysDictionary": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "desc": { |
| | | "description": "描述", |
| | | "type": "string" |
| | |
| | | "type": { |
| | | "description": "字典名(英)", |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "system.SysDictionaryDetail": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "id": { |
| | | "description": "主键ID", |
| | | "type": "integer" |
| | |
| | | "sysDictionaryID": { |
| | | "description": "关联标记", |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | }, |
| | | "value": { |
| | | "description": "字典值", |
| | |
| | | }, |
| | | "component": { |
| | | "description": "对应前端文件路径", |
| | | "type": "string" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "hidden": { |
| | |
| | | "sort": { |
| | | "description": "排序标记", |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | "body": { |
| | | "description": "请求Body", |
| | | "type": "string" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "error_message": { |
| | |
| | | "description": "请求状态", |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | }, |
| | | "user": { |
| | | "$ref": "#/definitions/system.SysUser" |
| | | }, |
| | |
| | | "description": "基础颜色", |
| | | "type": "string" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "email": { |
| | | "description": "用户邮箱", |
| | | "type": "string" |
| | |
| | | "description": "用户侧边主题", |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | }, |
| | | "userName": { |
| | | "description": "用户登录名", |
| | | "type": "string" |
| | |
| | | "properties": { |
| | | "config": { |
| | | "$ref": "#/definitions/config.Server" |
| | | } |
| | | } |
| | | }, |
| | | "test.Industry": { |
| | | "type": "object", |
| | | "properties": { |
| | | "id": { |
| | | "description": "主键ID", |
| | | "type": "integer" |
| | | }, |
| | | "name": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | ], |
| | | "consumes": [ |
| | | "application/json" |
| | | "multipart/form-data" |
| | | ], |
| | | "produces": [ |
| | | "application/json" |
| | |
| | | "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": [ |
| | | { |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "object", |
| | | "additionalProperties": true |
| | | "type": "array", |
| | | "items": { |
| | | "type": "object" |
| | | } |
| | | }, |
| | | "msg": { |
| | | "type": "string" |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/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": [ |
| | |
| | | "responses": { |
| | | "200": { |
| | | "description": "预览创建后的代码", |
| | | "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": [ |
| | | { |
| | |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "客户名", |
| | | "name": "customerName", |
| | | "in": "query" |
| | |
| | | "type": "integer", |
| | | "description": "管理ID", |
| | | "name": "sysUserId", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | } |
| | | ], |
| | |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/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": "用id查询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" |
| | | } |
| | | } |
| | | } |
| | |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "描述", |
| | | "name": "desc", |
| | | "in": "query" |
| | |
| | | "type": "string", |
| | | "description": "字典名(英)", |
| | | "name": "type", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | } |
| | | ], |
| | |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "描述", |
| | | "name": "desc", |
| | | "in": "query" |
| | |
| | | "type": "string", |
| | | "description": "字典名(英)", |
| | | "name": "type", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | } |
| | | ], |
| | |
| | | "summary": "用id查询SysDictionaryDetail", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "主键ID", |
| | | "name": "id", |
| | |
| | | "type": "integer", |
| | | "description": "关联标记", |
| | | "name": "sysDictionaryID", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | |
| | | "summary": "分页获取SysDictionaryDetail列表", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "主键ID", |
| | | "name": "id", |
| | |
| | | "type": "integer", |
| | | "description": "关联标记", |
| | | "name": "sysDictionaryID", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "错误信息", |
| | | "name": "error_message", |
| | | "in": "query" |
| | |
| | | "type": "integer", |
| | | "description": "请求状态", |
| | | "name": "status", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "创建时间", |
| | | "name": "createdAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "错误信息", |
| | | "name": "error_message", |
| | | "in": "query" |
| | |
| | | "type": "integer", |
| | | "description": "请求状态", |
| | | "name": "status", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "string", |
| | | "description": "更新时间", |
| | | "name": "updatedAt", |
| | | "in": "query" |
| | | }, |
| | | { |
| | |
| | | "type": "string" |
| | | }, |
| | | "path": { |
| | | "description": "服务器地址:端口", |
| | | "type": "string" |
| | | }, |
| | | "port": { |
| | | "description": ":端口", |
| | | "type": "string" |
| | | }, |
| | | "prefix": { |
| | | "description": "全局表前缀,单独定义TableName则不生效", |
| | | "type": "string" |
| | | }, |
| | | "singular": { |
| | |
| | | "type": "boolean" |
| | | }, |
| | | "username": { |
| | | "description": "数据库密码", |
| | | "description": "数据库用户名", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "type": "string" |
| | | }, |
| | | "path": { |
| | | "description": "服务器地址:端口", |
| | | "type": "string" |
| | | }, |
| | | "port": { |
| | | "description": ":端口", |
| | | "type": "string" |
| | | }, |
| | | "prefix": { |
| | | "description": "全局表前缀,单独定义TableName则不生效", |
| | | "type": "string" |
| | | }, |
| | | "singular": { |
| | |
| | | "type": "boolean" |
| | | }, |
| | | "username": { |
| | | "description": "数据库密码", |
| | | "description": "数据库用户名", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "type": "string" |
| | | }, |
| | | "path": { |
| | | "description": "服务器地址:端口", |
| | | "type": "string" |
| | | }, |
| | | "port": { |
| | | "description": ":端口", |
| | | "type": "string" |
| | | }, |
| | | "prefix": { |
| | | "description": "全局表前缀,单独定义TableName则不生效", |
| | | "type": "string" |
| | | }, |
| | | "singular": { |
| | |
| | | "type": "boolean" |
| | | }, |
| | | "username": { |
| | | "description": "数据库密码", |
| | | "description": "数据库用户名", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "type": "string" |
| | | }, |
| | | "path": { |
| | | "description": "服务器地址:端口", |
| | | "type": "string" |
| | | }, |
| | | "port": { |
| | | "description": ":端口", |
| | | "type": "string" |
| | | }, |
| | | "prefix": { |
| | | "description": "全局表前缀,单独定义TableName则不生效", |
| | | "type": "string" |
| | | }, |
| | | "singular": { |
| | |
| | | "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": "是否开启Gorm全局日志", |
| | | "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": "全局表前缀,单独定义TableName则不生效", |
| | | "type": "string" |
| | | }, |
| | | "singular": { |
| | | "description": "是否开启全局禁用复数,true表示开启", |
| | | "type": "boolean" |
| | | }, |
| | | "username": { |
| | | "description": "数据库用户名", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "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" |
| | |
| | | "type": "string" |
| | | }, |
| | | "path": { |
| | | "description": "服务器地址:端口", |
| | | "type": "string" |
| | | }, |
| | | "port": { |
| | | "description": ":端口", |
| | | "type": "string" |
| | | }, |
| | | "prefix": { |
| | | "description": "全局表前缀,单独定义TableName则不生效", |
| | | "type": "string" |
| | | }, |
| | | "singular": { |
| | |
| | | "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": "是否开启Gorm全局日志", |
| | | "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": "是否开启全局禁用复数,true表示开启", |
| | | "type": "boolean" |
| | | }, |
| | | "username": { |
| | | "description": "数据库密码", |
| | | "description": "数据库用户名", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "example.ExaCustomer": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "customerName": { |
| | | "description": "客户名", |
| | | "type": "string" |
| | |
| | | "sysUserId": { |
| | | "description": "管理ID", |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "properties": { |
| | | "chunkTotal": { |
| | | "type": "integer" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "exaFileChunk": { |
| | | "type": "array", |
| | |
| | | }, |
| | | "isFinish": { |
| | | "type": "boolean" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "example.ExaFileChunk": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "exaFileID": { |
| | | "type": "integer" |
| | | }, |
| | |
| | | "id": { |
| | | "description": "主键ID", |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "example.ExaFileUploadAndDownload": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "id": { |
| | | "description": "主键ID", |
| | | "type": "integer" |
| | |
| | | "description": "文件标签", |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | }, |
| | | "url": { |
| | | "description": "文件地址", |
| | | "type": "string" |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "from": { |
| | | "description": "发件人 你自己要发邮件的邮箱", |
| | | "description": "收件人", |
| | | "type": "string" |
| | | }, |
| | | "host": { |
| | | "description": "服务器地址 例如 smtp.qq.com 请前往QQ或者你要发邮件的邮箱查看其smtp协议", |
| | | "description": "服务器地址", |
| | | "type": "string" |
| | | }, |
| | | "is-ssl": { |
| | | "description": "是否SSL 是否开启SSL", |
| | | "description": "是否SSL", |
| | | "type": "boolean" |
| | | }, |
| | | "nickname": { |
| | | "description": "昵称 发件人昵称 通常为自己的邮箱", |
| | | "description": "昵称", |
| | | "type": "string" |
| | | }, |
| | | "port": { |
| | | "description": "端口 请前往QQ或者你要发邮件的邮箱查看其smtp协议 大多为 465", |
| | | "description": "端口", |
| | | "type": "integer" |
| | | }, |
| | | "secret": { |
| | | "description": "密钥 用于登录的密钥 最好不要用邮箱密码 去邮箱smtp申请一个用于登录的密钥", |
| | | "description": "密钥", |
| | | "type": "string" |
| | | }, |
| | | "to": { |
| | | "description": "收件人:多个以英文逗号分隔 例:a@qq.com b@qq.com 正式开发中请把此项目作为参数使用", |
| | | "description": "收件人:多个以英文逗号分隔", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "request.InitDB": { |
| | | "type": "object", |
| | | "required": [ |
| | | "dbName" |
| | | "dbName", |
| | | "userName" |
| | | ], |
| | | "properties": { |
| | | "dbName": { |
| | | "description": "数据库名", |
| | | "type": "string" |
| | | }, |
| | | "dbPath": { |
| | | "description": "sqlite数据库文件路径", |
| | | "type": "string" |
| | | }, |
| | | "dbType": { |
| | |
| | | "description": "api组", |
| | | "type": "string" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "desc": { |
| | | "description": "排序方式:升序false(默认)|降序true", |
| | | "type": "boolean" |
| | |
| | | }, |
| | | "path": { |
| | | "description": "api路径", |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "description": "api组", |
| | | "type": "string" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "description": { |
| | | "description": "api中文描述", |
| | | "type": "string" |
| | |
| | | }, |
| | | "path": { |
| | | "description": "api路径", |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "system.SysAutoCode": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "desc": { |
| | | "type": "string" |
| | | }, |
| | |
| | | "type": "string" |
| | | }, |
| | | "packageName": { |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | }, |
| | | "component": { |
| | | "description": "对应前端文件路径", |
| | | "type": "string" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "hidden": { |
| | |
| | | "sort": { |
| | | "description": "排序标记", |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "system.SysBaseMenuBtn": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "desc": { |
| | | "type": "string" |
| | | }, |
| | |
| | | }, |
| | | "sysBaseMenuID": { |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "system.SysBaseMenuParameter": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "id": { |
| | | "description": "主键ID", |
| | | "type": "integer" |
| | |
| | | "description": "地址栏携带参数为params还是query", |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | }, |
| | | "value": { |
| | | "description": "地址栏携带参数的值", |
| | | "type": "string" |
| | |
| | | "system.SysDictionary": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "desc": { |
| | | "description": "描述", |
| | | "type": "string" |
| | |
| | | "type": { |
| | | "description": "字典名(英)", |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "system.SysDictionaryDetail": { |
| | | "type": "object", |
| | | "properties": { |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "id": { |
| | | "description": "主键ID", |
| | | "type": "integer" |
| | |
| | | "sysDictionaryID": { |
| | | "description": "关联标记", |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | }, |
| | | "value": { |
| | | "description": "字典值", |
| | |
| | | }, |
| | | "component": { |
| | | "description": "对应前端文件路径", |
| | | "type": "string" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "hidden": { |
| | |
| | | "sort": { |
| | | "description": "排序标记", |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | "body": { |
| | | "description": "请求Body", |
| | | "type": "string" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "error_message": { |
| | |
| | | "description": "请求状态", |
| | | "type": "integer" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | }, |
| | | "user": { |
| | | "$ref": "#/definitions/system.SysUser" |
| | | }, |
| | |
| | | "description": "基础颜色", |
| | | "type": "string" |
| | | }, |
| | | "createdAt": { |
| | | "description": "创建时间", |
| | | "type": "string" |
| | | }, |
| | | "email": { |
| | | "description": "用户邮箱", |
| | | "type": "string" |
| | |
| | | "description": "用户侧边主题", |
| | | "type": "string" |
| | | }, |
| | | "updatedAt": { |
| | | "description": "更新时间", |
| | | "type": "string" |
| | | }, |
| | | "userName": { |
| | | "description": "用户登录名", |
| | | "type": "string" |
| | |
| | | "properties": { |
| | | "config": { |
| | | "$ref": "#/definitions/config.Server" |
| | | } |
| | | } |
| | | }, |
| | | "test.Industry": { |
| | | "type": "object", |
| | | "properties": { |
| | | "id": { |
| | | "description": "主键ID", |
| | | "type": "integer" |
| | | }, |
| | | "name": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | } |
| | |
| | | description: 数据库密码 |
| | | type: string |
| | | path: |
| | | description: 服务器地址:端口 |
| | | type: string |
| | | port: |
| | | description: :端口 |
| | | type: string |
| | | prefix: |
| | | description: 全局表前缀,单独定义TableName则不生效 |
| | | type: string |
| | | singular: |
| | | description: 是否开启全局禁用复数,true表示开启 |
| | | type: boolean |
| | | username: |
| | | description: 数据库密码 |
| | | description: 数据库用户名 |
| | | type: string |
| | | type: object |
| | | config.Mysql: |
| | |
| | | description: 数据库密码 |
| | | type: string |
| | | path: |
| | | description: 服务器地址:端口 |
| | | type: string |
| | | port: |
| | | description: :端口 |
| | | type: string |
| | | prefix: |
| | | description: 全局表前缀,单独定义TableName则不生效 |
| | | type: string |
| | | singular: |
| | | description: 是否开启全局禁用复数,true表示开启 |
| | | type: boolean |
| | | username: |
| | | description: 数据库密码 |
| | | description: 数据库用户名 |
| | | type: string |
| | | type: object |
| | | config.Oracle: |
| | |
| | | description: 数据库密码 |
| | | type: string |
| | | path: |
| | | description: 服务器地址:端口 |
| | | type: string |
| | | port: |
| | | description: :端口 |
| | | type: string |
| | | prefix: |
| | | description: 全局表前缀,单独定义TableName则不生效 |
| | | type: string |
| | | singular: |
| | | description: 是否开启全局禁用复数,true表示开启 |
| | | type: boolean |
| | | username: |
| | | description: 数据库密码 |
| | | description: 数据库用户名 |
| | | type: string |
| | | type: object |
| | | config.Pgsql: |
| | |
| | | description: 数据库密码 |
| | | type: string |
| | | path: |
| | | description: 服务器地址:端口 |
| | | type: string |
| | | port: |
| | | description: :端口 |
| | | type: string |
| | | prefix: |
| | | description: 全局表前缀,单独定义TableName则不生效 |
| | | type: string |
| | | singular: |
| | | description: 是否开启全局禁用复数,true表示开启 |
| | | type: boolean |
| | | username: |
| | | description: 数据库密码 |
| | | description: 数据库用户名 |
| | | type: string |
| | | type: object |
| | | config.Qiniu: |
| | |
| | | $ref: '#/definitions/config.Qiniu' |
| | | redis: |
| | | $ref: '#/definitions/config.Redis' |
| | | sqlite: |
| | | $ref: '#/definitions/config.Sqlite' |
| | | system: |
| | | $ref: '#/definitions/config.System' |
| | | tencent-cos: |
| | |
| | | description: 数据库密码 |
| | | type: string |
| | | path: |
| | | description: 服务器地址:端口 |
| | | type: string |
| | | port: |
| | | description: :端口 |
| | | type: string |
| | | prefix: |
| | | description: 全局表前缀,单独定义TableName则不生效 |
| | | type: string |
| | | singular: |
| | | description: 是否开启全局禁用复数,true表示开启 |
| | |
| | | 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: 是否开启Gorm全局日志 |
| | | 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: 是否开启全局禁用复数,true表示开启 |
| | | type: boolean |
| | | username: |
| | | description: 数据库密码 |
| | | description: 数据库用户名 |
| | | type: string |
| | | type: object |
| | | config.System: |
| | |
| | | type: object |
| | | example.ExaCustomer: |
| | | properties: |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | customerName: |
| | | description: 客户名 |
| | | type: string |
| | |
| | | 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' |
| | |
| | | type: integer |
| | | isFinish: |
| | | type: boolean |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | type: object |
| | | example.ExaFileChunk: |
| | | properties: |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | exaFileID: |
| | | type: integer |
| | | fileChunkNumber: |
| | |
| | | id: |
| | | description: 主键ID |
| | | type: integer |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | type: object |
| | | example.ExaFileUploadAndDownload: |
| | | properties: |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | id: |
| | | description: 主键ID |
| | | type: integer |
| | |
| | | tag: |
| | | description: 文件标签 |
| | | type: string |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | url: |
| | | description: 文件地址 |
| | | type: string |
| | |
| | | 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 是否开启SSL |
| | | description: 是否SSL |
| | | type: boolean |
| | | nickname: |
| | | description: 昵称 发件人昵称 通常为自己的邮箱 |
| | | description: 昵称 |
| | | type: string |
| | | port: |
| | | description: 端口 请前往QQ或者你要发邮件的邮箱查看其smtp协议 大多为 465 |
| | | description: 端口 |
| | | type: integer |
| | | secret: |
| | | description: 密钥 用于登录的密钥 最好不要用邮箱密码 去邮箱smtp申请一个用于登录的密钥 |
| | | description: 密钥 |
| | | type: string |
| | | to: |
| | | description: 收件人:多个以英文逗号分隔 例:a@qq.com b@qq.com 正式开发中请把此项目作为参数使用 |
| | | description: 收件人:多个以英文逗号分隔 |
| | | type: string |
| | | type: object |
| | | request.AddMenuAuthorityInfo: |
| | |
| | | dbName: |
| | | description: 数据库名 |
| | | type: string |
| | | dbPath: |
| | | description: sqlite数据库文件路径 |
| | | type: string |
| | | dbType: |
| | | description: 数据库类型 |
| | | type: string |
| | |
| | | type: string |
| | | required: |
| | | - dbName |
| | | - userName |
| | | type: object |
| | | request.Login: |
| | | properties: |
| | |
| | | apiGroup: |
| | | description: api组 |
| | | type: string |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | desc: |
| | | description: 排序方式:升序false(默认)|降序true |
| | | type: boolean |
| | |
| | | type: integer |
| | | path: |
| | | description: api路径 |
| | | type: string |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | type: object |
| | | request.SetUserAuth: |
| | |
| | | apiGroup: |
| | | description: api组 |
| | | type: string |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | description: |
| | | description: api中文描述 |
| | | type: string |
| | |
| | | type: string |
| | | path: |
| | | description: api路径 |
| | | type: string |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | type: object |
| | | system.SysAuthority: |
| | |
| | | type: object |
| | | system.SysAutoCode: |
| | | properties: |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | desc: |
| | | type: string |
| | | id: |
| | |
| | | label: |
| | | type: string |
| | | packageName: |
| | | type: string |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | type: object |
| | | system.SysBaseMenu: |
| | |
| | | type: array |
| | | component: |
| | | description: 对应前端文件路径 |
| | | type: string |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | hidden: |
| | | description: 是否在列表隐藏 |
| | |
| | | sort: |
| | | description: 排序标记 |
| | | type: integer |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | type: object |
| | | system.SysBaseMenuBtn: |
| | | properties: |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | desc: |
| | | type: string |
| | | id: |
| | |
| | | type: string |
| | | sysBaseMenuID: |
| | | type: integer |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | type: object |
| | | system.SysBaseMenuParameter: |
| | | properties: |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | id: |
| | | description: 主键ID |
| | | type: integer |
| | |
| | | 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 |
| | |
| | | type: |
| | | description: 字典名(英) |
| | | type: string |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | type: object |
| | | system.SysDictionaryDetail: |
| | | properties: |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | id: |
| | | description: 主键ID |
| | | type: integer |
| | |
| | | sysDictionaryID: |
| | | description: 关联标记 |
| | | type: integer |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | value: |
| | | description: 字典值 |
| | | type: integer |
| | |
| | | type: array |
| | | component: |
| | | description: 对应前端文件路径 |
| | | type: string |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | hidden: |
| | | description: 是否在列表隐藏 |
| | |
| | | sort: |
| | | description: 排序标记 |
| | | type: integer |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | type: object |
| | | system.SysOperationRecord: |
| | | properties: |
| | |
| | | type: string |
| | | body: |
| | | description: 请求Body |
| | | type: string |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | error_message: |
| | | description: 错误信息 |
| | |
| | | status: |
| | | description: 请求状态 |
| | | type: integer |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | user: |
| | | $ref: '#/definitions/system.SysUser' |
| | | user_id: |
| | |
| | | baseColor: |
| | | description: 基础颜色 |
| | | type: string |
| | | createdAt: |
| | | description: 创建时间 |
| | | type: string |
| | | email: |
| | | description: 用户邮箱 |
| | | type: string |
| | |
| | | sideMode: |
| | | description: 用户侧边主题 |
| | | type: string |
| | | updatedAt: |
| | | description: 更新时间 |
| | | type: string |
| | | userName: |
| | | description: 用户登录名 |
| | | type: string |
| | |
| | | properties: |
| | | config: |
| | | $ref: '#/definitions/config.Server' |
| | | type: object |
| | | test.Industry: |
| | | properties: |
| | | id: |
| | | description: 主键ID |
| | | type: integer |
| | | name: |
| | | type: string |
| | | type: object |
| | | info: |
| | | contact: {} |
| | |
| | | /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: |
| | |
| | | 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: |
| | |
| | | security: |
| | | - ApiKeyAuth: [] |
| | | summary: 预览创建后的代码 |
| | | 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: |
| | |
| | | consumes: |
| | | - application/json |
| | | parameters: |
| | | - description: 创建时间 |
| | | in: query |
| | | name: createdAt |
| | | type: string |
| | | - description: 客户名 |
| | | in: query |
| | | name: customerName |
| | |
| | | in: query |
| | | name: sysUserId |
| | | type: integer |
| | | - description: 更新时间 |
| | | in: query |
| | | name: updatedAt |
| | | type: string |
| | | produces: |
| | | - application/json |
| | | responses: |
| | |
| | | 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: 用id查询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: |
| | |
| | | consumes: |
| | | - application/json |
| | | parameters: |
| | | - description: 创建时间 |
| | | in: query |
| | | name: createdAt |
| | | type: string |
| | | - description: 描述 |
| | | in: query |
| | | name: desc |
| | |
| | | - description: 字典名(英) |
| | | in: query |
| | | name: type |
| | | type: string |
| | | - description: 更新时间 |
| | | in: query |
| | | name: updatedAt |
| | | type: string |
| | | produces: |
| | | - application/json |
| | |
| | | consumes: |
| | | - application/json |
| | | parameters: |
| | | - description: 创建时间 |
| | | in: query |
| | | name: createdAt |
| | | type: string |
| | | - description: 描述 |
| | | in: query |
| | | name: desc |
| | |
| | | - description: 字典名(英) |
| | | in: query |
| | | name: type |
| | | type: string |
| | | - description: 更新时间 |
| | | in: query |
| | | name: updatedAt |
| | | type: string |
| | | produces: |
| | | - application/json |
| | |
| | | consumes: |
| | | - application/json |
| | | parameters: |
| | | - description: 创建时间 |
| | | in: query |
| | | name: createdAt |
| | | type: string |
| | | - description: 主键ID |
| | | in: query |
| | | name: id |
| | |
| | | in: query |
| | | name: sysDictionaryID |
| | | type: integer |
| | | - description: 更新时间 |
| | | in: query |
| | | name: updatedAt |
| | | type: string |
| | | - description: 字典值 |
| | | in: query |
| | | name: value |
| | |
| | | consumes: |
| | | - application/json |
| | | parameters: |
| | | - description: 创建时间 |
| | | in: query |
| | | name: createdAt |
| | | type: string |
| | | - description: 主键ID |
| | | in: query |
| | | name: id |
| | |
| | | in: query |
| | | name: sysDictionaryID |
| | | type: integer |
| | | - description: 更新时间 |
| | | in: query |
| | | name: updatedAt |
| | | type: string |
| | | - description: 字典值 |
| | | in: query |
| | | name: value |
| | |
| | | in: query |
| | | name: body |
| | | type: string |
| | | - description: 创建时间 |
| | | in: query |
| | | name: createdAt |
| | | type: string |
| | | - description: 错误信息 |
| | | in: query |
| | | name: error_message |
| | |
| | | in: query |
| | | name: status |
| | | type: integer |
| | | - description: 更新时间 |
| | | in: query |
| | | name: updatedAt |
| | | type: string |
| | | - description: 用户id |
| | | in: query |
| | | name: user_id |
| | |
| | | - description: 请求Body |
| | | in: query |
| | | name: body |
| | | type: string |
| | | - description: 创建时间 |
| | | in: query |
| | | name: createdAt |
| | | type: string |
| | | - description: 错误信息 |
| | | in: query |
| | |
| | | in: query |
| | | name: status |
| | | type: integer |
| | | - description: 更新时间 |
| | | in: query |
| | | name: updatedAt |
| | | type: string |
| | | - description: 用户id |
| | | in: query |
| | | name: user_id |
| | |
| | | { |
| | | testRouter := router.RouterGroupApp.Test |
| | | testRouter.InitIndustryRouter(PrivateGroup) |
| | | testRouter.InitSupplierTypeRouter(PrivateGroup) |
| | | } |
| | | |
| | | global.GVA_LOG.Info("router register success") |
| New file |
| | |
| | | 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 |
| | | } |
| New file |
| | |
| | | // 自动生成模板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" |
| | | } |
| | |
| | | package test |
| | | |
| | | type RouterGroup struct { |
| | | SupplierTypeRouter |
| | | IndustryRouter |
| | | } |
| New file |
| | |
| | | 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列表 |
| | | } |
| | | } |
| | |
| | | package test |
| | | |
| | | type ServiceGroup struct { |
| | | SupplierTypeService |
| | | IndustryService |
| | | } |
| New file |
| | |
| | | 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 |
| | | } |