CREATE TABLE IF NOT EXISTS `_constant_ui` (`id` int(11) NOT NULL AUTO_INCREMENT, `constantKey` varchar(255) DEFAULT NULL, `constantType` varchar(255) DEFAULT NULL COMMENT '常量类型; object, array', `pageId` varchar(255) DEFAULT 'all' COMMENT '页面id', `desc` varchar(255) DEFAULT NULL COMMENT '描述', `en` text COMMENT '常量内容; object, array', `zh` text COMMENT '常量内容; object, array', `kr` text COMMENT '常量内容; object, array', `yueyu` text COMMENT '常量内容; object, array', `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore', `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId', `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名', `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `pageId_constantKey_unique` (`constantKey`,`pageId`) USING BTREE) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
INSERT INTO `_constant_ui` (`constantKey`, `constantType`, `pageId`, `desc`, `en`, `zh`, `kr`, `yueyu`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT 'btn', 'object', 'all', '按钮', '{\"upload\":\"upload\", \"createFolder\":\"folder\",\"material\":\"material\",\"materialManagement\":\"material management\",\"logout\":\"logout\",\"logoutSuccess\":\"logout succeeded\",\"fileName\":\"file name\",\"rename\":\"rename\",\"cancel\":\"cancel\",\"paste\":\"paste\",\"create\":\"create\",\"fileName\":\"file name\",\"use\":\"use\",\"selectFile\":\"Please select a folder or file\",\"file\":\"file\",\"fileNotFound\":\"File or folder not found\",\"folderEmpty\":\"folder is empty\",\"enterFileName\":\"Please enter a file name\",\"fileRename\":\"file rename\",\"renamedSuccess\":\"File renamed successfully\",\"uploadProgress\":\"upload progress\",\"movedSuccess\":\"File moved successfully\",\"uploadTo\":\"upload to\",\"maxFileSize\":\"Max file size\",\"maxFilesCount\":\"Max files count\",\"delete\":\"delete\",\"sureDelete\":\"Are you sure you want to delete this \",\"yes\":\"yes\",\"folder\":\"folder\",\"uploadAll\":\"upload all\",\"removeAll\":\"remove all\"}', '{\"upload\":\"上传\", \"createFolder\":\"创建文件夹\",\"material\":\"素材\",\"materialManagement\":\"素材管理\",\"logout\":\"退出登录\",\"logoutSuccess\":\"退出登录成功\",\"rename\":\"重命名\",\"cancel\":\"取消\",\"paste\":\"粘贴\",\"create\":\"创建\",\"fileName\":\"文件名\",\"use\":\"使用\",\"import\":\"导入\",\"selectFile\":\"请选择一个文件夹或文件\",\"file\":\"文件\",\"fileNotFound\":\"找不到文件或文件夹\",\"folderEmpty\":\"文件夹为空\",\"enterFileName\":\"请输入文件名\",\"fileRename\":\"文件重命名\",\"renamedSuccess\":\"文件重命名成功\",\"uploadProgress\":\"上传进度\",\"movedSuccess\":\"文件移动成功\",\"uploadTo\":\"上传至\",\"maxFileSize\":\"最大文件大小\",\"maxFilesCount\":\"最大文件数\",\"delete\":\"删除\",\"sureDelete\":\"确定你想要删除这个\",\"yes\":\"是的\",\"folder\":\"文件夹\",\"uploadAll\":\"全部上传\",\"removeAll\":\"全部移除\",\"copyPath\":\"复制文件路径\",\"toMaterialRepo\":\"从素材中心导入\"}', NULL, NULL, 'insert', NULL, NULL, NULL WHERE NOT EXISTS (SELECT 1 FROM `_constant_ui` WHERE `constantKey` = 'btn');
INSERT INTO `_constant_ui` (`constantKey`, `constantType`, `pageId`, `desc`, `en`, `zh`, `kr`, `yueyu`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT 'common', 'object', 'all', '公共', '{\n\"add\":\"add\",\n\"view\":\"view\",\n\"modify\":\"modify\",\n\"delete\":\"delete\",\n\"recycle\":\"recycle\",\n\"recover\":\"recover\",\n\"cancel\":\"cancel\",\n\"sure\":\"sure\",\n\"manage\":\"manage\",\n\"save\":\"save\",\n\"saveAndPreview\":\"saveAndPreview\",\n\"moveToRecycleBin\":\"move to recycle bin\",\n\"operate\":\"operate\",\n\"select\":\"select\"\n}', '{\n\"add\":\"新增\",\n\"view\":\"查看\",\n\"modify\":\"修改\",\n\"delete\":\"删除\",\n\"recycle\":\"回收站\",\n\"recover\":\"恢复\",\n\"cancel\":\"取消\",\n\"sure\":\"确定\",\n\"manage\":\"管理\",\n\"save\":\"保存\",\n\"saveAndPreview\":\"保存并预览\",\n\"moveToRecycleBin\":\"移到回收站\",\n\"operate\":\"操作\",\n\"select\":\"选择\"\n}', NULL, NULL, 'insert', NULL, NULL, NULL WHERE NOT EXISTS (SELECT 1 FROM `_constant_ui` WHERE `constantKey` = 'common');
ALTER TABLE `_page` ADD COLUMN `pageHook` text COLLATE utf8mb4_bin DEFAULT NULL COMMENT '页面钩子';

INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, NULL, 'allPage', 'clearRecycle', '✅xf编辑-清空回收站', 'service', '{}', '{\"service\": \"material\", \"serviceFunction\": \"clearRecycle\"}', '', '', NULL, NULL, NULL, '2022-03-10T22:27:32+08:00' WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'clearRecycle');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, NULL, 'allPage', 'copyFile', '✅xf编辑-复制文件', 'service', '{}', '{\"service\": \"material\", \"serviceFunction\": \"copyFile\"}', '', '', NULL, NULL, NULL, '2022-03-10T22:27:32+08:00' WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'copyFile');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, NULL, 'allPage', 'copyMaterial', '✅使用素材', 'service', '{}', '{\"service\": \"material\", \"serviceFunction\": \"useMaterial\"}', '', '', NULL, NULL, NULL, NULL WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'copyMaterial');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, '{}', 'allPage', 'delectOrgAdmin', '✅删除组织管理员', 'sql', NULL, '{\"table\": \"org_member_role\", \"operation\": \"jhDelete\"}', NULL, NULL,'insert', 'jianghu-init/allPage', NULL, NULL WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'delectOrgAdmin');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, NULL, 'allPage', 'delete', '✅xf编辑-删除', 'service', '{}', '{\"service\": \"material\", \"serviceFunction\": \"delete\"}', '', '', NULL, NULL, NULL, '2022-03-10T22:27:32+08:00' WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'delete');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, '{}', 'allPage', 'getChunkInfo', '✅ 文件分片下载-获取分片信息', 'service', '{}', '{\"service\": \"file\", \"serviceFunction\": \"getChunkInfo\"}', '', '','update', NULL, NULL, '2022-03-10T22:27:32+08:00' WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'getChunkInfo');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, '{}', 'allPage', 'getConstantList', '✅查询常量', 'sql', '{}', '{\"table\": \"_constant\", \"operation\": \"select\"}', '', '', NULL, NULL, NULL, NULL WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'getConstantList');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, '{}', 'allPage', 'htmlErrorLogRecord', '✅异常日志记录', 'service', '{}', '{\"service\": \"error\", \"serviceFunction\": \"htmlErrorLogRecord\"}', '', '', NULL, NULL, NULL, NULL WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'htmlErrorLogRecord');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, '{}', 'allPage', 'httpDownloadByBase64', '✅ 文件分片下载-http base64', 'service', '{}', '{\"service\": \"file\", \"serviceFunction\": \"downloadFileChunkByBase64\"}', '', '', NULL, NULL, NULL, NULL WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'httpDownloadByBase64');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, '{}', 'allPage', 'httpUploadByBase64', '✅ 文件分片上传-http base64', 'service', '{}', '{\"service\": \"file\", \"serviceFunction\": \"uploadFileChunkByBase64\"}', '', '','update', NULL, NULL, '2022-03-10T22:27:32+08:00' WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'httpUploadByBase64');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, '{}', 'allPage', 'httpUploadByStream', '✅ 文件分片上传-http文件流', 'service', '{}', '{\"service\": \"file\", \"serviceFunction\": \"uploadFileChunkByStream\"}', '', '','update', NULL, NULL, '2022-03-10T22:27:32+08:00' WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'httpUploadByStream');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, NULL, 'allPage', 'list', '✅xf编辑-文件列表', 'service', '{}', '{\"service\": \"material\", \"serviceFunction\": \"list\"}', '', '', NULL, NULL, NULL, NULL WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'list');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, NULL, 'allPage', 'mkdir', '✅xf编辑-创建文件夹', 'service', '{}', '{\"service\": \"material\", \"serviceFunction\": \"mkdir\"}', '', '', NULL, NULL, NULL, '2022-04-27T15:37:21+08:00' WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'mkdir');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, NULL, 'allPage', 'moveFile', '✅xf编辑-移动文件', 'service', '{}', '{\"service\": \"material\", \"serviceFunction\": \"moveFile\"}', '', '', NULL, NULL, NULL, NULL WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'moveFile');
INSERT INTO `_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, NULL, 'allPage', 'renameFile', '✅xf编辑-文件重命名', 'service', '{}', '{\"service\": \"material\", \"serviceFunction\": \"renameFile\"}', '', '', NULL, NULL, NULL, NULL WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'renameFile');
INSERT INTO`_resource` (`accessControlTable`, `resourceHook`, `pageId`, `actionId`, `desc`, `resourceType`, `appDataSchema`, `resourceData`, `requestDemo`, `responseDemo`, `operation`, `operationByUserId`, `operationByUser`, `operationAt`) SELECT NULL, '{}', 'allPage', 'uploadFileDone', '✅ 文件分片上传-所有分片上传完毕', 'service', '{}', '{\"service\": \"file\", \"serviceFunction\": \"uploadFileDone\"}', '', '', NULL, NULL, NULL, NULL WHERE NOT EXISTS (SELECT 1 FROM `_resource` WHERE `pageId` = 'allPage' and `actionId` = 'uploadFileDone');
