Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不一定要合并 简单的实现了一个测试版本的服用已经删除自动化生成的文件保留自己写的代码部分 gvakeepcode的示例 #1722

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
35b7850
点击跳转代码插件修复websotrm bug
xue-ding-e Apr 14, 2024
007f45c
不要merge!添加功能自动化删除代码和复用代码的时候保留自写代码到文件末尾
xue-ding-e Apr 15, 2024
565f0b6
Merge branch 'flipped-aurora:main' into main
xue-ding-e Apr 15, 2024
1ecfcdc
点击跳转代码插件修复websotrm bug
xue-ding-e Apr 14, 2024
2365944
Merge branch 'flipped-aurora:main' into main
xue-ding-e Apr 17, 2024
45cceb9
Merge branch 'flipped-aurora:main' into xuedinge
xue-ding-e Apr 17, 2024
9a03790
引入sqlite3(临时用)
xue-ding-e Apr 17, 2024
729eea6
增加初始化自动创建rm_file文件夹(临时用)
xue-ding-e Apr 17, 2024
3416173
后端保留代码规范records记录表在gva连接的数据库中
xue-ding-e Apr 21, 2024
03a61d7
后端保留代码规范records记录表在gva连接的数据库中
xue-ding-e Apr 21, 2024
1982c40
1
xue-ding-e Apr 21, 2024
8432f9a
删除多余注释
xue-ding-e Apr 21, 2024
1705d6d
gvakeepcode忘记自动注册表了
xue-ding-e Apr 21, 2024
20d9c80
表单选择器默认是使用日期+时间 (之前默认是只有日期)
xue-ding-e Apr 22, 2024
1443ca4
Merge branch 'flipped-aurora:main' into main
xue-ding-e Apr 23, 2024
e7533e4
Merge branch 'flipped-aurora:main' into xuedinge
xue-ding-e Apr 23, 2024
1c87570
Merge branch 'flipped-aurora:main' into main
xue-ding-e Apr 26, 2024
7496b3f
Merge branch 'flipped-aurora:main' into xuedinge
xue-ding-e Apr 26, 2024
9919e8e
更改模板文件的table表头为可以调整宽度
xue-ding-e Apr 26, 2024
0d9c1a6
Merge remote-tracking branch 'origin/xuedinge' into xuedinge
xue-ding-e Apr 26, 2024
32087b8
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 9, 2024
c52326c
Merge branch 'main' into xuedinge
xue-ding-e May 9, 2024
a1e1ff2
增加int64和uint(默认id类型)
xue-ding-e May 9, 2024
5b905c9
自动化创建代码增加int64和uint(默认id类型)
xue-ding-e May 9, 2024
798d8b8
Merge pull request #2 from flipped-aurora/main
xue-ding-e May 10, 2024
aa5cc8d
Merge branch 'flipped-aurora:main' into xuedinge
xue-ding-e May 10, 2024
0eba720
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 15, 2024
c9458f7
Merge branch 'flipped-aurora:main' into xuedinge
xue-ding-e May 15, 2024
b36cdbb
删除指纹
xue-ding-e May 15, 2024
a88dcdf
删除指纹和增加个人信息
xue-ding-e May 16, 2024
bcfa2bd
icon替换
xue-ding-e May 16, 2024
d18b91b
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 16, 2024
4808058
Merge branch 'flipped-aurora:main' into xuedinge
xue-ding-e May 16, 2024
f93655d
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 16, 2024
9a9d5c1
Merge branch 'flipped-aurora:main' into xuedinge
xue-ding-e May 16, 2024
c65eda1
icon替换
xue-ding-e May 16, 2024
0fe90fa
Merge remote-tracking branch 'origin/xuedinge' into xuedinge
xue-ding-e May 16, 2024
b47eff1
自动化跳转代码默认改为webstorm
xue-ding-e May 16, 2024
f2fb475
个人官网路由
xue-ding-e May 16, 2024
dfcf47e
默认管理员用户NickName
xue-ding-e May 16, 2024
9bd3062
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 21, 2024
4447b67
Merge branch 'flipped-aurora:main' into xuedinge
xue-ding-e May 21, 2024
92b9c4d
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 22, 2024
6ff5c0f
Merge branch 'flipped-aurora:main' into xuedinge
xue-ding-e May 22, 2024
ac5d48d
gitignore添加rm_file文件夹
xue-ding-e May 22, 2024
ac5fb30
前端自动创建表单添加可拖动调整间距(之前位置错误)
xue-ding-e May 22, 2024
08f8e85
删除selectImage.vue中chooseImg下多余的console.log(url)
xue-ding-e May 24, 2024
ddc87a6
Revert "自动化创建代码增加int64和uint(默认id类型)"
xue-ding-e May 24, 2024
30bf327
Revert "删除selectImage.vue中chooseImg下多余的console.log(url)"
xue-ding-e May 26, 2024
1e0ba04
删除selectImage.vue中chooseImg下多余的console.log(url)
xue-ding-e May 26, 2024
af0196c
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 26, 2024
b2bf5fe
Merge branch 'xuedinge' into xuedinge-1
xue-ding-e May 26, 2024
c756032
Merge pull request #3 from xue-ding-e/xuedinge-1
xue-ding-e May 26, 2024
92a846c
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 30, 2024
615c695
Merge branch 'flipped-aurora:main' into xuedinge
xue-ding-e May 30, 2024
041a8f4
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jun 4, 2024
f2ed0ad
Merge branch 'main' into xuedinge
xue-ding-e Jun 4, 2024
7b2225d
增加package页面修改展示名字/描述内容
xue-ding-e Jun 4, 2024
d73983d
临时保存package.json
xue-ding-e Jun 5, 2024
dcfc598
Revert "临时保存package.json"
xue-ding-e Jun 5, 2024
0ce933b
授权信息相关(delete)
xue-ding-e Jun 5, 2024
6f27632
Merge branch 'flipped-aurora:main' into xuedinge
xue-ding-e Jun 9, 2024
0cbf627
自动化代码生成前端模板文件样式调整(居中)
xue-ding-e Jun 11, 2024
e52038e
Merge branch 'flipped-aurora:main' into xuedinge
xue-ding-e Jun 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.idea/
/web/node_modules
/web/dist

rm_file/
.DS_Store

# local env files
Expand Down
170 changes: 170 additions & 0 deletions server/api/v1/system/sys_auto_code.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
package system

import (
"bufio"
"errors"
"fmt"
"net/url"
"os"
"path/filepath"
"regexp"
"strings"

"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/system"
sysReq "github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
"github.com/flipped-aurora/gin-vue-admin/server/utils"

"github.com/gin-gonic/gin"
Expand Down Expand Up @@ -90,6 +97,113 @@ func (autoApi *AutoCodeApi) CreateTemp(c *gin.Context) {
}
c.Writer.Header().Add("Content-Type", "application/json")
c.Writer.Header().Add("success", "true")
if a.AutoKeepCode {
var records []system.RecordsDeleteCode
result := global.GVA_DB.Table("records").Select("path", "file", "update_time").Find(&records)
// 从 records 表中获取被删除的代码文件的路径和文件名
if result.Error != nil {
global.GVA_LOG.Error("无任何删除记录!", zap.Error(result.Error))
response.FailWithMessage("无任何删除记录", c)
return
}

for _, record := range records {
srcFile := record.Path
file := record.File

// destFile 是新创建的文件的路径
destFile := filepath.Join(global.GVA_CONFIG.AutoCode.Root, file)
// 检查新文件的路径是否存在
if _, err := os.Stat(destFile); err == nil {
if err := extractAndAppendCodeBlocks(srcFile, destFile); err != nil {
global.GVA_LOG.Error("提取代码块失败!", zap.Error(err))
response.FailWithMessage("提取代码块失败", c)
return
}
// 删除数据库中的记录
result := global.GVA_DB.Where("path = ? AND file = ?", srcFile, file).Delete(&system.RecordsDeleteCode{})
if result.Error != nil {
global.GVA_LOG.Error("删除记录失败!", zap.Error(result.Error))
response.FailWithMessage("删除记录失败", c)
return
}
}
}
}
}

// 提取rm_file(删除文件存放)代码文件中的标记代码段,添加到目标文件末尾,如果目标文件不存在则自动创建
func extractAndAppendCodeBlocks(srcFile, destFile string) error {

source, err := os.Open(srcFile)
if err != nil {
return err
}
defer source.Close()

// 检查目标文件是否存在,如果不存在则创建
dest, err := os.OpenFile(destFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
return err
}
defer dest.Close()

scanner := bufio.NewScanner(source)
writer := bufio.NewWriter(dest)
defer writer.Flush()

keepWriting := false
nestCount := 0

for scanner.Scan() {
line := scanner.Text()
trimmedLine := strings.TrimSpace(line)

if isStartTag(trimmedLine) {
nestCount++
if nestCount == 1 {
keepWriting = true
}
}

if keepWriting {
_, err = writer.WriteString(line + "\n")
if err != nil {
return err
}
}

if isEndTag(trimmedLine) {
if nestCount > 0 {
nestCount--
}
if nestCount == 0 {
keepWriting = false
}
}
}

if err := scanner.Err(); err != nil {
return err
}

if nestCount != 0 {
return errors.New("发现未匹配的标签")
}

return nil
}

// isStartTag 检查一行是否包含开始标签。
func isStartTag(line string) bool {
match, _ := regexp.MatchString(`^\s*//\s*@gvastartkeep\s*$`, line)
return match
}

// isEndTag 检查一行是否包含结束标签。
func isEndTag(line string) bool {
match, _ := regexp.MatchString(`^\s*//\s*@gvaendkeep\s*$`, line)
return match
}

// GetDB
Expand Down Expand Up @@ -193,6 +307,34 @@ func (autoApi *AutoCodeApi) CreatePackage(c *gin.Context) {
}
}

// UpdatePackage
// @Tags AutoCode
// @Summary 更新package展示名字/描述
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body system.SysAutoCode true "更新package"
// @Success 200 {object} response.Response{data=map[string]interface{},msg=string} "更新package成功"
// @Router /autoCode/updatePackageDetail [post]
func (autoApi *AutoCodeApi) UpdatePackageDetail(c *gin.Context) {
var a sysReq.SysAutoCode
var autoCode system.SysAutoCode
_ = c.ShouldBindJSON(&a)
if err := global.GVA_DB.Where("id = ?", a.ID).First(&autoCode).Error; err != nil {
response.FailWithMessage("获取package失败", c)
return
}
// 更新展示名字/描述
autoCode.Label = a.Label
autoCode.Desc = a.Desc
if err := global.GVA_DB.Save(&autoCode).Error; err != nil {
global.GVA_LOG.Error("更新失败!", zap.Error(err))
response.FailWithMessage("更新失败", c)
} else {
response.OkWithMessage("更新成功", c)
}
}

// GetPackage
// @Tags AutoCode
// @Summary 获取package
Expand All @@ -211,6 +353,34 @@ func (autoApi *AutoCodeApi) GetPackage(c *gin.Context) {
}
}

// auto_code_api.go

// GetPackageByID
// @Tags AutoCode
// @Summary 根据ID获取package
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param id body int true "package ID"
// @Success 200 {object} response.Response{data=system.SysAutoCode,msg=string} "根据ID获取package成功"
// @Router /autoCode/getPackageByID/ POST
func (autoApi *AutoCodeApi) GetPackageById(c *gin.Context) {
var pkgId request.GetById
err := c.ShouldBindJSON(&pkgId)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
var autoCode system.SysAutoCode
fmt.Printf("pkgId%+v", pkgId)
if err := global.GVA_DB.First(&autoCode, pkgId).Error; err != nil {
global.GVA_LOG.Error("获取失败!", zap.Error(err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithDetailed(gin.H{"pkg": autoCode}, "获取成功", c)
}
}

// DelPackage
// @Tags AutoCode
// @Summary 删除package
Expand Down
2 changes: 1 addition & 1 deletion server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ require (
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.6.0 // indirect
modernc.org/sqlite v1.23.0 // indirect
)
)
2 changes: 1 addition & 1 deletion server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -935,4 +935,4 @@ nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
1 change: 1 addition & 0 deletions server/initialize/gorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func RegisterTables() {
system.SysExportTemplate{},
system.Condition{},
system.JoinTemplate{},
system.RecordsDeleteCode{},

example.ExaFile{},
example.ExaCustomer{},
Expand Down
1 change: 1 addition & 0 deletions server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ func main() {
db, _ := global.GVA_DB.DB()
defer db.Close()
}

core.RunWindowsServer()
}
7 changes: 7 additions & 0 deletions server/model/system/request/sys_auto_code.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package request

type SysAutoCode struct {
ID uint `gorm:"primarykey" json:"ID"` // 主键ID
Label string `json:"label" gorm:"comment:展示名"`
Desc string `json:"desc" gorm:"comment:描述"`
}
1 change: 1 addition & 0 deletions server/model/system/sys_auto_code.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type AutoCodeStruct struct {
AutoCreateResource bool `json:"autoCreateResource"` // 是否自动创建资源标识
BusinessDB string `json:"businessDB"` // 业务数据库
GvaModel bool `json:"gvaModel"` // 是否使用gva默认Model
AutoKeepCode bool `json:"autoKeepCode"`
Fields []*Field `json:"fields"`
PrimaryField *Field `json:"primaryField"`
HasTimer bool `json:"-"`
Expand Down
12 changes: 12 additions & 0 deletions server/model/system/sys_autocode_history.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package system
import (
"strconv"
"strings"
"time"

"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
Expand Down Expand Up @@ -39,3 +40,14 @@ func (m *SysAutoCodeHistory) ToRequestIds() request.IdsReq {
}
return request.IdsReq{Ids: ids}
}

// 记录删除文件的路径
type RecordsDeleteCode struct {
Path string `gorm:"type:text;comment:已删除文件保存路径"`
File string `gorm:"type:text;comment:新生成文件路径"`
UpdateTime time.Time `gorm:"type:datetime;comment:更新时间"`
}

func (RecordsDeleteCode) TableName() string {
return "records"
}
2 changes: 1 addition & 1 deletion server/resource/autocode_template/web/form.vue.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<el-input v-model.number="formData.{{ .FieldJson }}" :clearable="{{.Clearable}}" placeholder="请输入" />
{{- end }}
{{- if eq .FieldType "time.Time" }}
<el-date-picker v-model="formData.{{ .FieldJson }}" type="date" placeholder="选择日期" :clearable="{{.Clearable}}"></el-date-picker>
<el-date-picker v-model="formData.{{ .FieldJson }}" type="datetime" placeholder="选择日期" :clearable="{{.Clearable}}"></el-date-picker>
{{- end }}
{{- if eq .FieldType "float64" }}
<el-input-number v-model="formData.{{ .FieldJson }}" :precision="2" :clearable="{{.Clearable}}"></el-input-number>
Expand Down
17 changes: 9 additions & 8 deletions server/resource/autocode_template/web/table.vue.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,20 @@
:data="tableData"
row-key="{{.PrimaryField.FieldJson}}"
@selection-change="handleSelectionChange"
border resizeable
{{- if .NeedSort}}
@sort-change="sortChange"
{{- end}}
>
<el-table-column type="selection" width="55" />
<el-table-column align="center" type="selection" width="55" />
{{ if .GvaModel }}
<el-table-column align="left" label="日期" prop="createdAt" width="180">
<el-table-column align="center" label="日期" prop="createdAt" width="180">
<template #default="scope">{{ "{{ formatDate(scope.row.CreatedAt) }}" }}</template>
</el-table-column>
{{ end }}
{{- range .FrontFields}}
{{- if .CheckDataSource }}
<el-table-column {{- if .Sort}} sortable{{- end}} align="left" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
<el-table-column {{- if .Sort}} sortable{{- end}} align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
<template #default="scope">
{{if eq .DataSource.Association 2}}
<el-tag v-for="(item,key) in filterDataSource(dataSource.{{.FieldJson}},scope.row.{{.FieldJson}})" :key="key">
Expand All @@ -117,17 +118,17 @@
</template>
</el-table-column>
{{- else if .DictType}}
<el-table-column {{- if .Sort}} sortable{{- end}} align="left" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
<el-table-column {{- if .Sort}} sortable{{- end}} align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
<template #default="scope">
{{"{{"}} filterDict(scope.row.{{.FieldJson}},{{.DictType}}Options) {{"}}"}}
</template>
</el-table-column>
{{- else if eq .FieldType "bool" }}
<el-table-column {{- if .Sort}} sortable{{- end}} align="left" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
<el-table-column {{- if .Sort}} sortable{{- end}} align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
<template #default="scope">{{"{{"}} formatBoolean(scope.row.{{.FieldJson}}) {{"}}"}}</template>
</el-table-column>
{{- else if eq .FieldType "time.Time" }}
<el-table-column {{- if .Sort}} sortable{{- end}} align="left" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="180">
<el-table-column {{- if .Sort}} sortable{{- end}} align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="180">
<template #default="scope">{{"{{"}} formatDate(scope.row.{{.FieldJson}}) {{"}}"}}</template>
</el-table-column>
{{- else if eq .FieldType "picture" }}
Expand Down Expand Up @@ -177,7 +178,7 @@
</template>
</el-table-column>
{{- else }}
<el-table-column {{- if .Sort}} sortable{{- end}} align="left" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120" />
<el-table-column {{- if .Sort}} sortable{{- end}} align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120" />
{{- end }}
{{- end }}
<el-table-column align="left" label="操作" fixed="right" min-width="240">
Expand Down Expand Up @@ -246,7 +247,7 @@
<el-input v-model.number="formData.{{ .FieldJson }}" :clearable="{{.Clearable}}" placeholder="请输入{{.FieldDesc}}" />
{{- end }}
{{- if eq .FieldType "time.Time" }}
<el-date-picker v-model="formData.{{ .FieldJson }}" type="date" style="width:100%" placeholder="选择日期" :clearable="{{.Clearable}}" />
<el-date-picker v-model="formData.{{ .FieldJson }}" type="datetime" style="width:100%" placeholder="选择日期" :clearable="{{.Clearable}}" />
{{- end }}
{{- if eq .FieldType "float64" }}
<el-input-number v-model="formData.{{ .FieldJson }}" style="width:100%" :precision="2" :clearable="{{.Clearable}}" />
Expand Down
24 changes: 13 additions & 11 deletions server/router/system/sys_auto_code.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ func (s *AutoCodeRouter) InitAutoCodeRouter(Router *gin.RouterGroup) {
autoCodeRouter := Router.Group("autoCode")
autoCodeApi := v1.ApiGroupApp.SystemApiGroup.AutoCodeApi
{
autoCodeRouter.GET("getDB", autoCodeApi.GetDB) // 获取数据库
autoCodeRouter.GET("getTables", autoCodeApi.GetTables) // 获取对应数据库的表
autoCodeRouter.GET("getColumn", autoCodeApi.GetColumn) // 获取指定表所有字段信息
autoCodeRouter.POST("preview", autoCodeApi.PreviewTemp) // 获取自动创建代码预览
autoCodeRouter.POST("createTemp", autoCodeApi.CreateTemp) // 创建自动化代码
autoCodeRouter.POST("createPackage", autoCodeApi.CreatePackage) // 创建package包
autoCodeRouter.POST("getPackage", autoCodeApi.GetPackage) // 获取package包
autoCodeRouter.POST("delPackage", autoCodeApi.DelPackage) // 删除package包
autoCodeRouter.POST("createPlug", autoCodeApi.AutoPlug) // 自动插件包模板
autoCodeRouter.POST("installPlugin", autoCodeApi.InstallPlugin) // 自动安装插件
autoCodeRouter.POST("pubPlug", autoCodeApi.PubPlug) // 打包插件
autoCodeRouter.GET("getDB", autoCodeApi.GetDB) // 获取数据库
autoCodeRouter.GET("getTables", autoCodeApi.GetTables) // 获取对应数据库的表
autoCodeRouter.GET("getColumn", autoCodeApi.GetColumn) // 获取指定表所有字段信息
autoCodeRouter.POST("preview", autoCodeApi.PreviewTemp) // 获取自动创建代码预览
autoCodeRouter.POST("createTemp", autoCodeApi.CreateTemp) // 创建自动化代码
autoCodeRouter.POST("createPackage", autoCodeApi.CreatePackage) // 创建package包
autoCodeRouter.POST("updatePackageDetail", autoCodeApi.UpdatePackageDetail) // 修改package包展示名/描述
autoCodeRouter.POST("getPackage", autoCodeApi.GetPackage) // 获取package包
autoCodeRouter.POST("getPackageById", autoCodeApi.GetPackageById) // 获取package包
autoCodeRouter.POST("delPackage", autoCodeApi.DelPackage) // 删除package包
autoCodeRouter.POST("createPlug", autoCodeApi.AutoPlug) // 自动插件包模板
autoCodeRouter.POST("installPlugin", autoCodeApi.InstallPlugin) // 自动安装插件
autoCodeRouter.POST("pubPlug", autoCodeApi.PubPlug) // 打包插件
}
}