From eba8929b4d0040bef7861b3c7133f9aefeb107b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B0=E4=BA=AE?= Date: Sat, 26 Jun 2021 12:06:20 +0800 Subject: [PATCH] =?UTF-8?q?feature(=E5=AE=89=E8=A3=85):=20=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E6=97=B6=E6=96=B0=E5=A2=9E=E9=80=89=E6=8B=A9=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 安装时新增选择语言包 - 优化代码并删除无用的代码 --- README.md | 12 +- .../templates/authorized/authorized_add.html | 6 +- .../generator/generator_handler.html | 2 +- assets/templates/install/install_view.html | 37 +- cmd/handlergen/main.go | 7 + cmd/mysqlmd/main.go | 2 +- configs/configs.go | 4 + configs/constants.go | 9 + configs/fat_configs.toml | 7 +- go.mod | 24 +- go.sum | 374 +++++++++++++----- internal/api/code/code.go | 180 +++------ internal/api/code/en-us.go | 55 +++ internal/api/code/zh-cn.go | 55 +++ .../api/controller/admin_handler/func_list.go | 8 +- .../authorized_handler/func_list.go | 8 +- .../authorized_handler/func_listapi.go | 8 +- .../controller/config_handler/func_email.go | 8 +- .../api/controller/menu_handler/func_list.go | 8 +- .../menu_handler/func_listaction.go | 8 +- .../tool_handler/func_clearcache.go | 8 +- .../tool_handler/func_hashidsencode.go | 4 +- .../tool_handler/func_searchcache.go | 12 +- .../tool_handler/func_searchmysql.go | 10 +- .../controller/tool_handler/func_tables.go | 4 +- .../db_repo/admin_menu_repo/gen_model.go | 2 +- .../db_repo/admin_repo/gen_model.go | 2 +- .../db_repo/authorized_api_repo/gen_model.go | 2 +- .../db_repo/authorized_repo/gen_model.go | 2 +- .../db_repo/menu_action_repo/gen_model.go | 2 +- .../repository/db_repo/menu_repo/gen_model.go | 2 +- .../authorized_service/service_create.go | 2 +- .../authorized_service/service_detailbykey.go | 2 +- internal/api/third_party_request/alarm.go | 5 +- .../third_party_request/go_gin_api/demoget.go | 8 +- .../go_gin_api/demopost.go | 8 +- internal/pkg/cache/redis.go | 1 - internal/pkg/core/core.go | 4 +- internal/pkg/grpc/interceptor.go | 1 - internal/router/middleware/middle_rbac.go | 12 +- internal/router/middleware/middle_resubmit.go | 16 +- .../router/middleware/middle_signature.go | 36 +- internal/router/middleware/middlerware.go | 2 +- internal/router/router.go | 3 +- internal/router/router_web.go | 1 - .../generator_handler/func_handlerexecute.go | 2 +- .../install_handler/func_execute.go | 73 ++-- .../install_handler/func_restart.go | 39 -- .../web/controller/install_handler/handler.go | 1 - .../mysql_table/table_authorized_api.go | 4 +- .../upgrade_handler/func_upgradeexecute.go | 48 +-- main.go | 5 +- pkg/errno/errno.go | 4 +- pkg/file/file.go | 4 +- pkg/httpclient/alarm.go | 2 +- pkg/httpclient/retry.go | 2 +- pkg/token/token.go | 6 +- pkg/trace/trace.go | 2 +- scripts/init.bat | 13 - scripts/init.sh | 16 - 60 files changed, 706 insertions(+), 488 deletions(-) create mode 100644 internal/api/code/en-us.go create mode 100644 internal/api/code/zh-cn.go delete mode 100644 internal/web/controller/install_handler/func_restart.go delete mode 100644 scripts/init.bat delete mode 100755 scripts/init.sh diff --git a/README.md b/README.md index 2cd8fb9..dbd4b7f 100644 --- a/README.md +++ b/README.md @@ -27,16 +27,8 @@ ## 文档索引 -go-gin-api 文档由以下几个主要部分组成: - -- 准备工作 -- 快速开始 -- 目录接口 -- 核心封装 -- 组件指南 -- 工具包 - -**详细文档:[https://www.yuque.com/xinliangnote/go-gin-api/ngc3x5](https://www.yuque.com/xinliangnote/go-gin-api/ngc3x5)** +- 中文文档:[go-gin-api - 语雀](https://www.yuque.com/xinliangnote/go-gin-api/ngc3x5) +- English Document:[en.md](https://github.com/xinliangnote/go-gin-api/blob/master/en.md) ## 其他 diff --git a/assets/templates/authorized/authorized_add.html b/assets/templates/authorized/authorized_add.html index 18d1052..4f827a8 100644 --- a/assets/templates/authorized/authorized_add.html +++ b/assets/templates/authorized/authorized_add.html @@ -21,17 +21,17 @@
- +
- +
- +
diff --git a/assets/templates/generator/generator_handler.html b/assets/templates/generator/generator_handler.html index f075f09..8e595f5 100644 --- a/assets/templates/generator/generator_handler.html +++ b/assets/templates/generator/generator_handler.html @@ -16,7 +16,7 @@
生成控制器方法
- +
diff --git a/assets/templates/install/install_view.html b/assets/templates/install/install_view.html index ec77a4d..11de33d 100644 --- a/assets/templates/install/install_view.html +++ b/assets/templates/install/install_view.html @@ -4,12 +4,13 @@ - 服务初始化 + 项目初始化 + @@ -21,17 +22,27 @@
-
服务初始化
+
项目初始化
-
-

检测 · 环境

- +
+
检测 · 环境
-

所需版本: Go Version go1.15+,目前版本:{{.GoVersion}}

+

所需版本:go1.15+ (当前版本 {{.GoVersion}})

-

配置 · Redis

+
配置 · 语言
+
+
+ 语言 +
+ +
+
配置 · Redis
地址 @@ -56,8 +67,7 @@ placeholder="请输入 DB ,序号从 0 开始,默认是 0">
-

配置 · MySQL

- +
配置 · MySQL
地址 @@ -102,7 +112,7 @@
- +
+ + +