-- 创建 page
INSERT INTO `_page` (`pageId`,`pageName`,`pageType`,`sort`,`operation`,`operationByUserId`,`operationByUser`,`operationAt`) SELECT '{{pageId}}','页面访问记录','showInMenu','6','insert',NULL,NULL,NULL FROM DUAL WHERE NOT EXISTS (SELECT `pageId` FROM `_page` WHERE `pageId`='{{pageId}}');
-- 创建 resource
INSERT INTO `_resource` (`accessControlTable`,`resourceHook`,`pageId`,`actionId`,`desc`,`resourceType`,`appDataSchema`,`resourceData`,`requestDemo`,`responseDemo`,`operation`,`operationByUserId`,`operationByUser`,`operationAt`) SELECT NULL,NULL,'{{pageId}}','selectLogFileList','✅✅查询日志文件列表','service',NULL,'{ \"service\": \"pageLog\", \"serviceFunction\": \"selectLogFileList\" }' ,'{\"appData\": {\"appId\": \"demo_advanced\", \"where\": {}, \"pageId\": \"{{pageId}}\", \"orderBy\": [{\"order\": \"desc\", \"column\": \"operationAt\"}], \"actionId\": \"selectItemList\", \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36\", \"actionData\": {}}, \"packageId\": \"1651221207913_1347965\", \"packageType\": \"httpRequest\"}','{\"status\": \"success\", \"packageId\": \"1651221207913_1347965\", \"timestamp\": \"2022-04-29T16:33:28+08:00\", \"packageType\": \"httpResponse\"}','update',NULL,NULL,'2022-04-29T16:33:28+08:00' FROM DUAL WHERE NOT EXISTS (SELECT `pageId` FROM `_resource` WHERE `pageId`='{{pageId}}' AND `actionId`='selectItemList');
INSERT INTO `_resource` (`accessControlTable`,`resourceHook`,`pageId`,`actionId`,`desc`,`resourceType`,`appDataSchema`,`resourceData`,`requestDemo`,`responseDemo`,`operation`,`operationByUserId`,`operationByUser`,`operationAt`) SELECT NULL,NULL,'{{pageId}}','selectItemListFromLogFile','✅查询日志文件内容','service',NULL,'{ \"service\": \"pageLog\", \"serviceFunction\": \"selectItemListFromLogFile\" }' ,'{\"appData\": {\"appId\": \"demo_advanced\", \"where\": {}, \"pageId\": \"{{pageId}}\", \"orderBy\": [{\"order\": \"desc\", \"column\": \"operationAt\"}], \"actionId\": \"selectItemList\", \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36\", \"actionData\": {}}, \"packageId\": \"1651221207913_1347965\", \"packageType\": \"httpRequest\"}','{\"status\": \"success\", \"packageId\": \"1651221207913_1347965\", \"timestamp\": \"2022-04-29T16:33:28+08:00\", \"packageType\": \"httpResponse\"}','update',NULL,NULL,'2022-04-29T16:33:28+08:00' FROM DUAL WHERE NOT EXISTS (SELECT `pageId` FROM `_resource` WHERE `pageId`='{{pageId}}' AND `actionId`='selectItemList');