接口

12114

接口总览

_resource结构

  1. CREATE TABLE `_resource` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `accessControlTable` varchar(255) DEFAULT NULL COMMENT '数据规则控制表',
  4. `resourceHook` text COMMENT '[ "before": {"service": "xx", "serviceFunction": "xxx"}, "after": [] }',
  5. `pageId` varchar(255) DEFAULT NULL COMMENT 'page id; E.g: index',
  6. `actionId` varchar(255) DEFAULT NULL COMMENT 'action id; E.g: selectXXXByXXX',
  7. `desc` varchar(255) DEFAULT NULL COMMENT '描述',
  8. `resourceType` varchar(255) DEFAULT NULL COMMENT 'resource 类型; E.g: auth service sql',
  9. `appDataSchema` text COMMENT 'appData 参数校验',
  10. `resourceData` text COMMENT 'resource 数据; { "service": "auth", "serviceFunction": "passwordLogin" } or { "table": "${tableName}", "action": "select", "whereCondition": ".where(function() {this.whereNot( { recordStatus: \\"active\\" })})" }',
  11. `requestDemo` text COMMENT '请求Demo',
  12. `responseDemo` text COMMENT '响应Demo',
  13. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  14. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  15. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  16. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  17. PRIMARY KEY (`id`) USING BTREE
  18. ) ENGINE = InnoDB AUTO_INCREMENT = 392 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '请求资源表; 软删除未启用; resourceId=`${appId}.${pageId}.${actionId}`'

_resource 内容

id desc pageId actionId resourceType resourceHook resourceData
231 ✅登陆 login passwordLogin service { "service": "user", "serviceFunction": "passwordLogin" }
251 ✅登出 allPage logout service { "service": "user", "serviceFunction": "logout" }
253 ✅获取用户信息 allPage userInfo service { "service": "user", "serviceFunction": "userInfo" }
258 ✅查询常量 allPage getConstantList sql { "table": "_constant", "operation": "select" }
259 ✅异常日志记录 allPage htmlErrorLogRecord service {"service": "error", "serviceFunction": "htmlErrorLogRecord"}
331 ✅餐厅管理-查询列表 restaurantManagement selectItemList service {"service":"restaurant","serviceFunction":"selectRestaurantList"}
332 ✅餐厅管理-添加信息 restaurantManagement insertItem sql {"before": [{"service": "restaurant", "serviceFunction": "fillInsertItemParamsBeforeHook"}], "after": []} { "table": "restaurant", "operation": "jhInsert" }
333 ✅餐厅管理-更新信息 restaurantManagement updateItem sql { "table": "restaurant", "operation": "jhUpdate" }
334 ✅餐厅管理-删除信息 restaurantManagement deleteItem sql { "table": "restaurant", "operation": "jhDelete" }
351 ✅一批次餐桌分配-查询餐厅信息 oneBatchStudentAllocation selectRestaurantList sql {"table":"view01_restaurant","operation":"select"}
352 ✅一批次餐桌分配-查询餐桌分配信息 oneBatchStudentAllocation selectRestaurantStudentList sql {"table":"view01_restaurant_student","operation":"select"}
353 ✅一批次餐桌分配-分配餐桌 oneBatchStudentAllocation allotSeat service {"service":"restaurant","serviceFunction":"allotSeat"}
354 ✅一批次餐桌分配-查询学生信息 oneBatchStudentAllocation selectStudentList service {"service":"restaurant","serviceFunction":"selectStudentList"}
365 ✅餐桌数据导入-查询餐厅信息 importRestaurantData selectRestaurantList sql {"table":"view01_restaurant","operation":"select"}
366 ✅餐桌数据导入-导入 importRestaurantData importRestaurantData service {"service":"restaurant","serviceFunction":"importRestaurantData"}
367 ✅餐桌数据导入-查询学生信息 importRestaurantData getStudentData sql { "table": "view01_student_basic_class", "operation": "select" }
368 ✅二批次餐桌分配-查询餐厅信息 twoBatchStudentAllocation selectRestaurantList sql {"table":"view01_restaurant","operation":"select"}
369 ✅二批次餐桌分配-查询餐桌分配信息 twoBatchStudentAllocation selectRestaurantStudentList sql {"table":"view01_restaurant_student","operation":"select"}
370 ✅二批次餐桌分配-分配餐桌 twoBatchStudentAllocation allotSeat service {"service":"restaurant","serviceFunction":"allotSeat"}
371 ✅二批次餐桌分配-查询学生信息 twoBatchStudentAllocation selectStudentList service {"service":"restaurant","serviceFunction":"selectStudentList"}
390 ✅餐厅管理-更新信息 batchStudentAllocation searchStudentItem sql { "table": "view02_restaurant_student_detail", "operation": "select" }
391 ✅查询列表 semesterArchive semesterArchive service {"service": "semester", "serviceFunction": "semesterArchive"}

_resource语句

  1. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (231, NULL, NULL, 'login', 'passwordLogin', '✅登陆', 'service', '{}', '{ "service": "user", "serviceFunction": "passwordLogin" }', '', '', 'insert', NULL, NULL, NULL);
  2. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (251, NULL, NULL, 'allPage', 'logout', '✅登出', 'service', '{}', '{ "service": "user", "serviceFunction": "logout" }', '', '', 'insert', NULL, NULL, NULL);
  3. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (253, NULL, NULL, 'allPage', 'userInfo', '✅获取用户信息', 'service', '{}', '{ "service": "user", "serviceFunction": "userInfo" }', '', '', 'insert', NULL, NULL, NULL);
  4. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (258, NULL, NULL, 'allPage', 'getConstantList', '✅查询常量', 'sql', '{}', '{ "table": "_constant", "operation": "select" }', '', '', 'insert', NULL, NULL, NULL);
  5. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (259, NULL, NULL, 'allPage', 'htmlErrorLogRecord', '✅异常日志记录', 'service', '{}', '{"service": "error", "serviceFunction": "htmlErrorLogRecord"}', NULL, NULL, 'insert', NULL, NULL, NULL);
  6. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (331, NULL, NULL, 'restaurantManagement', 'selectItemList', '✅餐厅管理-查询列表', 'service', '{}', '{"service":"restaurant","serviceFunction":"selectRestaurantList"}', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  7. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (332, NULL, '{"before": [{"service": "restaurant", "serviceFunction": "fillInsertItemParamsBeforeHook"}], "after": []}', 'restaurantManagement', 'insertItem', '✅餐厅管理-添加信息', 'sql', '{}', '{ "table": "restaurant", "operation": "jhInsert" }', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  8. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (333, NULL, NULL, 'restaurantManagement', 'updateItem', '✅餐厅管理-更新信息', 'sql', '{}', '{ "table": "restaurant", "operation": "jhUpdate" }', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  9. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (334, NULL, NULL, 'restaurantManagement', 'deleteItem', '✅餐厅管理-删除信息', 'sql', '{}', '{ "table": "restaurant", "operation": "jhDelete" }', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  10. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (351, NULL, NULL, 'oneBatchStudentAllocation', 'selectRestaurantList', '✅一批次餐桌分配-查询餐厅信息', 'sql', '{}', '{"table":"view01_restaurant","operation":"select"}', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  11. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (352, NULL, NULL, 'oneBatchStudentAllocation', 'selectRestaurantStudentList', '✅一批次餐桌分配-查询餐桌分配信息', 'sql', '{}', '{"table":"view01_restaurant_student","operation":"select"}', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  12. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (353, NULL, NULL, 'oneBatchStudentAllocation', 'allotSeat', '✅一批次餐桌分配-分配餐桌', 'service', '{}', '{"service":"restaurant","serviceFunction":"allotSeat"}', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  13. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (354, NULL, NULL, 'oneBatchStudentAllocation', 'selectStudentList', '✅一批次餐桌分配-查询学生信息', 'service', '{}', '{"service":"restaurant","serviceFunction":"selectStudentList"}', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  14. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (365, NULL, NULL, 'importRestaurantData', 'selectRestaurantList', '✅餐桌数据导入-查询餐厅信息', 'sql', '{}', '{"table":"view01_restaurant","operation":"select"}', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  15. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (366, NULL, NULL, 'importRestaurantData', 'importRestaurantData', '✅餐桌数据导入-导入', 'service', '{}', '{"service":"restaurant","serviceFunction":"importRestaurantData"}', NULL, NULL, 'insert', NULL, NULL, NULL);
  16. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (367, NULL, NULL, 'importRestaurantData', 'getStudentData', '✅餐桌数据导入-查询学生信息', 'sql', '{}', '{ "table": "view01_student_basic_class", "operation": "select" }', NULL, NULL, 'insert', NULL, NULL, NULL);
  17. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (368, NULL, NULL, 'twoBatchStudentAllocation', 'selectRestaurantList', '✅二批次餐桌分配-查询餐厅信息', 'sql', '{}', '{"table":"view01_restaurant","operation":"select"}', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  18. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (369, NULL, NULL, 'twoBatchStudentAllocation', 'selectRestaurantStudentList', '✅二批次餐桌分配-查询餐桌分配信息', 'sql', '{}', '{"table":"view01_restaurant_student","operation":"select"}', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  19. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (370, NULL, NULL, 'twoBatchStudentAllocation', 'allotSeat', '✅二批次餐桌分配-分配餐桌', 'service', '{}', '{"service":"restaurant","serviceFunction":"allotSeat"}', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  20. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (371, NULL, NULL, 'twoBatchStudentAllocation', 'selectStudentList', '✅二批次餐桌分配-查询学生信息', 'service', '{}', '{"service":"restaurant","serviceFunction":"selectStudentList"}', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  21. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (390, NULL, NULL, 'batchStudentAllocation', 'searchStudentItem', '✅餐厅管理-更新信息', 'sql', '{}', '{ "table": "view02_restaurant_student_detail", "operation": "select" }', NULL, NULL, 'update', 'vscode', 'vscode', '2022-07-19T13:45:11+08:00');
  22. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (391, NULL, NULL, 'semesterArchive', 'semesterArchive', '✅查询列表', 'service', NULL, '{"service": "semester", "serviceFunction": "semesterArchive"}', NULL, NULL, 'insert', NULL, NULL, NULL);