Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
8528e2b7
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
9 个月 前同步成功
通知
324
Star
18154
Fork
5505
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8528e2b7
编写于
8月 09, 2022
作者:
D
dhb52
提交者:
songzhibin97
8月 11, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
banckend style-fix
上级
5205db24
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
17 addition
and
17 deletion
+17
-17
server/api/v1/enter.go
server/api/v1/enter.go
+2
-2
server/api/v1/example/exa_excel.go
server/api/v1/example/exa_excel.go
+3
-2
server/api/v1/system/sys_auto_code.go
server/api/v1/system/sys_auto_code.go
+5
-4
server/api/v1/system/sys_initdb.go
server/api/v1/system/sys_initdb.go
+0
-1
server/initialize/internal/gorm.go
server/initialize/internal/gorm.go
+0
-2
server/model/system/request/sys_auto_history.go
server/model/system/request/sys_auto_history.go
+1
-1
server/model/system/sys_auto_code.go
server/model/system/sys_auto_code.go
+3
-2
server/router/enter.go
server/router/enter.go
+2
-2
server/service/system/sys_auto_code.go
server/service/system/sys_auto_code.go
+1
-1
未找到文件。
server/api/v1/enter.go
浏览文件 @
8528e2b7
...
...
@@ -6,8 +6,8 @@ import (
)
type
ApiGroup
struct
{
SystemApiGroup
system
.
ApiGroup
ExampleApiGroup
example
.
ApiGroup
SystemApiGroup
system
.
ApiGroup
ExampleApiGroup
example
.
ApiGroup
}
var
ApiGroupApp
=
new
(
ApiGroup
)
server/api/v1/example/exa_excel.go
浏览文件 @
8528e2b7
package
example
import
(
"os"
"strings"
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
"github.com/flipped-aurora/gin-vue-admin/server/model/example"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"os"
"strings"
)
type
ExcelApi
struct
{}
...
...
server/api/v1/system/sys_auto_code.go
浏览文件 @
8528e2b7
...
...
@@ -3,15 +3,16 @@ package system
import
(
"errors"
"fmt"
"net/url"
"os"
"strings"
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
"github.com/flipped-aurora/gin-vue-admin/server/utils"
"golang.org/x/text/cases"
"golang.org/x/text/language"
"net/url"
"os"
"strings"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
...
...
@@ -79,7 +80,7 @@ func (autoApi *AutoCodeApi) CreateTemp(c *gin.Context) {
a
.
PackageT
=
caser
.
String
(
a
.
Package
)
err
:=
autoCodeService
.
CreateTemp
(
a
,
apiIds
...
)
if
err
!=
nil
{
if
errors
.
Is
(
err
,
system
.
AutoMoveErr
)
{
if
errors
.
Is
(
err
,
system
.
ErrAutoMove
)
{
c
.
Writer
.
Header
()
.
Add
(
"success"
,
"true"
)
c
.
Writer
.
Header
()
.
Add
(
"msg"
,
url
.
QueryEscape
(
err
.
Error
()))
}
else
{
...
...
server/api/v1/system/sys_initdb.go
浏览文件 @
8528e2b7
...
...
@@ -56,5 +56,4 @@ func (i *DBApi) CheckDB(c *gin.Context) {
}
global
.
GVA_LOG
.
Info
(
message
)
response
.
OkWithDetailed
(
gin
.
H
{
"needInit"
:
needInit
},
message
,
c
)
return
}
server/initialize/internal/gorm.go
浏览文件 @
8528e2b7
...
...
@@ -31,10 +31,8 @@ func (g *_gorm) Config() *gorm.Config {
switch
global
.
GVA_CONFIG
.
System
.
DbType
{
case
"mysql"
:
logMode
=
&
global
.
GVA_CONFIG
.
Mysql
break
case
"pgsql"
:
logMode
=
&
global
.
GVA_CONFIG
.
Pgsql
break
default
:
logMode
=
&
global
.
GVA_CONFIG
.
Mysql
}
...
...
server/model/system/request/sys_auto_history.go
浏览文件 @
8528e2b7
...
...
@@ -8,6 +8,6 @@ type SysAutoHistory struct {
// GetById Find by id structure
type
RollBack
struct
{
ID
int
`json:"id" form:"id"`
// 主键ID
ID
int
`json:"id" form:"id"`
// 主键ID
DeleteTable
bool
`json:"deleteTable" form:"deleteTable"`
// 是否删除表
}
server/model/system/sys_auto_code.go
浏览文件 @
8528e2b7
...
...
@@ -2,9 +2,10 @@ package system
import
(
"errors"
"github.com/flipped-aurora/gin-vue-admin/server/global"
"go/token"
"strings"
"github.com/flipped-aurora/gin-vue-admin/server/global"
)
// AutoCodeStruct 初始版本自动化代码工具
...
...
@@ -61,7 +62,7 @@ type Field struct {
Clearable
bool
`json:"clearable"`
// 是否可清空
}
var
AutoMoveErr
error
=
errors
.
New
(
"创建代码成功并移动文件成功"
)
var
ErrAutoMove
error
=
errors
.
New
(
"创建代码成功并移动文件成功"
)
type
SysAutoCode
struct
{
global
.
GVA_MODEL
...
...
server/router/enter.go
浏览文件 @
8528e2b7
...
...
@@ -6,8 +6,8 @@ import (
)
type
RouterGroup
struct
{
System
system
.
RouterGroup
Example
example
.
RouterGroup
System
system
.
RouterGroup
Example
example
.
RouterGroup
}
var
RouterGroupApp
=
new
(
RouterGroup
)
server/service/system/sys_auto_code.go
浏览文件 @
8528e2b7
...
...
@@ -360,7 +360,7 @@ func (autoCodeService *AutoCodeService) CreateTemp(autoCode system.AutoCodeStruc
return
err
}
if
autoCode
.
AutoMoveFile
{
return
system
.
AutoMoveErr
return
system
.
ErrAutoMove
}
return
nil
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录