2.7.1版本提交 (#1844)
* feature:表格模板自动化生成 (#1841) * feature: 为导出模板增加自动化功能 * feature: 视频按钮修改 * feature: 发布2.7.1Beta版本,视频集中处理。 --------- Co-authored-by: krank <emosick@qq.com>
This commit is contained in:
@@ -51,8 +51,19 @@ func (autoApi *AutoCodeApi) GetDB(c *gin.Context) {
|
||||
// @Success 200 {object} response.Response{data=map[string]interface{},msg=string} "获取当前数据库所有表"
|
||||
// @Router /autoCode/getTables [get]
|
||||
func (autoApi *AutoCodeApi) GetTables(c *gin.Context) {
|
||||
dbName := c.DefaultQuery("dbName", global.GVA_CONFIG.Mysql.Dbname)
|
||||
dbName := c.Query("dbName")
|
||||
businessDB := c.Query("businessDB")
|
||||
if dbName == "" {
|
||||
dbName = global.GVA_CONFIG.Mysql.Dbname
|
||||
if businessDB != "" {
|
||||
for _, db := range global.GVA_CONFIG.DBList {
|
||||
if db.AliasName == businessDB {
|
||||
dbName = db.Dbname
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tables, err := autoCodeService.Database(businessDB).GetTables(businessDB, dbName)
|
||||
if err != nil {
|
||||
global.GVA_LOG.Error("查询table失败!", zap.Error(err))
|
||||
@@ -72,7 +83,17 @@ func (autoApi *AutoCodeApi) GetTables(c *gin.Context) {
|
||||
// @Router /autoCode/getColumn [get]
|
||||
func (autoApi *AutoCodeApi) GetColumn(c *gin.Context) {
|
||||
businessDB := c.Query("businessDB")
|
||||
dbName := c.DefaultQuery("dbName", global.GVA_CONFIG.Mysql.Dbname)
|
||||
dbName := c.Query("dbName")
|
||||
if dbName == "" {
|
||||
dbName = global.GVA_CONFIG.Mysql.Dbname
|
||||
if businessDB != "" {
|
||||
for _, db := range global.GVA_CONFIG.DBList {
|
||||
if db.AliasName == businessDB {
|
||||
dbName = db.Dbname
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tableName := c.Query("tableName")
|
||||
columns, err := autoCodeService.Database(businessDB).GetColumn(businessDB, tableName, dbName)
|
||||
if err != nil {
|
||||
|
@@ -38,7 +38,7 @@ func RunWindowsServer() {
|
||||
|
||||
fmt.Printf(`
|
||||
欢迎使用 gin-vue-admin
|
||||
当前版本:v2.7.0
|
||||
当前版本:v2.7.1
|
||||
加群方式:微信号:shouzi_1994 QQ群:470239250
|
||||
项目地址:https://github.com/flipped-aurora/gin-vue-admin
|
||||
插件市场:https://plugin.gin-vue-admin.com
|
||||
|
@@ -8087,7 +8087,7 @@ const docTemplate = `{
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = &swag.Spec{
|
||||
Version: "v2.7.0",
|
||||
Version: "v2.7.1",
|
||||
Host: "",
|
||||
BasePath: "",
|
||||
Schemes: []string{},
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"description": "使用gin+vue进行极速开发的全栈开发基础平台",
|
||||
"title": "Gin-Vue-Admin Swagger API接口文档",
|
||||
"contact": {},
|
||||
"version": "v2.7.0"
|
||||
"version": "v2.7.1"
|
||||
},
|
||||
"paths": {
|
||||
"/api/createApi": {
|
||||
|
@@ -1634,7 +1634,7 @@ info:
|
||||
contact: {}
|
||||
description: 使用gin+vue进行极速开发的全栈开发基础平台
|
||||
title: Gin-Vue-Admin Swagger API接口文档
|
||||
version: v2.7.0
|
||||
version: v2.7.1
|
||||
paths:
|
||||
/api/createApi:
|
||||
post:
|
||||
|
@@ -15,7 +15,7 @@ import (
|
||||
//go:generate go mod download
|
||||
|
||||
// @title Gin-Vue-Admin Swagger API接口文档
|
||||
// @version v2.7.0
|
||||
// @version v2.7.1
|
||||
// @description 使用gin+vue进行极速开发的全栈开发基础平台
|
||||
// @securityDefinitions.apikey ApiKeyAuth
|
||||
// @in header
|
||||
|
Reference in New Issue
Block a user