Skip to content

Commit 830b5d0

Browse files
author
piexlMax(奇淼
committed
Merge branch 'refs/heads/eslint' into i18n
# Conflicts: # server/api/v1/system/auto_code_template.go # server/core/server.go # server/go.sum # server/resource/package/server/model/model.go.tpl # server/resource/package/web/view/form.vue.tpl # server/resource/package/web/view/table.vue.tpl # server/resource/plugin/web/form/form.vue.template # server/resource/plugin/web/view/view.vue.template # server/source/system/api.go # server/source/system/menu.go # web/package.json # web/src/main.js # web/src/plugin/announcement/view/info.vue # web/src/view/superAdmin/api/api.vue # web/src/view/systemTools/autoCode/index.vue # web/src/view/systemTools/autoCodeAdmin/index.vue # web/src/view/systemTools/autoPkg/autoPkg.vue # web/src/view/systemTools/exportTemplate/exportTemplate.vue
2 parents 01295f0 + 87a4ce1 commit 830b5d0

File tree

77 files changed

+1060
-323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1060
-323
lines changed

server/api/v1/system/auto_code_template.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,24 @@ func (a *AutoCodeTemplateApi) AddFunc(c *gin.Context) {
9898
response.FailWithMessage(err.Error(), c)
9999
return
100100
}
101-
err = autoCodeTemplateService.AddFunc(info)
101+
var tempMap map[string]string
102+
if info.IsPreview {
103+
info.Router = "填充router"
104+
info.FuncName = "填充funcName"
105+
info.Method = "填充method"
106+
info.Description = "填充description"
107+
tempMap, err = autoCodeTemplateService.GetApiAndServer(info)
108+
} else {
109+
err = autoCodeTemplateService.AddFunc(info)
110+
}
102111
if err != nil {
103112
global.GVA_LOG.Error(global.Translate("sys_auto_code.injectFail"), zap.Error(err))
104113
response.FailWithMessage(global.Translate("sys_auto_code.injectFail"), c)
105114
} else {
106-
response.OkWithMessage(global.Translate("sys_auto_code.injectSuccess"), c)
115+
if info.IsPreview {
116+
response.OkWithMessage(global.Translate("sys_auto_code.injectSuccess"), c)
117+
return
118+
}
119+
response.OkWithMessage("注入成功", c)
107120
}
108121
}

server/config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,16 @@ qiniu:
194194
secret-key: ""
195195
use-cdn-domains: false
196196

197+
# minio oss configuration
198+
minio:
199+
endpoint: yourEndpoint
200+
access-key-id: yourAccessKeyId
201+
access-key-secret: yourAccessKeySecret
202+
bucket-name: yourBucketName
203+
use-ssl: false
204+
base-path: ""
205+
bucket-url: "http://host:9000/yourBucketName"
206+
197207
# aliyun oss configuration
198208
aliyun-oss:
199209
endpoint: yourEndpoint

server/config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ type Server struct {
2626
TencentCOS TencentCOS `mapstructure:"tencent-cos" json:"tencent-cos" yaml:"tencent-cos"`
2727
AwsS3 AwsS3 `mapstructure:"aws-s3" json:"aws-s3" yaml:"aws-s3"`
2828
CloudflareR2 CloudflareR2 `mapstructure:"cloudflare-r2" json:"cloudflare-r2" yaml:"cloudflare-r2"`
29+
Minio Minio `mapstructure:"minio" json:"minio" yaml:"minio"`
2930

3031
Excel Excel `mapstructure:"excel" json:"excel" yaml:"excel"`
3132

server/config/oss_minio.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package config
2+
3+
type Minio struct {
4+
Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"`
5+
AccessKeyId string `mapstructure:"access-key-id" json:"access-key-id" yaml:"access-key-id"`
6+
AccessKeySecret string `mapstructure:"access-key-secret" json:"access-key-secret" yaml:"access-key-secret"`
7+
BucketName string `mapstructure:"bucket-name" json:"bucket-name" yaml:"bucket-name"`
8+
UseSSL bool `mapstructure:"use-ssl" json:"use-ssl" yaml:"use-ssl"`
9+
BasePath string `mapstructure:"base-path" json:"base-path" yaml:"base-path"`
10+
BucketUrl string `mapstructure:"bucket-url" json:"bucket-url" yaml:"bucket-url"`
11+
}

server/core/server.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package core
22

33
import (
44
"fmt"
5-
65
"github.com/flipped-aurora/gin-vue-admin/server/global"
76
"github.com/flipped-aurora/gin-vue-admin/server/initialize"
87
"github.com/flipped-aurora/gin-vue-admin/server/service/system"
@@ -40,7 +39,7 @@ func RunWindowsServer() {
4039

4140
fmt.Printf(`
4241
%s gin-vue-admin
43-
%s: v2.7.6
42+
%s: v2.7.7
4443
%s
4544
%s: https://github.com/flipped-aurora/gin-vue-admin
4645
%s: https://plugin.gin-vue-admin.com

server/docs/docs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8087,7 +8087,7 @@ const docTemplate = `{
80878087

80888088
// SwaggerInfo holds exported Swagger Info so clients can modify it
80898089
var SwaggerInfo = &swag.Spec{
8090-
Version: "v2.7.6",
8090+
Version: "v2.7.7",
80918091
Host: "",
80928092
BasePath: "",
80938093
Schemes: []string{},

server/docs/swagger.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "使用gin+vue进行极速开发的全栈开发基础平台",
55
"title": "Gin-Vue-Admin Swagger API接口文档",
66
"contact": {},
7-
"version": "v2.7.6"
7+
"version": "v2.7.7"
88
},
99
"paths": {
1010
"/api/createApi": {

server/docs/swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ info:
16341634
contact: {}
16351635
description: 使用gin+vue进行极速开发的全栈开发基础平台
16361636
title: Gin-Vue-Admin Swagger API接口文档
1637-
version: v2.7.6
1637+
version: v2.7.7
16381638
paths:
16391639
/api/createApi:
16401640
post:

server/go.mod

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ require (
2121
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.24.9+incompatible
2222
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible
2323
github.com/mholt/archiver/v4 v4.0.0-alpha.8
24+
github.com/minio/minio-go/v7 v7.0.78
2425
github.com/mojocn/base64Captcha v1.3.6
2526
github.com/nicksnyder/go-i18n/v2 v2.2.0
2627
github.com/otiai10/copy v1.14.0
@@ -81,6 +82,7 @@ require (
8182
github.com/gammazero/toposort v0.1.1 // indirect
8283
github.com/gin-contrib/sse v0.1.0 // indirect
8384
github.com/glebarez/go-sqlite v1.22.0 // indirect
85+
github.com/go-ini/ini v1.67.0 // indirect
8486
github.com/go-ole/go-ole v1.3.0 // indirect
8587
github.com/go-openapi/jsonpointer v0.21.0 // indirect
8688
github.com/go-openapi/jsonreference v0.21.0 // indirect
@@ -118,6 +120,7 @@ require (
118120
github.com/mailru/easyjson v0.7.7 // indirect
119121
github.com/mattn/go-isatty v0.0.20 // indirect
120122
github.com/microsoft/go-mssqldb v1.7.2 // indirect
123+
github.com/minio/md5-simd v1.1.2 // indirect
121124
github.com/mitchellh/mapstructure v1.5.0 // indirect
122125
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
123126
github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -134,6 +137,7 @@ require (
134137
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
135138
github.com/richardlehane/mscfb v1.0.4 // indirect
136139
github.com/richardlehane/msoleps v1.0.4 // indirect
140+
github.com/rs/xid v1.6.0 // indirect
137141
github.com/sagikazarmark/locafero v0.6.0 // indirect
138142
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
139143
github.com/shoenig/go-m1cpu v0.1.6 // indirect

server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
//go:generate go mod download
1616

1717
// @title Gin-Vue-Admin Swagger API接口文档
18-
// @version v2.7.6
18+
// @version v2.7.7
1919
// @description 使用gin+vue进行极速开发的全栈开发基础平台
2020
// @securityDefinitions.apikey ApiKeyAuth
2121
// @in header

0 commit comments

Comments
 (0)