mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-25 03:21:46 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d735ed5aa | ||
|
|
d782b00117 | ||
|
|
239159dd2a | ||
|
|
0c1e91c3b5 | ||
|
|
c09347b387 | ||
|
|
e49e47c7a1 | ||
|
|
98b46535aa | ||
|
|
014a23aac3 | ||
|
|
f1dfba79e0 | ||
|
|
a282e44b1d | ||
|
|
d1279e67fb | ||
|
|
73118e49b9 | ||
|
|
7b43982595 |
@@ -2,7 +2,7 @@ PROJECT:=go-admin
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
CGO_ENABLED=0 go build -ldflags="-w -s" -a -installsuffix -o go-admin .
|
||||
CGO_ENABLED=0 go build -ldflags="-w -s" -a -installsuffix "" -o go-admin .
|
||||
|
||||
# make build-linux
|
||||
build-linux:
|
||||
@@ -51,4 +51,4 @@ deploy:
|
||||
#@git checkout master
|
||||
#@git pull origin master
|
||||
make build-linux
|
||||
make run
|
||||
make run
|
||||
|
||||
@@ -333,6 +333,7 @@ The `go-admin` project has always been developed in the GoLand integrated develo
|
||||
|
||||
## 🤝 Link
|
||||
[Go developer growth roadmap](http://www.golangroadmap.com/)
|
||||
[mss-boot-io](https://docs.mss-boot-io.top/)
|
||||
|
||||
## 🔑 License
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
"go-admin/app/admin/service/dto"
|
||||
"go-admin/common/actions"
|
||||
cDto "go-admin/common/dto"
|
||||
"go-admin/common/global"
|
||||
)
|
||||
|
||||
type SysApi struct {
|
||||
@@ -34,7 +35,12 @@ func (e *SysApi) GetPage(c *dto.SysApiGetPageReq, p *actions.DataPermission, lis
|
||||
if qType == "暂无" {
|
||||
qType = ""
|
||||
}
|
||||
orm = orm.Where("`type` = ?", qType)
|
||||
if global.Driver == "postgres" {
|
||||
orm = orm.Where("type = ?", qType)
|
||||
} else {
|
||||
orm = orm.Where("`type` = ?", qType)
|
||||
}
|
||||
|
||||
}
|
||||
err = orm.Find(list).Limit(-1).Offset(-1).
|
||||
Count(count).Error
|
||||
|
||||
@@ -2,7 +2,7 @@ package global
|
||||
|
||||
const (
|
||||
// Version go-admin version info
|
||||
Version = "2.1.1"
|
||||
Version = "2.1.2"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+575
-4
@@ -11,6 +11,10 @@ const docTemplateadmin = `{
|
||||
"description": "{{escape .Description}}",
|
||||
"title": "{{.Title}}",
|
||||
"contact": {},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://github.com/go-admin-team/go-admin/blob/master/LICENSE.md"
|
||||
},
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
@@ -83,6 +87,80 @@ const docTemplateadmin = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/db/columns/page": {
|
||||
"get": {
|
||||
"description": "数据库表列分页列表 / database table column page list",
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "分页列表数据 / page list data",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "tableName / 数据表名称",
|
||||
"name": "tableName",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "pageSize / 页条数",
|
||||
"name": "pageSize",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "pageIndex / 页码",
|
||||
"name": "pageIndex",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": 200, \"data\": [...]}",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/db/tables/page": {
|
||||
"get": {
|
||||
"description": "数据库表分页列表 / database table page list",
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "分页列表数据 / page list data",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "tableName / 数据表名称",
|
||||
"name": "tableName",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "pageSize / 页条数",
|
||||
"name": "pageSize",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "pageIndex / 页码",
|
||||
"name": "pageIndex",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": 200, \"data\": [...]}",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/dept": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -1172,6 +1250,47 @@ const docTemplateadmin = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/public/uploadFile": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "获取JSON",
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
],
|
||||
"tags": [
|
||||
"公共接口"
|
||||
],
|
||||
"summary": "上传图片",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "type",
|
||||
"name": "type",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"description": "file",
|
||||
"name": "file",
|
||||
"in": "formData",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": -1, \"message\": \"添加失败\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/role": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -1391,6 +1510,28 @@ const docTemplateadmin = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/server-monitor": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "获取JSON",
|
||||
"tags": [
|
||||
"系统信息"
|
||||
],
|
||||
"summary": "系统信息",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": 200, \"data\": [...]}",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/set-config": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -2302,6 +2443,165 @@ const docTemplateadmin = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/sys/tables/info": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "修改表结构",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "修改表结构",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "body",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/tools.SysTables"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": -1, \"message\": \"添加失败\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "添加表结构",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "添加表结构",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "tableName / 数据表名称",
|
||||
"name": "tables",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": -1, \"message\": \"添加失败\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/sys/tables/info/{tableId}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "获取JSON",
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "获取配置",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "configKey",
|
||||
"name": "configKey",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": 200, \"data\": [...]}",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"description": "删除表结构",
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "删除表结构",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "tableId",
|
||||
"name": "tableId",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": -1, \"message\": \"删除失败\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/sys/tables/page": {
|
||||
"get": {
|
||||
"description": "生成表分页列表",
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "分页列表数据",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "tableName / 数据表名称",
|
||||
"name": "tableName",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "pageSize / 页条数",
|
||||
"name": "pageSize",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "pageIndex / 页码",
|
||||
"name": "pageIndex",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": 200, \"data\": [...]}",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/user/avatar": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -3268,7 +3568,7 @@ const docTemplateadmin = `{
|
||||
"type": "integer"
|
||||
},
|
||||
"status": {
|
||||
"description": "状态",
|
||||
"description": "状态 1禁用 2正常",
|
||||
"type": "string"
|
||||
},
|
||||
"sysDept": {
|
||||
@@ -3781,18 +4081,289 @@ const docTemplateadmin = `{
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tools.Params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"treeCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"treeName": {
|
||||
"type": "string"
|
||||
},
|
||||
"treeParentCode": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tools.SysColumns": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"columnComment": {
|
||||
"type": "string"
|
||||
},
|
||||
"columnId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"columnName": {
|
||||
"type": "string"
|
||||
},
|
||||
"columnType": {
|
||||
"type": "string"
|
||||
},
|
||||
"createBy": {
|
||||
"type": "integer"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"deletedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"dictType": {
|
||||
"type": "string"
|
||||
},
|
||||
"edit": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"fkCol": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/tools.SysColumns"
|
||||
}
|
||||
},
|
||||
"fkLabelId": {
|
||||
"type": "string"
|
||||
},
|
||||
"fkLabelName": {
|
||||
"type": "string"
|
||||
},
|
||||
"fkTableName": {
|
||||
"type": "string"
|
||||
},
|
||||
"fkTableNameClass": {
|
||||
"type": "string"
|
||||
},
|
||||
"fkTableNamePackage": {
|
||||
"type": "string"
|
||||
},
|
||||
"goField": {
|
||||
"type": "string"
|
||||
},
|
||||
"goType": {
|
||||
"type": "string"
|
||||
},
|
||||
"htmlType": {
|
||||
"type": "string"
|
||||
},
|
||||
"increment": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"insert": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isEdit": {
|
||||
"type": "string"
|
||||
},
|
||||
"isIncrement": {
|
||||
"type": "string"
|
||||
},
|
||||
"isInsert": {
|
||||
"type": "string"
|
||||
},
|
||||
"isList": {
|
||||
"type": "string"
|
||||
},
|
||||
"isPk": {
|
||||
"type": "string"
|
||||
},
|
||||
"isQuery": {
|
||||
"type": "string"
|
||||
},
|
||||
"isRequired": {
|
||||
"type": "string"
|
||||
},
|
||||
"jsonField": {
|
||||
"type": "string"
|
||||
},
|
||||
"list": {
|
||||
"type": "string"
|
||||
},
|
||||
"pk": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"query": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"queryType": {
|
||||
"type": "string"
|
||||
},
|
||||
"remark": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"sort": {
|
||||
"type": "integer"
|
||||
},
|
||||
"superColumn": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"tableId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"updateBy": {
|
||||
"type": "integer"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"usableColumn": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tools.SysTables": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"businessName": {
|
||||
"type": "string"
|
||||
},
|
||||
"className": {
|
||||
"description": "类名",
|
||||
"type": "string"
|
||||
},
|
||||
"columns": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/tools.SysColumns"
|
||||
}
|
||||
},
|
||||
"createBy": {
|
||||
"type": "integer"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"crud": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"dataScope": {
|
||||
"type": "string"
|
||||
},
|
||||
"deletedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"functionAuthor": {
|
||||
"description": "功能作者",
|
||||
"type": "string"
|
||||
},
|
||||
"functionName": {
|
||||
"description": "功能名称",
|
||||
"type": "string"
|
||||
},
|
||||
"isActions": {
|
||||
"type": "integer"
|
||||
},
|
||||
"isAuth": {
|
||||
"type": "integer"
|
||||
},
|
||||
"isDataScope": {
|
||||
"type": "integer"
|
||||
},
|
||||
"isLogicalDelete": {
|
||||
"type": "string"
|
||||
},
|
||||
"logicalDelete": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"logicalDeleteColumn": {
|
||||
"type": "string"
|
||||
},
|
||||
"moduleFrontName": {
|
||||
"description": "前端文件名",
|
||||
"type": "string"
|
||||
},
|
||||
"moduleName": {
|
||||
"description": "go文件名",
|
||||
"type": "string"
|
||||
},
|
||||
"options": {
|
||||
"type": "string"
|
||||
},
|
||||
"packageName": {
|
||||
"description": "包名",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/tools.Params"
|
||||
},
|
||||
"pkColumn": {
|
||||
"type": "string"
|
||||
},
|
||||
"pkGoField": {
|
||||
"type": "string"
|
||||
},
|
||||
"pkJsonField": {
|
||||
"type": "string"
|
||||
},
|
||||
"remark": {
|
||||
"type": "string"
|
||||
},
|
||||
"tableComment": {
|
||||
"description": "表备注",
|
||||
"type": "string"
|
||||
},
|
||||
"tableId": {
|
||||
"description": "表编码",
|
||||
"type": "integer"
|
||||
},
|
||||
"tableName": {
|
||||
"description": "表名称",
|
||||
"type": "string"
|
||||
},
|
||||
"tplCategory": {
|
||||
"type": "string"
|
||||
},
|
||||
"tree": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"treeCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"treeName": {
|
||||
"type": "string"
|
||||
},
|
||||
"treeParentCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"updateBy": {
|
||||
"type": "integer"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"Bearer": {
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
// SwaggerInfoadmin holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfoadmin = &swag.Spec{
|
||||
Version: "",
|
||||
Version: "2.0.0",
|
||||
Host: "",
|
||||
BasePath: "",
|
||||
Schemes: []string{},
|
||||
Title: "",
|
||||
Description: "",
|
||||
Title: "go-admin API",
|
||||
Description: "基于Gin + Vue + Element UI的前后端分离权限管理系统的接口文档\n添加qq群: 521386980 进入技术交流群 请先star,谢谢!",
|
||||
InfoInstanceName: "admin",
|
||||
SwaggerTemplate: docTemplateadmin,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"contact": {}
|
||||
"description": "基于Gin + Vue + Element UI的前后端分离权限管理系统的接口文档\n添加qq群: 521386980 进入技术交流群 请先star,谢谢!",
|
||||
"title": "go-admin API",
|
||||
"contact": {},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://github.com/go-admin-team/go-admin/blob/master/LICENSE.md"
|
||||
},
|
||||
"version": "2.0.0"
|
||||
},
|
||||
"paths": {
|
||||
"/api/v1/app-config": {
|
||||
@@ -71,6 +78,80 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/db/columns/page": {
|
||||
"get": {
|
||||
"description": "数据库表列分页列表 / database table column page list",
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "分页列表数据 / page list data",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "tableName / 数据表名称",
|
||||
"name": "tableName",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "pageSize / 页条数",
|
||||
"name": "pageSize",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "pageIndex / 页码",
|
||||
"name": "pageIndex",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": 200, \"data\": [...]}",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/db/tables/page": {
|
||||
"get": {
|
||||
"description": "数据库表分页列表 / database table page list",
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "分页列表数据 / page list data",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "tableName / 数据表名称",
|
||||
"name": "tableName",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "pageSize / 页条数",
|
||||
"name": "pageSize",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "pageIndex / 页码",
|
||||
"name": "pageIndex",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": 200, \"data\": [...]}",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/dept": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -1160,6 +1241,47 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/public/uploadFile": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "获取JSON",
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
],
|
||||
"tags": [
|
||||
"公共接口"
|
||||
],
|
||||
"summary": "上传图片",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "type",
|
||||
"name": "type",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"description": "file",
|
||||
"name": "file",
|
||||
"in": "formData",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": -1, \"message\": \"添加失败\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/role": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -1379,6 +1501,28 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/server-monitor": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "获取JSON",
|
||||
"tags": [
|
||||
"系统信息"
|
||||
],
|
||||
"summary": "系统信息",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": 200, \"data\": [...]}",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/set-config": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -2290,6 +2434,165 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/sys/tables/info": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "修改表结构",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "修改表结构",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "body",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/tools.SysTables"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": -1, \"message\": \"添加失败\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "添加表结构",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "添加表结构",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "tableName / 数据表名称",
|
||||
"name": "tables",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": -1, \"message\": \"添加失败\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/sys/tables/info/{tableId}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "获取JSON",
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "获取配置",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "configKey",
|
||||
"name": "configKey",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": 200, \"data\": [...]}",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"description": "删除表结构",
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "删除表结构",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "tableId",
|
||||
"name": "tableId",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": -1, \"message\": \"删除失败\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/sys/tables/page": {
|
||||
"get": {
|
||||
"description": "生成表分页列表",
|
||||
"tags": [
|
||||
"工具 / 生成工具"
|
||||
],
|
||||
"summary": "分页列表数据",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "tableName / 数据表名称",
|
||||
"name": "tableName",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "pageSize / 页条数",
|
||||
"name": "pageSize",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "pageIndex / 页码",
|
||||
"name": "pageIndex",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"code\": 200, \"data\": [...]}",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/user/avatar": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -3256,7 +3559,7 @@
|
||||
"type": "integer"
|
||||
},
|
||||
"status": {
|
||||
"description": "状态",
|
||||
"description": "状态 1禁用 2正常",
|
||||
"type": "string"
|
||||
},
|
||||
"sysDept": {
|
||||
@@ -3769,6 +4072,277 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tools.Params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"treeCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"treeName": {
|
||||
"type": "string"
|
||||
},
|
||||
"treeParentCode": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tools.SysColumns": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"columnComment": {
|
||||
"type": "string"
|
||||
},
|
||||
"columnId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"columnName": {
|
||||
"type": "string"
|
||||
},
|
||||
"columnType": {
|
||||
"type": "string"
|
||||
},
|
||||
"createBy": {
|
||||
"type": "integer"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"deletedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"dictType": {
|
||||
"type": "string"
|
||||
},
|
||||
"edit": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"fkCol": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/tools.SysColumns"
|
||||
}
|
||||
},
|
||||
"fkLabelId": {
|
||||
"type": "string"
|
||||
},
|
||||
"fkLabelName": {
|
||||
"type": "string"
|
||||
},
|
||||
"fkTableName": {
|
||||
"type": "string"
|
||||
},
|
||||
"fkTableNameClass": {
|
||||
"type": "string"
|
||||
},
|
||||
"fkTableNamePackage": {
|
||||
"type": "string"
|
||||
},
|
||||
"goField": {
|
||||
"type": "string"
|
||||
},
|
||||
"goType": {
|
||||
"type": "string"
|
||||
},
|
||||
"htmlType": {
|
||||
"type": "string"
|
||||
},
|
||||
"increment": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"insert": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isEdit": {
|
||||
"type": "string"
|
||||
},
|
||||
"isIncrement": {
|
||||
"type": "string"
|
||||
},
|
||||
"isInsert": {
|
||||
"type": "string"
|
||||
},
|
||||
"isList": {
|
||||
"type": "string"
|
||||
},
|
||||
"isPk": {
|
||||
"type": "string"
|
||||
},
|
||||
"isQuery": {
|
||||
"type": "string"
|
||||
},
|
||||
"isRequired": {
|
||||
"type": "string"
|
||||
},
|
||||
"jsonField": {
|
||||
"type": "string"
|
||||
},
|
||||
"list": {
|
||||
"type": "string"
|
||||
},
|
||||
"pk": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"query": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"queryType": {
|
||||
"type": "string"
|
||||
},
|
||||
"remark": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"sort": {
|
||||
"type": "integer"
|
||||
},
|
||||
"superColumn": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"tableId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"updateBy": {
|
||||
"type": "integer"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"usableColumn": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tools.SysTables": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"businessName": {
|
||||
"type": "string"
|
||||
},
|
||||
"className": {
|
||||
"description": "类名",
|
||||
"type": "string"
|
||||
},
|
||||
"columns": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/tools.SysColumns"
|
||||
}
|
||||
},
|
||||
"createBy": {
|
||||
"type": "integer"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"crud": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"dataScope": {
|
||||
"type": "string"
|
||||
},
|
||||
"deletedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"functionAuthor": {
|
||||
"description": "功能作者",
|
||||
"type": "string"
|
||||
},
|
||||
"functionName": {
|
||||
"description": "功能名称",
|
||||
"type": "string"
|
||||
},
|
||||
"isActions": {
|
||||
"type": "integer"
|
||||
},
|
||||
"isAuth": {
|
||||
"type": "integer"
|
||||
},
|
||||
"isDataScope": {
|
||||
"type": "integer"
|
||||
},
|
||||
"isLogicalDelete": {
|
||||
"type": "string"
|
||||
},
|
||||
"logicalDelete": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"logicalDeleteColumn": {
|
||||
"type": "string"
|
||||
},
|
||||
"moduleFrontName": {
|
||||
"description": "前端文件名",
|
||||
"type": "string"
|
||||
},
|
||||
"moduleName": {
|
||||
"description": "go文件名",
|
||||
"type": "string"
|
||||
},
|
||||
"options": {
|
||||
"type": "string"
|
||||
},
|
||||
"packageName": {
|
||||
"description": "包名",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/tools.Params"
|
||||
},
|
||||
"pkColumn": {
|
||||
"type": "string"
|
||||
},
|
||||
"pkGoField": {
|
||||
"type": "string"
|
||||
},
|
||||
"pkJsonField": {
|
||||
"type": "string"
|
||||
},
|
||||
"remark": {
|
||||
"type": "string"
|
||||
},
|
||||
"tableComment": {
|
||||
"description": "表备注",
|
||||
"type": "string"
|
||||
},
|
||||
"tableId": {
|
||||
"description": "表编码",
|
||||
"type": "integer"
|
||||
},
|
||||
"tableName": {
|
||||
"description": "表名称",
|
||||
"type": "string"
|
||||
},
|
||||
"tplCategory": {
|
||||
"type": "string"
|
||||
},
|
||||
"tree": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"treeCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"treeName": {
|
||||
"type": "string"
|
||||
},
|
||||
"treeParentCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"updateBy": {
|
||||
"type": "integer"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"Bearer": {
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -529,7 +529,7 @@ definitions:
|
||||
description: 角色排序
|
||||
type: integer
|
||||
status:
|
||||
description: 状态
|
||||
description: 状态 1禁用 2正常
|
||||
type: string
|
||||
sysDept:
|
||||
items:
|
||||
@@ -876,8 +876,194 @@ definitions:
|
||||
status:
|
||||
type: string
|
||||
type: object
|
||||
tools.Params:
|
||||
properties:
|
||||
treeCode:
|
||||
type: string
|
||||
treeName:
|
||||
type: string
|
||||
treeParentCode:
|
||||
type: string
|
||||
type: object
|
||||
tools.SysColumns:
|
||||
properties:
|
||||
columnComment:
|
||||
type: string
|
||||
columnId:
|
||||
type: integer
|
||||
columnName:
|
||||
type: string
|
||||
columnType:
|
||||
type: string
|
||||
createBy:
|
||||
type: integer
|
||||
createdAt:
|
||||
type: string
|
||||
deletedAt:
|
||||
type: string
|
||||
dictType:
|
||||
type: string
|
||||
edit:
|
||||
type: boolean
|
||||
fkCol:
|
||||
items:
|
||||
$ref: '#/definitions/tools.SysColumns'
|
||||
type: array
|
||||
fkLabelId:
|
||||
type: string
|
||||
fkLabelName:
|
||||
type: string
|
||||
fkTableName:
|
||||
type: string
|
||||
fkTableNameClass:
|
||||
type: string
|
||||
fkTableNamePackage:
|
||||
type: string
|
||||
goField:
|
||||
type: string
|
||||
goType:
|
||||
type: string
|
||||
htmlType:
|
||||
type: string
|
||||
increment:
|
||||
type: boolean
|
||||
insert:
|
||||
type: boolean
|
||||
isEdit:
|
||||
type: string
|
||||
isIncrement:
|
||||
type: string
|
||||
isInsert:
|
||||
type: string
|
||||
isList:
|
||||
type: string
|
||||
isPk:
|
||||
type: string
|
||||
isQuery:
|
||||
type: string
|
||||
isRequired:
|
||||
type: string
|
||||
jsonField:
|
||||
type: string
|
||||
list:
|
||||
type: string
|
||||
pk:
|
||||
type: boolean
|
||||
query:
|
||||
type: boolean
|
||||
queryType:
|
||||
type: string
|
||||
remark:
|
||||
type: string
|
||||
required:
|
||||
type: boolean
|
||||
sort:
|
||||
type: integer
|
||||
superColumn:
|
||||
type: boolean
|
||||
tableId:
|
||||
type: integer
|
||||
updateBy:
|
||||
type: integer
|
||||
updatedAt:
|
||||
type: string
|
||||
usableColumn:
|
||||
type: boolean
|
||||
type: object
|
||||
tools.SysTables:
|
||||
properties:
|
||||
businessName:
|
||||
type: string
|
||||
className:
|
||||
description: 类名
|
||||
type: string
|
||||
columns:
|
||||
items:
|
||||
$ref: '#/definitions/tools.SysColumns'
|
||||
type: array
|
||||
createBy:
|
||||
type: integer
|
||||
createdAt:
|
||||
type: string
|
||||
crud:
|
||||
type: boolean
|
||||
dataScope:
|
||||
type: string
|
||||
deletedAt:
|
||||
type: string
|
||||
functionAuthor:
|
||||
description: 功能作者
|
||||
type: string
|
||||
functionName:
|
||||
description: 功能名称
|
||||
type: string
|
||||
isActions:
|
||||
type: integer
|
||||
isAuth:
|
||||
type: integer
|
||||
isDataScope:
|
||||
type: integer
|
||||
isLogicalDelete:
|
||||
type: string
|
||||
logicalDelete:
|
||||
type: boolean
|
||||
logicalDeleteColumn:
|
||||
type: string
|
||||
moduleFrontName:
|
||||
description: 前端文件名
|
||||
type: string
|
||||
moduleName:
|
||||
description: go文件名
|
||||
type: string
|
||||
options:
|
||||
type: string
|
||||
packageName:
|
||||
description: 包名
|
||||
type: string
|
||||
params:
|
||||
$ref: '#/definitions/tools.Params'
|
||||
pkColumn:
|
||||
type: string
|
||||
pkGoField:
|
||||
type: string
|
||||
pkJsonField:
|
||||
type: string
|
||||
remark:
|
||||
type: string
|
||||
tableComment:
|
||||
description: 表备注
|
||||
type: string
|
||||
tableId:
|
||||
description: 表编码
|
||||
type: integer
|
||||
tableName:
|
||||
description: 表名称
|
||||
type: string
|
||||
tplCategory:
|
||||
type: string
|
||||
tree:
|
||||
type: boolean
|
||||
treeCode:
|
||||
type: string
|
||||
treeName:
|
||||
type: string
|
||||
treeParentCode:
|
||||
type: string
|
||||
updateBy:
|
||||
type: integer
|
||||
updatedAt:
|
||||
type: string
|
||||
type: object
|
||||
info:
|
||||
contact: {}
|
||||
description: |-
|
||||
基于Gin + Vue + Element UI的前后端分离权限管理系统的接口文档
|
||||
添加qq群: 521386980 进入技术交流群 请先star,谢谢!
|
||||
license:
|
||||
name: MIT
|
||||
url: https://github.com/go-admin-team/go-admin/blob/master/LICENSE.md
|
||||
title: go-admin API
|
||||
version: 2.0.0
|
||||
paths:
|
||||
/api/v1/app-config:
|
||||
get:
|
||||
@@ -917,6 +1103,54 @@ paths:
|
||||
summary: 获取验证码
|
||||
tags:
|
||||
- 登陆
|
||||
/api/v1/db/columns/page:
|
||||
get:
|
||||
description: 数据库表列分页列表 / database table column page list
|
||||
parameters:
|
||||
- description: tableName / 数据表名称
|
||||
in: query
|
||||
name: tableName
|
||||
type: string
|
||||
- description: pageSize / 页条数
|
||||
in: query
|
||||
name: pageSize
|
||||
type: integer
|
||||
- description: pageIndex / 页码
|
||||
in: query
|
||||
name: pageIndex
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: '{"code": 200, "data": [...]}'
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
summary: 分页列表数据 / page list data
|
||||
tags:
|
||||
- 工具 / 生成工具
|
||||
/api/v1/db/tables/page:
|
||||
get:
|
||||
description: 数据库表分页列表 / database table page list
|
||||
parameters:
|
||||
- description: tableName / 数据表名称
|
||||
in: query
|
||||
name: tableName
|
||||
type: string
|
||||
- description: pageSize / 页条数
|
||||
in: query
|
||||
name: pageSize
|
||||
type: integer
|
||||
- description: pageIndex / 页码
|
||||
in: query
|
||||
name: pageIndex
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: '{"code": 200, "data": [...]}'
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
summary: 分页列表数据 / page list data
|
||||
tags:
|
||||
- 工具 / 生成工具
|
||||
/api/v1/dept:
|
||||
delete:
|
||||
description: 删除数据
|
||||
@@ -1595,6 +1829,32 @@ paths:
|
||||
summary: 获取岗位信息
|
||||
tags:
|
||||
- 岗位
|
||||
/api/v1/public/uploadFile:
|
||||
post:
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
description: 获取JSON
|
||||
parameters:
|
||||
- description: type
|
||||
in: query
|
||||
name: type
|
||||
required: true
|
||||
type: string
|
||||
- description: file
|
||||
in: formData
|
||||
name: file
|
||||
required: true
|
||||
type: file
|
||||
responses:
|
||||
"200":
|
||||
description: '{"code": -1, "message": "添加失败"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: 上传图片
|
||||
tags:
|
||||
- 公共接口
|
||||
/api/v1/role:
|
||||
delete:
|
||||
description: 删除数据
|
||||
@@ -1730,6 +1990,19 @@ paths:
|
||||
summary: 修改用户角色
|
||||
tags:
|
||||
- 角色/Role
|
||||
/api/v1/server-monitor:
|
||||
get:
|
||||
description: 获取JSON
|
||||
responses:
|
||||
"200":
|
||||
description: '{"code": 200, "data": [...]}'
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: 系统信息
|
||||
tags:
|
||||
- 系统信息
|
||||
/api/v1/set-config:
|
||||
get:
|
||||
consumes:
|
||||
@@ -2277,6 +2550,106 @@ paths:
|
||||
summary: 修改用户数据
|
||||
tags:
|
||||
- 用户
|
||||
/api/v1/sys/tables/info:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 添加表结构
|
||||
parameters:
|
||||
- description: tableName / 数据表名称
|
||||
in: query
|
||||
name: tables
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{"code": -1, "message": "添加失败"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: 添加表结构
|
||||
tags:
|
||||
- 工具 / 生成工具
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 修改表结构
|
||||
parameters:
|
||||
- description: body
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/tools.SysTables'
|
||||
responses:
|
||||
"200":
|
||||
description: '{"code": -1, "message": "添加失败"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: 修改表结构
|
||||
tags:
|
||||
- 工具 / 生成工具
|
||||
/api/v1/sys/tables/info/{tableId}:
|
||||
delete:
|
||||
description: 删除表结构
|
||||
parameters:
|
||||
- description: tableId
|
||||
in: path
|
||||
name: tableId
|
||||
required: true
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: '{"code": -1, "message": "删除失败"}'
|
||||
schema:
|
||||
type: string
|
||||
summary: 删除表结构
|
||||
tags:
|
||||
- 工具 / 生成工具
|
||||
get:
|
||||
description: 获取JSON
|
||||
parameters:
|
||||
- description: configKey
|
||||
in: path
|
||||
name: configKey
|
||||
required: true
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: '{"code": 200, "data": [...]}'
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: 获取配置
|
||||
tags:
|
||||
- 工具 / 生成工具
|
||||
/api/v1/sys/tables/page:
|
||||
get:
|
||||
description: 生成表分页列表
|
||||
parameters:
|
||||
- description: tableName / 数据表名称
|
||||
in: query
|
||||
name: tableName
|
||||
type: string
|
||||
- description: pageSize / 页条数
|
||||
in: query
|
||||
name: pageSize
|
||||
type: integer
|
||||
- description: pageIndex / 页码
|
||||
in: query
|
||||
name: pageIndex
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: '{"code": 200, "data": [...]}'
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
summary: 分页列表数据
|
||||
tags:
|
||||
- 工具 / 生成工具
|
||||
/api/v1/user/avatar:
|
||||
post:
|
||||
consumes:
|
||||
@@ -2390,4 +2763,9 @@ paths:
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: 退出登录
|
||||
securityDefinitions:
|
||||
Bearer:
|
||||
in: header
|
||||
name: Authorization
|
||||
type: apiKey
|
||||
swagger: "2.0"
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"go-admin/cmd"
|
||||
)
|
||||
|
||||
//go:generate swag init --parseDependency --parseDepth=6
|
||||
//go:generate swag init --parseDependency --parseDepth=6 --instanceName admin -o ./docs/admin
|
||||
|
||||
// @title go-admin API
|
||||
// @version 2.0.0
|
||||
|
||||
+18
-14
@@ -1,20 +1,24 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
|
||||
{{- $bb := false -}}
|
||||
{{- range .Columns -}}
|
||||
{{$z := .IsQuery}}
|
||||
{{- if ($z) }}
|
||||
{{if eq .GoType "time.Time"}}{{- $bb = true -}}{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- range .Columns -}}
|
||||
{{if eq .GoType "time.Time"}}{{- $bb = true -}}{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if eq $bb true -}}
|
||||
"time"
|
||||
{{- end }}
|
||||
{{- $bb := false -}}
|
||||
{{- range .Columns -}}
|
||||
{{- $z := .IsQuery -}}
|
||||
{{- if ($z) -}}
|
||||
{{- if eq .GoType "time.Time" -}}{{- $bb = true -}}{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- range .Columns -}}
|
||||
{{- if eq .GoField "CreatedAt" -}}
|
||||
{{- else if eq .GoField "UpdatedAt" -}}
|
||||
{{- else if eq .GoField "DeletedAt" -}}
|
||||
{{- else -}}
|
||||
{{- if eq .GoType "time.Time" -}}{{- $bb = true -}}{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if eq $bb true }}
|
||||
"time"
|
||||
{{- end }}
|
||||
|
||||
"go-admin/app/{{.PackageName}}/models"
|
||||
"go-admin/common/dto"
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
|
||||
{{- $bb := false -}}
|
||||
{{- range .Columns -}}
|
||||
{{$z := .IsQuery}}
|
||||
{{- if ($z) }}
|
||||
{{if eq .GoType "time.Time"}}{{- $bb = true -}}{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- range .Columns -}}
|
||||
{{if eq .GoType "time.Time"}}{{- $bb = true -}}{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if eq $bb true -}}
|
||||
"time"
|
||||
{{- end }}
|
||||
{{- $bb := false -}}
|
||||
{{- range .Columns -}}
|
||||
{{- $z := .IsQuery -}}
|
||||
{{- if ($z) -}}
|
||||
{{- if eq .GoType "time.Time" -}}{{- $bb = true -}}{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- range .Columns -}}
|
||||
{{- if eq .GoField "CreatedAt" -}}
|
||||
{{- else if eq .GoField "UpdatedAt" -}}
|
||||
{{- else if eq .GoField "DeletedAt" -}}
|
||||
{{- else -}}
|
||||
{{- if eq .GoType "time.Time" -}}{{- $bb = true -}}{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if eq $bb true }}
|
||||
"time"
|
||||
{{- end }}
|
||||
|
||||
"go-admin/common/models"
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
class="delete-popconfirm"
|
||||
title="确认要修改吗?"
|
||||
confirm-button-text="修改"
|
||||
@onConfirm="handleUpdate(scope.row)"
|
||||
@confirm="handleUpdate(scope.row)"
|
||||
>
|
||||
<el-button
|
||||
slot="reference"
|
||||
@@ -137,7 +137,7 @@
|
||||
class="delete-popconfirm"
|
||||
title="确认要删除吗?"
|
||||
confirm-button-text="删除"
|
||||
@onConfirm="handleDelete(scope.row)"
|
||||
@confirm="handleDelete(scope.row)"
|
||||
>
|
||||
<el-button
|
||||
slot="reference"
|
||||
|
||||
Reference in New Issue
Block a user