-- 创建 resource
INSERT INTO `_resource` (`accessControlTable`,`resourceHook`,`pageId`,`actionId`,`desc`,`resourceType`,`appDataSchema`,`resourceData`,`requestDemo`,`responseDemo`,`operation`,`operationByUserId`,`operationByUser`,`operationAt`) SELECT NULL,NULL,'{{pageId}}','{{component}}-selectItemList','✅查询当前{{nameA}}下的{{nameB}}列表','sql','{}','{ \"table\": \"{{table}}\", \"operation\": \"select\" }',NULL,NULL,'jhInsert','jianghu-init',NULL,NULL FROM DUAL WHERE NOT EXISTS (SELECT `pageId` FROM `_resource` WHERE `pageId`='{{pageId}}' AND `actionId`='{{component}}-selectItemList');
INSERT INTO `_resource` (`accessControlTable`,`resourceHook`,`pageId`,`actionId`,`desc`,`resourceType`,`appDataSchema`,`resourceData`,`requestDemo`,`responseDemo`,`operation`,`operationByUserId`,`operationByUser`,`operationAt`) SELECT NULL,'{{insertBeforeHook}}','{{pageId}}','{{component}}-insertItem','✅建立关系','sql','{}','{ \"table\": \"{{table}}\", \"operation\": \"jhInsert\" }',NULL,NULL,'jhInsert','jianghu-init',NULL,NULL FROM DUAL WHERE NOT EXISTS (SELECT `pageId` FROM `_resource` WHERE `pageId`='{{pageId}}' AND `actionId`='{{component}}-insertItem');
INSERT INTO `_resource` (`accessControlTable`,`resourceHook`,`pageId`,`actionId`,`desc`,`resourceType`,`appDataSchema`,`resourceData`,`requestDemo`,`responseDemo`,`operation`,`operationByUserId`,`operationByUser`,`operationAt`) SELECT NULL,NULL,'{{pageId}}','{{component}}-updateItem','✅更新数据','sql','{}','{ \"table\": \"{{table}}\", \"operation\": \"jhUpdate\" }',NULL,NULL,'jhInsert','jianghu-init',NULL,NULL FROM DUAL WHERE NOT EXISTS (SELECT `pageId` FROM `_resource` WHERE `pageId`='{{pageId}}' AND `actionId`='{{component}}-updateItem');
INSERT INTO `_resource` (`accessControlTable`,`resourceHook`,`pageId`,`actionId`,`desc`,`resourceType`,`appDataSchema`,`resourceData`,`requestDemo`,`responseDemo`,`operation`,`operationByUserId`,`operationByUser`,`operationAt`) SELECT NULL,NULL,'{{pageId}}','{{component}}-deleteItem','✅删除信息','sql','{}','{ \"table\": \"{{table}}\", \"operation\": \"jhDelete\" }',NULL,NULL,'jhInsert','jianghu-init',NULL,NULL FROM DUAL WHERE NOT EXISTS (SELECT `pageId` FROM `_resource` WHERE `pageId`='{{pageId}}' AND `actionId`='{{component}}-deleteItem');