接口
12141接口总览
_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 = 524 DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMMENT = '请求资源表; 软删除未启用; resourceId=`${appId}.${pageId}.${actionId}`'
_resource 内容
id | desc | pageId | actionId | resourceType | resourceHook | resourceData |
---|---|---|---|---|---|---|
104 | ✅ 文件分片下载-获取分片信息 | allPage | getChunkInfo | service | null | { "service": "file", "serviceFunction": "getChunkInfo" } |
105 | ✅ 文件分片上传-所有分片上传完毕 | allPage | uploadFileDone | service | null | { "service": "file", "serviceFunction": "uploadFileDone" } |
106 | ✅ 文件分片上传-http文件流 | allPage | httpUploadByStream | service | null | { "service": "file", "serviceFunction": "uploadFileChunkByStream" } |
107 | ✅ 文件分片上传-http base64 | allPage | httpUploadByBase64 | service | null | { "service": "file", "serviceFunction": "uploadFileChunkByBase64" } |
231 | ✅登陆 | login | passwordLogin | service | null | { "service": "user", "serviceFunction": "passwordLogin" } |
251 | ✅登出 | allPage | logout | service | null | { "service": "user", "serviceFunction": "logout" } |
253 | ✅获取用户信息 | allPage | userInfo | service | null | { "service": "user", "serviceFunction": "userInfo" } |
258 | ✅查询常量 | allPage | getConstantList | sql | null | { "table": "_constant", "operation": "select" } |
_resource语句
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (104, NULL, NULL, 'allPage', 'getChunkInfo', '✅ 文件分片下载-获取分片信息', 'service', '{}', '{ "service": "file", "serviceFunction": "getChunkInfo" }', NULL, NULL, 'update', NULL, NULL, '2022-03-10T22:27:32+08:00');
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (105, NULL, NULL, 'allPage', 'uploadFileDone', '✅ 文件分片上传-所有分片上传完毕', 'service', '{}', '{ "service": "file", "serviceFunction": "uploadFileDone" }', 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 (106, NULL, NULL, 'allPage', 'httpUploadByStream', '✅ 文件分片上传-http文件流', 'service', '{}', '{ "service": "file", "serviceFunction": "uploadFileChunkByStream" }', NULL, NULL, 'update', NULL, NULL, '2022-03-10T22:27:32+08:00');
INSERT INTO _resource (id, accessControlTable, resourceHook, pageId, actionId, desc, resourceType, appDataSchema, resourceData, requestDemo, responseDemo, operation, operationByUserId, operationByUser, operationAt) VALUES (107, NULL, NULL, 'allPage', 'httpUploadByBase64', '✅ 文件分片上传-http base64', 'service', '{}', '{ "service": "file", "serviceFunction": "uploadFileChunkByBase64" }', NULL, NULL, 'update', NULL, NULL, '2022-03-10T22:27:32+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', '{
"type": "object",
"additionalProperties": true,
"required": [],
"properties": {}
}', '{"table": "_constant", "operation": "select"}', '', '', 'insert', NULL, NULL, NULL);