From 1ecfcdcdd2f43dae6e30ea8d54785a74126910c8 Mon Sep 17 00:00:00 2001
From: xuedinge <781408517@qq.com>
Date: Sun, 14 Apr 2024 21:15:03 +0800
Subject: [PATCH 01/15] =?UTF-8?q?=E7=82=B9=E5=87=BB=E8=B7=B3=E8=BD=AC?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=92=E4=BB=B6=E4=BF=AE=E5=A4=8Dwebsotrm?=
=?UTF-8?q?=20bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/vitePlugin/codeServer/index.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/web/vitePlugin/codeServer/index.js b/web/vitePlugin/codeServer/index.js
index 390310e87d..d919abac28 100644
--- a/web/vitePlugin/codeServer/index.js
+++ b/web/vitePlugin/codeServer/index.js
@@ -11,8 +11,9 @@ export default function GvaPositionServer() {
req._parsedUrl.query && req._parsedUrl.query.split('=')[1]
if (path && path !== 'null') {
if (process.env.VITE_EDITOR === 'webstorm') {
- const linePath = path.split(':')[1]
- const filePath = path.split(':')[0]
+ const lastColonIndex = path.lastIndexOf(':')
+ const linePath = path.substring(lastColonIndex + 1)
+ const filePath = path.substring(0, lastColonIndex)
const platform = os()
if (platform === 'win32') {
child_process.exec(
From 5b905c9a1e343134d9c1bc36c65ecbc78f00899c Mon Sep 17 00:00:00 2001
From: xuedinge <781408517@qq.com>
Date: Thu, 9 May 2024 19:44:26 +0800
Subject: [PATCH 02/15] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8C=96=E5=88=9B?=
=?UTF-8?q?=E5=BB=BA=E4=BB=A3=E7=A0=81=E5=A2=9E=E5=8A=A0int64=E5=92=8Cuint?=
=?UTF-8?q?(=E9=BB=98=E8=AE=A4id=E7=B1=BB=E5=9E=8B)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/view/systemTools/autoCode/index.vue | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/web/src/view/systemTools/autoCode/index.vue b/web/src/view/systemTools/autoCode/index.vue
index aedaf240db..2cc42057eb 100644
--- a/web/src/view/systemTools/autoCode/index.vue
+++ b/web/src/view/systemTools/autoCode/index.vue
@@ -628,6 +628,14 @@ const typeOptions = ref([
label: '整型',
value: 'int'
},
+ {
+ label: '整型64',
+ value: 'int64'
+ },
+ {
+ label: 'uint(默认id类型)',
+ value: 'uint'
+ },
{
label: '布尔值',
value: 'bool'
From 08f8e85536490d17e0e7d7b91c04d56b3fefa853 Mon Sep 17 00:00:00 2001
From: xuedinge <781408517@qq.com>
Date: Fri, 24 May 2024 23:46:54 +0800
Subject: [PATCH 03/15] =?UTF-8?q?=E5=88=A0=E9=99=A4selectImage.vue?=
=?UTF-8?q?=E4=B8=ADchooseImg=E4=B8=8B=E5=A4=9A=E4=BD=99=E7=9A=84console.l?=
=?UTF-8?q?og(url)=20=E5=A2=9E=E5=8A=A0emit('getChooseImgUrl',=20url)?=
=?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=BB=99=E7=88=B6=E7=BB=84=E4=BB=B6=E8=8E=B7?=
=?UTF-8?q?=E5=8F=96=E9=80=89=E4=B8=AD=E7=9A=84=E5=9B=BE=E7=89=87url?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/components/selectImage/selectImage.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/web/src/components/selectImage/selectImage.vue b/web/src/components/selectImage/selectImage.vue
index 3a8ff67d40..78daa8a51b 100644
--- a/web/src/components/selectImage/selectImage.vue
+++ b/web/src/components/selectImage/selectImage.vue
@@ -123,7 +123,7 @@
+
From 7912b06463e9e560759580971093671ef500242d Mon Sep 17 00:00:00 2001
From: xuedinge <781408517@qq.com>
Date: Thu, 13 Jun 2024 00:18:16 +0800
Subject: [PATCH 09/15] =?UTF-8?q?Revert=20"=E5=A2=9E=E5=8A=A0package?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9=E5=B1=95=E7=A4=BA=E5=90=8D?=
=?UTF-8?q?=E5=AD=97/=E6=8F=8F=E8=BF=B0=E5=86=85=E5=AE=B9"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit 055f11c3b6a76f928f485e7aa82c0cdb9f2566ff.
---
server/api/v1/system/sys_auto_code.go | 58 -----------
server/model/system/request/sys_auto_code.go | 7 --
server/router/system/sys_auto_code.go | 24 ++---
server/source/system/api.go | 2 -
web/src/api/autoCode.js | 16 ---
web/src/view/systemTools/autoPkg/autoPkg.vue | 102 ++++---------------
6 files changed, 32 insertions(+), 177 deletions(-)
delete mode 100644 server/model/system/request/sys_auto_code.go
diff --git a/server/api/v1/system/sys_auto_code.go b/server/api/v1/system/sys_auto_code.go
index 791bd40b61..7f2d365e0c 100644
--- a/server/api/v1/system/sys_auto_code.go
+++ b/server/api/v1/system/sys_auto_code.go
@@ -6,10 +6,8 @@ import (
"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"
@@ -195,34 +193,6 @@ 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
@@ -241,34 +211,6 @@ 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
diff --git a/server/model/system/request/sys_auto_code.go b/server/model/system/request/sys_auto_code.go
deleted file mode 100644
index f20a65893d..0000000000
--- a/server/model/system/request/sys_auto_code.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package request
-
-type SysAutoCode struct {
- ID uint `gorm:"primarykey" json:"ID"` // 主键ID
- Label string `json:"label" gorm:"comment:展示名"`
- Desc string `json:"desc" gorm:"comment:描述"`
-}
diff --git a/server/router/system/sys_auto_code.go b/server/router/system/sys_auto_code.go
index f39c235391..4f23a1d132 100644
--- a/server/router/system/sys_auto_code.go
+++ b/server/router/system/sys_auto_code.go
@@ -11,18 +11,16 @@ 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("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) // 打包插件
+ 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) // 打包插件
}
}
diff --git a/server/source/system/api.go b/server/source/system/api.go
index c94d86e9d5..6a1b1e1014 100644
--- a/server/source/system/api.go
+++ b/server/source/system/api.go
@@ -115,9 +115,7 @@ func (i *initApi) InitializeData(ctx context.Context) (context.Context, error) {
{ApiGroup: "包(pkg)生成器", Method: "POST", Path: "/autoCode/createPackage", Description: "生成包(package)"},
{ApiGroup: "包(pkg)生成器", Method: "POST", Path: "/autoCode/getPackage", Description: "获取所有包(package)"},
- {ApiGroup: "包(pkg)生成器", Method: "POST", Path: "/autoCode/getPackageById", Description: "获取包详情(package)"},
{ApiGroup: "包(pkg)生成器", Method: "POST", Path: "/autoCode/delPackage", Description: "删除包(package)"},
- {ApiGroup: "包(pkg)生成器", Method: "POST", Path: "/autoCode/updatePackageDetail", Description: "更新包展示名/描述(package)"},
{ApiGroup: "代码生成器历史", Method: "POST", Path: "/autoCode/getMeta", Description: "获取meta信息"},
{ApiGroup: "代码生成器历史", Method: "POST", Path: "/autoCode/rollback", Description: "回滚自动生成代码"},
diff --git a/web/src/api/autoCode.js b/web/src/api/autoCode.js
index 8ad0c3b166..abf1924e0e 100644
--- a/web/src/api/autoCode.js
+++ b/web/src/api/autoCode.js
@@ -116,22 +116,6 @@ export const deletePackageApi = (data) => {
data
})
}
-export const getPackageById = (data) => {
- return service({
- url: '/autoCode/getPackageById',
- method: 'post',
- data
- })
-}
-
-
-export const updatePackageDetail = (data) => {
- return service({
- url: '/autoCode/updatePackageDetail',
- method: 'post',
- data
- })
-}
export const createPlugApi = (data) => {
return service({
diff --git a/web/src/view/systemTools/autoPkg/autoPkg.vue b/web/src/view/systemTools/autoPkg/autoPkg.vue
index dab98efb8c..cf4485384e 100644
--- a/web/src/view/systemTools/autoPkg/autoPkg.vue
+++ b/web/src/view/systemTools/autoPkg/autoPkg.vue
@@ -49,12 +49,7 @@
>
编辑
-
{
callback()
}
}
-const type = ref('')
+
const rules = ref({
packageName: [
{ required: true, message: '请输入包名', trigger: 'blur' },
@@ -162,86 +154,34 @@ const rules = ref({
],
})
-// 编辑弹窗相关
-const pkgForm = ref(null)
-const initForm = () => {
- pkgForm.value.resetFields()
- form.value = {
- packageName: '',
- desc: '',
- label: '',
- }
-}
-const dialogTitle = ref('新增Api')
const dialogFormVisible = ref(false)
-const openDialog = (key) => {
- switch (key) {
- case 'addPackage':
- dialogTitle.value = '新增Package'
- break
- case 'edit':
- dialogTitle.value = '编辑Package'
- break
- default:
- break
- }
- type.value = key
+const openDialog = () => {
dialogFormVisible.value = true
}
const closeDialog = () => {
- initForm()
dialogFormVisible.value = false
+ form.value = {
+ packageName: '',
+ label: '',
+ desc: '',
+ }
}
-const editPackageFunc = async (row) => {
- const res = await getPackageById({id: row.ID})
- form.value = res.data.pkg
- openDialog('edit')
-}
-
-const enterDialog = async () => {
+const pkgForm = ref(null)
+const enterDialog = async() => {
pkgForm.value.validate(async valid => {
if (valid) {
- switch (type.value) {
- case 'addPackage': {
- const res = await createPackageApi(form.value)
- if (res.code === 0) {
- ElMessage({
- type: 'success',
- message: '添加成功',
- showClose: true
- })
- }
- getTableData()
- closeDialog()
- }
- break
- case 'edit': {
- const res = await updatePackageDetail(form.value)
- if (res.code === 0) {
- ElMessage({
- type: 'success',
- message: '编辑成功',
- showClose: true
-
- })
- }
- getTableData()
- closeDialog()
- }
- break
- default:
- // eslint-disable-next-line no-lone-blocks
- {
- ElMessage({
- type: 'error',
- message: '未知操作',
- showClose: true
- })
- }
- break
+ const res = await createPackageApi(form.value)
+ if (res.code === 0) {
+ ElMessage({
+ type: 'success',
+ message: '添加成功',
+ showClose: true
+ })
}
+ getTableData()
+ closeDialog()
}
})
}
From e458d10958b844afd973036e4488993cbd5ac385 Mon Sep 17 00:00:00 2001
From: xuedinge <781408517@qq.com>
Date: Sun, 23 Jun 2024 19:41:45 +0800
Subject: [PATCH 10/15] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=88=9D=E5=A7=8B?=
=?UTF-8?q?=E5=8C=96=E8=A7=92=E8=89=B2=E5=90=8D=E5=AD=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
server/source/system/authority.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/source/system/authority.go b/server/source/system/authority.go
index 0426f2a4fa..ae8600d134 100644
--- a/server/source/system/authority.go
+++ b/server/source/system/authority.go
@@ -44,9 +44,9 @@ func (i *initAuthority) InitializeData(ctx context.Context) (context.Context, er
return ctx, system.ErrMissingDBContext
}
entities := []sysModel.SysAuthority{
- {AuthorityId: 888, AuthorityName: "普通用户", ParentId: utils.Pointer[uint](0), DefaultRouter: "dashboard"},
+ {AuthorityId: 888, AuthorityName: "管理员", ParentId: utils.Pointer[uint](0), DefaultRouter: "dashboard"},
{AuthorityId: 9528, AuthorityName: "测试角色", ParentId: utils.Pointer[uint](0), DefaultRouter: "dashboard"},
- {AuthorityId: 8881, AuthorityName: "普通用户子角色", ParentId: utils.Pointer[uint](888), DefaultRouter: "dashboard"},
+ {AuthorityId: 8881, AuthorityName: "管理员子角色", ParentId: utils.Pointer[uint](888), DefaultRouter: "dashboard"},
}
if err := db.Create(&entities).Error; err != nil {
From 0af85516e4657c177162286a4c4e6cc895dcb194 Mon Sep 17 00:00:00 2001
From: xuedinge <781408517@qq.com>
Date: Sun, 23 Jun 2024 20:00:26 +0800
Subject: [PATCH 11/15] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E7=B3=BB=E7=BB=9F?=
=?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E7=94=A8=E6=88=B7=E8=A7=92=E8=89=B2?=
=?UTF-8?q?=E5=90=8D=E5=AD=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
server/source/system/authority.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/source/system/authority.go b/server/source/system/authority.go
index ae8600d134..198886513e 100644
--- a/server/source/system/authority.go
+++ b/server/source/system/authority.go
@@ -46,7 +46,7 @@ func (i *initAuthority) InitializeData(ctx context.Context) (context.Context, er
entities := []sysModel.SysAuthority{
{AuthorityId: 888, AuthorityName: "管理员", ParentId: utils.Pointer[uint](0), DefaultRouter: "dashboard"},
{AuthorityId: 9528, AuthorityName: "测试角色", ParentId: utils.Pointer[uint](0), DefaultRouter: "dashboard"},
- {AuthorityId: 8881, AuthorityName: "管理员子角色", ParentId: utils.Pointer[uint](888), DefaultRouter: "dashboard"},
+ {AuthorityId: 8881, AuthorityName: "普通用户", ParentId: utils.Pointer[uint](888), DefaultRouter: "dashboard"},
}
if err := db.Create(&entities).Error; err != nil {
From 3cc29a143d71374c0eda8ac5ac8ed172bf0c1121 Mon Sep 17 00:00:00 2001
From: xuedinge <781408517@qq.com>
Date: Tue, 25 Jun 2024 02:01:13 +0800
Subject: [PATCH 12/15] =?UTF-8?q?Revert=20"=E6=9B=B4=E6=94=B9=E7=B3=BB?=
=?UTF-8?q?=E7=BB=9F=E5=88=9D=E5=A7=8B=E5=8C=96=E7=94=A8=E6=88=B7=E8=A7=92?=
=?UTF-8?q?=E8=89=B2=E5=90=8D=E5=AD=97"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit 0af85516e4657c177162286a4c4e6cc895dcb194.
---
server/source/system/authority.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/source/system/authority.go b/server/source/system/authority.go
index 198886513e..ae8600d134 100644
--- a/server/source/system/authority.go
+++ b/server/source/system/authority.go
@@ -46,7 +46,7 @@ func (i *initAuthority) InitializeData(ctx context.Context) (context.Context, er
entities := []sysModel.SysAuthority{
{AuthorityId: 888, AuthorityName: "管理员", ParentId: utils.Pointer[uint](0), DefaultRouter: "dashboard"},
{AuthorityId: 9528, AuthorityName: "测试角色", ParentId: utils.Pointer[uint](0), DefaultRouter: "dashboard"},
- {AuthorityId: 8881, AuthorityName: "普通用户", ParentId: utils.Pointer[uint](888), DefaultRouter: "dashboard"},
+ {AuthorityId: 8881, AuthorityName: "管理员子角色", ParentId: utils.Pointer[uint](888), DefaultRouter: "dashboard"},
}
if err := db.Create(&entities).Error; err != nil {
From 508b9b9df638c5af2897813906799247f00b73a0 Mon Sep 17 00:00:00 2001
From: xuedinge <781408517@qq.com>
Date: Tue, 25 Jun 2024 02:01:16 +0800
Subject: [PATCH 13/15] =?UTF-8?q?Revert=20"=E6=9B=B4=E6=94=B9=E5=88=9D?=
=?UTF-8?q?=E5=A7=8B=E5=8C=96=E8=A7=92=E8=89=B2=E5=90=8D=E5=AD=97"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit e458d10958b844afd973036e4488993cbd5ac385.
---
server/source/system/authority.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/source/system/authority.go b/server/source/system/authority.go
index ae8600d134..0426f2a4fa 100644
--- a/server/source/system/authority.go
+++ b/server/source/system/authority.go
@@ -44,9 +44,9 @@ func (i *initAuthority) InitializeData(ctx context.Context) (context.Context, er
return ctx, system.ErrMissingDBContext
}
entities := []sysModel.SysAuthority{
- {AuthorityId: 888, AuthorityName: "管理员", ParentId: utils.Pointer[uint](0), DefaultRouter: "dashboard"},
+ {AuthorityId: 888, AuthorityName: "普通用户", ParentId: utils.Pointer[uint](0), DefaultRouter: "dashboard"},
{AuthorityId: 9528, AuthorityName: "测试角色", ParentId: utils.Pointer[uint](0), DefaultRouter: "dashboard"},
- {AuthorityId: 8881, AuthorityName: "管理员子角色", ParentId: utils.Pointer[uint](888), DefaultRouter: "dashboard"},
+ {AuthorityId: 8881, AuthorityName: "普通用户子角色", ParentId: utils.Pointer[uint](888), DefaultRouter: "dashboard"},
}
if err := db.Create(&entities).Error; err != nil {
From 3459f03a3313cfba3a109794d6e8368de1237b56 Mon Sep 17 00:00:00 2001
From: xuedinge <781408517@qq.com>
Date: Fri, 28 Jun 2024 04:44:18 +0800
Subject: [PATCH 14/15] =?UTF-8?q?dockerfile=E5=90=8E=E7=AB=AF=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE=E6=97=B6=E5=8C=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
server/Dockerfile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/server/Dockerfile b/server/Dockerfile
index 545f708338..318ca1e2e8 100644
--- a/server/Dockerfile
+++ b/server/Dockerfile
@@ -13,7 +13,10 @@ RUN go env -w GO111MODULE=on \
FROM alpine:latest
LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"
-
+# 设置时区
+ENV TZ=Asia/Shanghai
+RUN apk update && apk add --no-cache tzdata openntpd \
+ && ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
WORKDIR /go/src/github.com/flipped-aurora/gin-vue-admin/server
COPY --from=0 /go/src/github.com/flipped-aurora/gin-vue-admin/server/server ./
From 540b99cf473595536f9eddddd60818c04b17b173 Mon Sep 17 00:00:00 2001
From: xuedinge <781408517@qq.com>
Date: Fri, 28 Jun 2024 04:52:28 +0800
Subject: [PATCH 15/15] =?UTF-8?q?gitignore=E5=BF=BD=E7=95=A5=E5=90=8E?=
=?UTF-8?q?=E7=AB=AFuploads=E6=96=87=E4=BB=B6=E5=A4=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index e517c517a7..5f7b8d3809 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,7 @@ rm_file/
/server/server
/server/latest_log
/server/__debug_bin*
+server/uploads/
*.iml
web/.pnpm-debug.log