Skip to content

Commit

Permalink
+ update code base to v2.7.8-beta1.
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedHassanNasr committed Dec 23, 2024
2 parents a28d6aa + cb23254 commit 0f1407e
Show file tree
Hide file tree
Showing 102 changed files with 4,446 additions and 1,235 deletions.
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.idea/
/web/node_modules
/web/dist

Expand Down Expand Up @@ -33,4 +32,11 @@ server/uploads/
*.iml
web/.pnpm-debug.log
web/pnpm-lock.yaml
*.dccache

# binary files
*.exe

# SQLite database files
*.db
*.sqlite
*.sqlite3
23 changes: 10 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,9 @@ CONFIG_FILE = config.yaml
IMAGE_NAME = gva
#镜像地址
REPOSITORY = registry.cn-hangzhou.aliyuncs.com/${IMAGE_NAME}

ifeq ($(TAGS_OPT),)
TAGS_OPT = latest
else
endif

ifeq ($(PLUGIN),)
PLUGIN = email
else
endif
#镜像版本
TAGS_OPT ?= latest
PLUGIN ?= email

#容器环境前后端共同打包
build: build-web build-server
Expand All @@ -48,7 +41,7 @@ build-image-server:
build-local:
if [ -d "build" ];then rm -rf build; else echo "OK!"; fi \
&& if [ -f "/.dockerenv" ];then echo "OK!"; else make build-web-local && make build-server-local; fi \
&& mkdir build && cp -r web/dist build/ && cp server/server build/ && cp -r server/resource build/resource
&& mkdir build && cp -r web/dist build/ && cp server/server build/ && cp -r server/resource build/resource

#本地环境打包前端
build-web-local:
Expand All @@ -63,13 +56,17 @@ build-server-local:
&& go build -ldflags "-B 0x$(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -X main.Version=${TAGS_OPT}" -v

#打包前后端二合一镜像
image: build
image: build
docker build -t ${REPOSITORY}/gin-vue-admin:${TAGS_OPT} -f deploy/docker/Dockerfile .

#尝鲜版
images: build build-image-web build-image-server
docker build -t ${REPOSITORY}/all:${TAGS_OPT} -f deploy/docker/Dockerfile .


#swagger 文档生成
doc:
@cd server && swag init

#插件快捷打包: make plugin PLUGIN="这里是插件文件夹名称,默认为email"
plugin:
if [ -d ".plugin" ];then rm -rf .plugin ; else echo "OK!"; fi && mkdir -p .plugin/${PLUGIN}/{server/plugin,web/plugin} \
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@

[English](./README-en.md) | 简体中文

## ✨一分钟生成前后端基础代码

<table>
<tr>
<td width="200">
<p>📄 创建基础模板</p>
<p>🤖 AI生成结构</p>
<p>⏰ 生成代码</p>
<p>🏷️ 分配权限</p>
<p>🎉 基础CURD生成完成</p>
</td>
<td>
<video src="https://private-user-images.githubusercontent.com/165128580/384700666-4d039215-af29-4f86-bb4f-60dbab38f58e.mp4?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzEyNTIxNDYsIm5iZiI6MTczMTI1MTg0NiwicGF0aCI6Ii8xNjUxMjg1ODAvMzg0NzAwNjY2LTRkMDM5MjE1LWFmMjktNGY4Ni1iYjRmLTYwZGJhYjM4ZjU4ZS5tcDQ_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQxMTEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MTExMFQxNTE3MjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00NjJkMDcwZjJkMjAyMmU1N2I2MzQxY2RhODFlNzgzNGRiMDFhMmY2NTYyM2ZmODdhNDVmMWE1NzlhMDdlOTI5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ZJbswpLzF2RHjemcGirKOP0L1fvpl3FUqIiQ_-yjeUo" data-canonical-src="https://private-user-images.githubusercontent.com/165128580/384700666-4d039215-af29-4f86-bb4f-60dbab38f58e.mp4?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzEyNTIxNDYsIm5iZiI6MTczMTI1MTg0NiwicGF0aCI6Ii8xNjUxMjg1ODAvMzg0NzAwNjY2LTRkMDM5MjE1LWFmMjktNGY4Ni1iYjRmLTYwZGJhYjM4ZjU4ZS5tcDQ_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQxMTEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MTExMFQxNTE3MjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00NjJkMDcwZjJkMjAyMmU1N2I2MzQxY2RhODFlNzgzNGRiMDFhMmY2NTYyM2ZmODdhNDVmMWE1NzlhMDdlOTI5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ZJbswpLzF2RHjemcGirKOP0L1fvpl3FUqIiQ_-yjeUo" controls="controls" muted="muted" class="d-block rounded-bottom-2 border-top width-fit" style="max-height:640px; min-height: 200px">
</video>
</td>
</tr>
</table>


# 项目文档
[在线文档](https://www.gin-vue-admin.com) : https://www.gin-vue-admin.com

Expand Down
99 changes: 0 additions & 99 deletions deploy/docker-compose/docker-compose-dev.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions server/api/v1/system/auto_code_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (a *AutoCodePluginApi) Packaged(c *gin.Context) {
response.OkWithMessage(fmt.Sprintf(global.Translate("system.messages.packSuccess"), zipPath), c)
}

// Packaged
// InitMenu
// @Tags AutoCodePlugin
// @Summary 打包插件
// @Security ApiKeyAuth
Expand All @@ -94,7 +94,7 @@ func (a *AutoCodePluginApi) InitMenu(c *gin.Context) {
response.OkWithMessage(global.Translate("sys_auto_code.fileChangeSuccess"), c)
}

// Packaged
// InitAPI
// @Tags AutoCodePlugin
// @Summary 打包插件
// @Security ApiKeyAuth
Expand Down
6 changes: 3 additions & 3 deletions server/api/v1/system/auto_code_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func (a *AutoCodeTemplateApi) Preview(c *gin.Context) {
info.PackageT = utils.FirstUpper(info.Package)
autoCode, err := autoCodeTemplateService.Preview(c.Request.Context(), info)
if err != nil {
global.GVA_LOG.Error(global.Translate("sys_auto_code.previewFailErr"), zap.Error(err))
response.FailWithMessage(global.Translate("sys_auto_code.previewFailErr"), c)
global.GVA_LOG.Error(err.Error(), zap.Error(err))
response.FailWithMessage(global.Translate("sys_auto_code.previewFailErr")+": "+err.Error(), c)
} else {
response.OkWithDetailed(gin.H{"autoCode": autoCode}, global.Translate("sys_auto_code.previewSuccess"), c)
}
Expand Down Expand Up @@ -82,7 +82,7 @@ func (a *AutoCodeTemplateApi) Create(c *gin.Context) {
}
}

// Create
// AddFunc
// @Tags AddFunc
// @Summary 增加方法
// @Security ApiKeyAuth
Expand Down
2 changes: 1 addition & 1 deletion server/api/v1/system/sys_export_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (sysExportTemplateApi *SysExportTemplateApi) ExportExcel(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Router /sysExportTemplate/exportExcel [get]
// @Router /sysExportTemplate/ExportTemplate [get]
func (sysExportTemplateApi *SysExportTemplateApi) ExportTemplate(c *gin.Context) {
templateID := c.Query("templateID")
if templateID == "" {
Expand Down
3 changes: 2 additions & 1 deletion server/core/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package core

import (
"fmt"

"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/initialize"
"github.com/flipped-aurora/gin-vue-admin/server/service/system"
Expand Down Expand Up @@ -39,7 +40,7 @@ func RunWindowsServer() {

fmt.Printf(`
%s gin-vue-admin
%s: v2.7.7
%s: v2.7.8-beta1
%s
%s: https://github.com/flipped-aurora/gin-vue-admin
%s: https://plugin.gin-vue-admin.com
Expand Down
Loading

0 comments on commit 0f1407e

Please sign in to comment.