接口

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 = 387 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '请求资源表; 软删除未启用; resourceId=`${appId}.${pageId}.${actionId}`'

_resource 内容

id desc pageId actionId resourceType resourceHook resourceData
6 ✅ 文件分片上传-所有分片上传完毕 allPage uploadFileDone service {"service": "file", "serviceFunction": "uploadFileDone"}
7 ✅ 文件分片上传-http文件流 allPage httpUploadByStream service {"service": "file", "serviceFunction": "uploadFileChunkByStream"}
8 ✅ 文件分片上传-http base64 allPage httpUploadByBase64 service {"service": "file", "serviceFunction": "uploadFileChunkByBase64"}
9 ✅ 文件分片下载-http base64 allPage httpDownloadByBase64 service {"service": "file", "serviceFunction": "downloadFileChunkByBase64"}
10 ✅文件上传(文件流) allPage uploadByStream service {"service": "file", "serviceFunction": "uploadFileChunkByStream"}
11 ✅文件上传(base64) allPage uploadByBase64 service {"service": "file", "serviceFunction": "uploadFileChunkByBase64"}
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"}
361 ✅报销申请-查询列表 reimbursementManagement selectItemList sql { "before": [
{"service": "reimbursement", "serviceFunction": "assignWhereUserIdBeforeHook"}
]} { "table": "view01_reimbursement", "operation": "select" }
362 ✅报销申请-添加 reimbursementManagement insertItem sql { "before": [
{"service": "reimbursement", "serviceFunction": "fillInsertItemParamsBeforeHook"}
],"after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]} { "table": "reimbursement","operation": "jhInsert" }
363 ✅报销申请-更新 reimbursementManagement updateItem sql { "before": [
{"service": "reimbursement", "serviceFunction": "fillUpdateItemParamsBeforeHook"}
],"after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]} { "table": "reimbursement", "operation": "jhUpdate" }
364 ✅报销申请-删除 reimbursementManagement deleteItem sql { "table": "reimbursement", "operation": "jhDelete" }
365 ✅报销申请-查询员工列表 reimbursementManagement selectEmployeeList sql { "table": "view01_member_org_role", "operation": "select" }
367 ✅报销审批-驳回 auditManagement rejectItem service { "after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]} {"service": "audit", "serviceFunction": "rejectItem"}
369 ✅操作记录-查询列表 confirmHistoryManagement selectItemList sql { "table": "reimbursement_confirm_history", "operation": "select" }
374 ✅报销审批-审核通过 auditManagement approveItem service { "after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]} {"service": "audit", "serviceFunction": "approveItem"}
377 ✅报销转账-查询列表 transferManagement selectItemList sql { "before": [
{"service": "transfer", "serviceFunction": "fillWhereOptionsBeforeHook"}
]} { "table": "view01_reimbursement", "operation": "select" }
378 ✅报销转账-转账 transferManagement transferItem service { "after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]} {"service": "transfer", "serviceFunction": "transferItem"}
379 ✅报销转账-异常 transferManagement exceptionItem service { "after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]} {"service": "transfer", "serviceFunction": "exceptionItem"}
381 ✅报销转账-查询员工列表 transferManagement selectEmployeeList sql { "table": "view01_member_org_role", "operation": "select" }
384 ✅报销审批-查询列表 auditManagement selectItemList sql { "before": [
{"service": "audit", "serviceFunction": "fillWhereOptionsBeforeHook"}
]} { "table": "view01_reimbursement", "operation": "select" }
385 ✅报销申请-撤销 reimbursementManagement revokeItem sql { "before": [
{"service": "reimbursement", "serviceFunction": "fillRevokeItemParamsBeforeHook"}
],"after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]} { "table": "reimbursement", "operation": "jhUpdate" }
386 ✅报销审批-查询员工列表 auditManagement selectEmployeeList sql { "table": "view01_member_org_role", "operation": "select" }

_resource语句

  1. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (6, NULL, NULL, 'allPage', 'uploadFileDone', '✅ 文件分片上传-所有分片上传完毕', 'service', '{}', '{"service": "file", "serviceFunction": "uploadFileDone"}', '{"appData": {"appId": "demo_advanced", "pageId": "allPage", "actionId": "uploadFileDone", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36", "actionData": {"hash": "2fa86466e9d98b1ffc4aeeaa2d60dcec", "total": 1, "fileDesc": "11", "filename": "终端存储的输出.txt", "chunkSize": 3145728, "fileDirectory": "testFile"}}, "packageId": "1657461344665_2984863", "packageType": "httpRequest"}', '{"status": "success", "appData": {"appId": "demo_advanced", "fileId": "1657461344688_791754", "pageId": "allPage", "actionId": "uploadFileDone", "fileDesc": "11", "filename": "终端存储的输出.txt", "binarySize": "1.42KB", "resultData": {"fileId": "1657461344688_791754", "fileDesc": "11", "filename": "终端存储的输出.txt", "binarySize": "1.42KB", "downloadTip": "https://xxx.xxx.xxx/${downloadBasePath}${downloadPath}", "downloadPath": "/testFile/1657461344688_791754_终端存储的输出.txt", "fileDirectory": "testFile", "filenameStorage": "1657461344688_791754_终端存储的输出.txt", "downloadBasePath": "/demo_advanced/upload"}, "downloadTip": "https://xxx.xxx.xxx/${downloadBasePath}${downloadPath}", "downloadPath": "/testFile/1657461344688_791754_终端存储的输出.txt", "fileDirectory": "testFile", "filenameStorage": "1657461344688_791754_终端存储的输出.txt", "downloadBasePath": "/demo_advanced/upload"}, "packageId": "1657461344665_2984863", "timestamp": "2022-07-10T21:55:44+08:00", "packageType": "httpResponse"}', 'update', NULL, NULL, '2022-07-10T21:55:44+08:00');
  2. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (7, NULL, NULL, 'allPage', 'httpUploadByStream', '✅ 文件分片上传-http文件流', 'service', '{}', '{"service": "file", "serviceFunction": "uploadFileChunkByStream"}', '{"appData": {"appId": "demo_advanced", "pageId": "allPage", "actionId": "httpUploadByStream", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36", "actionData": {"hash": "2fa86466e9d98b1ffc4aeeaa2d60dcec", "total": 1, "chunFile": {}, "filename": "终端存储的输出.txt", "chunkSize": 3145728, "indexString": "0000"}}, "packageId": "1657461344594_9853016", "packageType": "httpRequest"}', '{"status": "success", "appData": {"appId": "demo_advanced", "pageId": "allPage", "actionId": "httpUploadByStream"}, "packageId": "1657461344594_9853016", "timestamp": "2022-07-10T21:55:44+08:00", "packageType": "httpResponse"}', 'update', NULL, NULL, '2022-07-10T21:55:44+08:00');
  3. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (8, NULL, NULL, 'allPage', 'httpUploadByBase64', '✅ 文件分片上传-http base64', 'service', '{}', '{"service": "file", "serviceFunction": "uploadFileChunkByBase64"}', '{"appData": {"appId": "demo_advanced", "pageId": "allPage", "actionId": "httpUploadByBase64", "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": {"hash": "93a29a14e4b922cc102811b8daa4793b", "total": 1, "chunFile": {}, "filename": "answer-time-right-toast.png", "chunkSize": 3145728, "fileBase64": null, "indexString": "0000"}}, "packageId": "1651128190181_2258419", "packageType": "httpRequest"}', '{"status": "success", "appData": {"appId": "demo_advanced", "pageId": "allPage", "actionId": "httpUploadByBase64"}, "packageId": "1651128190181_2258419", "timestamp": "2022-04-28T14:43:10+08:00", "packageType": "httpResponse"}', 'update', NULL, NULL, '2022-04-28T14:43:10+08:00');
  4. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (9, NULL, NULL, 'allPage', 'httpDownloadByBase64', '✅ 文件分片下载-http base64', 'service', '{}', '{"service": "file", "serviceFunction": "downloadFileChunkByBase64"}', '{"appData": {"appId": "demo_advanced", "pageId": "allPage", "actionId": "httpDownloadByBase64", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36", "actionData": {"hash": "3cb636e0662ba1c9a63951f6ff8a2865", "index": 8, "total": 9, "chunkSize": 3145728, "downloadPath": "/testFile/1651300342370_442150_恒星5.0.11.apk"}}, "packageId": "1651301556570_8673061", "packageType": "httpRequest"}', '{"status": "success", "packageId": "1651301556570_8673061", "timestamp": "2022-04-30T14:52:37+08:00", "packageType": "httpResponse"}', 'update', NULL, NULL, '2022-04-30T14:52:38+08:00');
  5. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (10, NULL, NULL, 'allPage', 'uploadByStream', '✅文件上传(文件流)', 'service', NULL, '{"service": "file", "serviceFunction": "uploadFileChunkByStream"}', '{}', '{}', 'update', NULL, NULL, '2022-02-22T19:36:33+08:00');
  6. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (11, NULL, NULL, 'allPage', 'uploadByBase64', '✅文件上传(base64)', 'service', NULL, '{"service": "file", "serviceFunction": "uploadFileChunkByBase64"}', '{}', '{}', 'update', NULL, NULL, '2022-02-22T18:59:14+08:00');
  7. 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"}', '', '', 'update', NULL, NULL, '2022-04-27T15:32:57+08:00');
  8. 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);
  9. 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"}', '', '', 'update', NULL, NULL, '2022-04-27T15:37:21+08:00');
  10. 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);
  11. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (361, NULL, '{ "before": [
  12. {"service": "reimbursement", "serviceFunction": "assignWhereUserIdBeforeHook"}
  13. ]}', 'reimbursementManagement', 'selectItemList', '✅报销申请-查询列表', 'sql', '{}', '{ "table": "view01_reimbursement", "operation": "select" }', NULL, NULL, 'insert', NULL, NULL, NULL);
  14. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (362, NULL, '{ "before": [
  15. {"service": "reimbursement", "serviceFunction": "fillInsertItemParamsBeforeHook"}
  16. ],"after": [
  17. {"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
  18. ]}', 'reimbursementManagement', 'insertItem', '✅报销申请-添加', 'sql', '{}', '{ "table": "reimbursement","operation": "jhInsert" }', NULL, NULL, 'insert', NULL, NULL, NULL);
  19. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (363, NULL, '{ "before": [
  20. {"service": "reimbursement", "serviceFunction": "fillUpdateItemParamsBeforeHook"}
  21. ],"after": [
  22. {"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
  23. ]}', 'reimbursementManagement', 'updateItem', '✅报销申请-更新', 'sql', '{}', '{ "table": "reimbursement", "operation": "jhUpdate" }', NULL, NULL, 'insert', NULL, NULL, NULL);
  24. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (364, NULL, NULL, 'reimbursementManagement', 'deleteItem', '✅报销申请-删除', 'sql', '{}', '{ "table": "reimbursement", "operation": "jhDelete" }', NULL, NULL, 'insert', NULL, NULL, NULL);
  25. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (365, NULL, NULL, 'reimbursementManagement', 'selectEmployeeList', '✅报销申请-查询员工列表', 'sql', '{}', '{ "table": "view01_member_org_role", "operation": "select" }', NULL, NULL, 'insert', NULL, NULL, NULL);
  26. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (367, NULL, '{ "after": [
  27. {"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
  28. ]}', 'auditManagement', 'rejectItem', '✅报销审批-驳回', 'service', '{}', '{"service": "audit", "serviceFunction": "rejectItem"}', NULL, NULL, 'insert', NULL, NULL, NULL);
  29. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (369, NULL, NULL, 'confirmHistoryManagement', 'selectItemList', '✅操作记录-查询列表', 'sql', '{}', '{ "table": "reimbursement_confirm_history", "operation": "select" }', NULL, NULL, 'insert', NULL, NULL, NULL);
  30. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (374, NULL, '{ "after": [
  31. {"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
  32. ]}', 'auditManagement', 'approveItem', '✅报销审批-审核通过', 'service', '{}', '{"service": "audit", "serviceFunction": "approveItem"}', NULL, NULL, 'insert', NULL, NULL, NULL);
  33. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (377, NULL, '{ "before": [
  34. {"service": "transfer", "serviceFunction": "fillWhereOptionsBeforeHook"}
  35. ]}', 'transferManagement', 'selectItemList', '✅报销转账-查询列表', 'sql', '{}', '{ "table": "view01_reimbursement", "operation": "select" }', NULL, NULL, 'insert', NULL, NULL, NULL);
  36. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (378, NULL, '{ "after": [
  37. {"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
  38. ]}', 'transferManagement', 'transferItem', '✅报销转账-转账', 'service', '{}', '{"service": "transfer", "serviceFunction": "transferItem"}', NULL, NULL, 'insert', NULL, NULL, NULL);
  39. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (379, NULL, '{ "after": [
  40. {"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
  41. ]}', 'transferManagement', 'exceptionItem', '✅报销转账-异常', 'service', '{}', '{"service": "transfer", "serviceFunction": "exceptionItem"}', NULL, NULL, 'insert', NULL, NULL, NULL);
  42. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (381, NULL, NULL, 'transferManagement', 'selectEmployeeList', '✅报销转账-查询员工列表', 'sql', '{}', '{ "table": "view01_member_org_role", "operation": "select" }', NULL, NULL, 'insert', NULL, NULL, NULL);
  43. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (384, NULL, '{ "before": [
  44. {"service": "audit", "serviceFunction": "fillWhereOptionsBeforeHook"}
  45. ]}', 'auditManagement', 'selectItemList', '✅报销审批-查询列表', 'sql', '{}', '{ "table": "view01_reimbursement", "operation": "select" }', NULL, NULL, 'insert', NULL, NULL, NULL);
  46. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (385, NULL, '{ "before": [
  47. {"service": "reimbursement", "serviceFunction": "fillRevokeItemParamsBeforeHook"}
  48. ],"after": [
  49. {"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
  50. ]}', 'reimbursementManagement', 'revokeItem', '✅报销申请-撤销', 'sql', '{}', '{ "table": "reimbursement", "operation": "jhUpdate" }', NULL, NULL, 'insert', NULL, NULL, NULL);
  51. INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (386, NULL, NULL, 'auditManagement', 'selectEmployeeList', '✅报销审批-查询员工列表', 'sql', '{}', '{ "table": "view01_member_org_role", "operation": "select" }', NULL, NULL, 'insert', NULL, NULL, NULL);