接口
12114接口总览
_resource结构
CREATE TABLE `_resource` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`accessControlTable` varchar(255) DEFAULT NULL COMMENT '数据规则控制表',
`resourceHook` text COMMENT '[ "before": {"service": "xx", "serviceFunction": "xxx"}, "after": [] }',
`pageId` varchar(255) DEFAULT NULL COMMENT 'page id; E.g: index',
`actionId` varchar(255) DEFAULT NULL COMMENT 'action id; E.g: selectXXXByXXX',
`desc` varchar(255) DEFAULT NULL COMMENT '描述',
`resourceType` varchar(255) DEFAULT NULL COMMENT 'resource 类型; E.g: auth service sql',
`appDataSchema` text COMMENT 'appData 参数校验',
`resourceData` text COMMENT 'resource 数据; { "service": "auth", "serviceFunction": "passwordLogin" } or { "table": "${tableName}", "action": "select", "whereCondition": ".where(function() {this.whereNot( { recordStatus: \\"active\\" })})" }',
`requestDemo` text COMMENT '请求Demo',
`responseDemo` text COMMENT '响应Demo',
`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
) 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语句
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');
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');
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');
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');
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');
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');
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');
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);
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');
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);
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (361, NULL, '{ "before": [
{"service": "reimbursement", "serviceFunction": "assignWhereUserIdBeforeHook"}
]}', 'reimbursementManagement', 'selectItemList', '✅报销申请-查询列表', 'sql', '{}', '{ "table": "view01_reimbursement", "operation": "select" }', NULL, NULL, 'insert', NULL, NULL, NULL);
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (362, NULL, '{ "before": [
{"service": "reimbursement", "serviceFunction": "fillInsertItemParamsBeforeHook"}
],"after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]}', 'reimbursementManagement', 'insertItem', '✅报销申请-添加', 'sql', '{}', '{ "table": "reimbursement","operation": "jhInsert" }', NULL, NULL, 'insert', NULL, NULL, NULL);
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (363, NULL, '{ "before": [
{"service": "reimbursement", "serviceFunction": "fillUpdateItemParamsBeforeHook"}
],"after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]}', 'reimbursementManagement', 'updateItem', '✅报销申请-更新', 'sql', '{}', '{ "table": "reimbursement", "operation": "jhUpdate" }', NULL, NULL, 'insert', NULL, NULL, NULL);
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);
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);
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (367, NULL, '{ "after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]}', 'auditManagement', 'rejectItem', '✅报销审批-驳回', 'service', '{}', '{"service": "audit", "serviceFunction": "rejectItem"}', NULL, NULL, 'insert', NULL, NULL, NULL);
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);
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (374, NULL, '{ "after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]}', 'auditManagement', 'approveItem', '✅报销审批-审核通过', 'service', '{}', '{"service": "audit", "serviceFunction": "approveItem"}', NULL, NULL, 'insert', NULL, NULL, NULL);
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (377, NULL, '{ "before": [
{"service": "transfer", "serviceFunction": "fillWhereOptionsBeforeHook"}
]}', 'transferManagement', 'selectItemList', '✅报销转账-查询列表', 'sql', '{}', '{ "table": "view01_reimbursement", "operation": "select" }', NULL, NULL, 'insert', NULL, NULL, NULL);
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (378, NULL, '{ "after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]}', 'transferManagement', 'transferItem', '✅报销转账-转账', 'service', '{}', '{"service": "transfer", "serviceFunction": "transferItem"}', NULL, NULL, 'insert', NULL, NULL, NULL);
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (379, NULL, '{ "after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]}', 'transferManagement', 'exceptionItem', '✅报销转账-异常', 'service', '{}', '{"service": "transfer", "serviceFunction": "exceptionItem"}', NULL, NULL, 'insert', NULL, NULL, NULL);
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);
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (384, NULL, '{ "before": [
{"service": "audit", "serviceFunction": "fillWhereOptionsBeforeHook"}
]}', 'auditManagement', 'selectItemList', '✅报销审批-查询列表', 'sql', '{}', '{ "table": "view01_reimbursement", "operation": "select" }', NULL, NULL, 'insert', NULL, NULL, NULL);
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (385, NULL, '{ "before": [
{"service": "reimbursement", "serviceFunction": "fillRevokeItemParamsBeforeHook"}
],"after": [
{"service": "reimbursement", "serviceFunction": "recordConfirmHistory"}
]}', 'reimbursementManagement', 'revokeItem', '✅报销申请-撤销', 'sql', '{}', '{ "table": "reimbursement", "operation": "jhUpdate" }', NULL, NULL, 'insert', NULL, NULL, NULL);
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);