chore: 初始开源发布
iotlcm-admin-svr:管理后台服务。 - Go module:iotlcm → git.5iot.com/iotlcm-public/iotlcm-admin-svr(729 文件) - 凭据与地址脱敏:JWT signingKey(含代码里的 MustGet 默认值)、 MySQL DSN、Redis 口令、告警邮件发件人邮箱全部改为占位; 私网 IP → 文档地址段;库名 xiujie_admin → iotlcm - 真实手机号/邮箱 → 合法 11 位编造号 / example.com - 移除内部资产:CI 触发器、过时 DDL(sql/db_iotlcm.sql)、 私有依赖 go get 行、明文 registry 登录口令 - 启动 banner 统一 IOTLCM 方块字 + 社区惯例署名 - Dockerfile 改用公共基础镜像 - 拼错的 RADEME.md → README.md,README 重写 - 需要真实数据库的用例改为可用 IOTLCM_TEST_WITH_DB=1 显式启用 - 补 Apache-2.0 LICENSE,LF 行尾 + .gitattributes 数据库 schema 不随本仓发布(生产 DDL 已过时),README 已说明。
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
-- XJAdmin自动生成菜单权限SQL 通常情况下只在首次生成代码时自动执行一次
|
||||
-- 如需再次执行请先手动删除生成的菜单权限和SQL文件:@{.generatePath}
|
||||
-- Version: @{.xiuVersion}
|
||||
-- Date: @{.nowTime}
|
||||
-- Link https://github.com/xiujiecn/xiu-admin
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
SET AUTOCOMMIT = 0;
|
||||
START TRANSACTION;
|
||||
|
||||
--
|
||||
-- 数据库: `@{.dbName}`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 插入表中的数据 `@{.menuTable}`
|
||||
--
|
||||
|
||||
|
||||
SET @now := now();
|
||||
|
||||
|
||||
-- 菜单目录
|
||||
INSERT INTO `@{.menuTable}` ( `menu_id`, `menu_name`, `parent_id`, `level`, `tree`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `created_dept`, `created_by`, `created_at`, `updated_by`, `updated_at`, `remark`) VALUES ( NULL, '@{.tableComment}', '@{.options.Menu.Pid}', @{.dirLevel}, '@{.dirTree}', '@{.options.Menu.Sort}', '@{.varName | LcFirst}', '@{.mainComponent}', '', 1, 0, 'M', '0', '0', '', '@{.options.Menu.Icon}', 103, 1, @now, NULL, NULL, '');
|
||||
|
||||
|
||||
SET @dirId = LAST_INSERT_ID();
|
||||
|
||||
|
||||
-- 菜单页面
|
||||
-- 列表
|
||||
INSERT INTO `@{.menuTable}` (`menu_id`, `menu_name`, `parent_id`, `level`, `tree`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `created_dept`, `created_by`, `created_at`, `updated_by`, `updated_at`, `remark`) VALUES (NULL, '@{.tableComment}列表', @dirId, '@{.listLevel}', CONCAT('@{.dirTree}tr_', @dirId,' '),'10', 'index', 'gen/@{.componentPrefix}/index', '', 1, 0, 'C', '0', '0', 'gen:@{.apiPrefix}:list', '@{.options.Menu.Icon}', 103, 1, @now, 1, @now, '');
|
||||
|
||||
|
||||
SET @listId = LAST_INSERT_ID();
|
||||
@{ if or (eq .options.Step.HasView true) (eq .options.Step.HasEdit true) }
|
||||
-- 详情
|
||||
INSERT INTO `@{.menuTable}` (`menu_id`, `menu_name`, `parent_id`, `level`, `tree`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `created_dept`, `created_by`, `created_at`, `updated_by`, `updated_at`, `remark`) VALUES (NULL, '@{.tableComment}详情', @listId, '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), 10, '', '', '', 1, 0, 'F', '0', '0', 'gen:@{.apiPrefix}:view', '', 103, 1, @now, NULL, NULL, '');
|
||||
@{end}
|
||||
|
||||
-- 菜单按钮
|
||||
@{ if eq .options.Step.HasEdit true }
|
||||
-- 编辑
|
||||
INSERT INTO `@{.menuTable}` (`menu_id`, `menu_name`, `parent_id`, `level`, `tree`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `created_dept`, `created_by`, `created_at`, `updated_by`, `updated_at`, `remark`) VALUES (NULL, '编辑/新增@{.tableComment}', @listId, '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), 10, '', '', '', 1, 0, 'F', '0', '0', 'gen:@{.apiPrefix}:edit', '', 103, 1, @now, NULL, NULL, '');
|
||||
@{end}
|
||||
|
||||
SET @editId = LAST_INSERT_ID();
|
||||
@{ if and (eq .options.Step.HasEdit true) (eq .options.Step.HasMaxSort true) }
|
||||
-- 获取最大排序
|
||||
INSERT INTO `@{.menuTable}` (`menu_id`, `menu_name`, `parent_id`, `level`, `tree`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `created_dept`, `created_by`, `created_at`, `updated_by`, `updated_at`, `remark`) VALUES (NULL, '获取@{.tableComment}最大排序', @listId, '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), 10, '', '', '', 1, 0, 'F', '0', '0', 'gen:@{.apiPrefix}:maxSort', '', 103, 1, @now, NULL, NULL, '');
|
||||
@{end}
|
||||
@{ if eq .options.Step.HasDel true }
|
||||
-- 删除
|
||||
INSERT INTO `@{.menuTable}` (`menu_id`, `menu_name`, `parent_id`, `level`, `tree`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `created_dept`, `created_by`, `created_at`, `updated_by`, `updated_at`, `remark`) VALUES (NULL, '删除@{.tableComment}', @listId, '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), 10, '', '', '', 1, 0, 'F', '0', '0', 'gen:@{.apiPrefix}:delete', '', 103, 1, @now, NULL, NULL, '');
|
||||
@{end}
|
||||
@{ if eq .options.Step.HasStatus true }
|
||||
-- 更新状态
|
||||
INSERT INTO `@{.menuTable}` (`menu_id`, `menu_name`, `parent_id`, `level`, `tree`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `created_dept`, `created_by`, `created_at`, `updated_by`, `updated_at`, `remark`) VALUES (NULL, '修改@{.tableComment}状态', @listId, '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), 10, '', '', '', 1, 0, 'F', '0', '0', 'gen:@{.apiPrefix}:status', '', 103, 1, @now, NULL, NULL, '');
|
||||
@{end}
|
||||
@{ if eq .options.Step.HasSwitch true }
|
||||
-- 操作开关
|
||||
INSERT INTO `@{.menuTable}` (`menu_id`, `menu_name`, `parent_id`, `level`, `tree`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `created_dept`, `created_by`, `created_at`, `updated_by`, `updated_at`, `remark`) VALUES (NULL, '操作@{.tableComment}开关', @listId, '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), 10, '', '', '', 1, 0, 'F', '0', '0', 'gen:@{.apiPrefix}:switch', '', 103, 1, @now, NULL, NULL, '');
|
||||
@{end}
|
||||
@{ if eq .options.Step.HasExport true }
|
||||
-- 导出
|
||||
INSERT INTO `@{.menuTable}` (`menu_id`, `menu_name`, `parent_id`, `level`, `tree`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `created_dept`, `created_by`, `created_at`, `updated_by`, `updated_at`, `remark`) VALUES (NULL, '导出@{.tableComment}', @listId, '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), 10, '', '', '', 1, 0, 'F', '0', '0', 'gen:@{.apiPrefix}:export', '', 103, 1, @now, NULL, NULL, '');
|
||||
@{end}
|
||||
@{ if eq .options.Step.IsTreeTable true }
|
||||
-- 关系树选项
|
||||
INSERT INTO `@{.menuTable}` (`menu_id`, `menu_name`, `parent_id`, `level`, `tree`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `created_dept`, `created_by`, `created_at`, `updated_by`, `updated_at`, `remark`) VALUES (NULL, '获取@{.tableComment}关系树选项', @listId, '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), 10, '', '', '', 1, 0, 'F', '0', '0', 'gen:@{.apiPrefix}:treeOption', '', 103, 1, @now, NULL, NULL, '');
|
||||
@{end}
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user