提交先锋
This commit is contained in:
1 parent
571ba2a8a1
commit
b7bbcca9dc
19 files changed
+19786
No files matched your search
@@ -0,0 +1,40 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
tableEnum: {
|
||||
// ========================江湖表============================
|
||||
_cache: '_cache',
|
||||
_constant: '_constant',
|
||||
_file: '_file',
|
||||
_group: '_group',
|
||||
_log: '_log',
|
||||
_page: '_page',
|
||||
_resource: '_resource',
|
||||
_record_history: '_record_history',
|
||||
_resource_request_log: '_resource_request_log',
|
||||
_role: '_role',
|
||||
_test_case: '_test_case',
|
||||
_user: '_user',
|
||||
_user_group_role: '_user_group_role',
|
||||
_user_group_role_page: '_user_group_role_page',
|
||||
_user_group_role_resource: '_user_group_role_resource',
|
||||
_user_group_role_ui_level: '_user_group_role_ui_level',
|
||||
_user_session: '_user_session',
|
||||
// ========================应用表============================
|
||||
app: 'student',
|
||||
article: 'article',
|
||||
assignment: 'assignment',
|
||||
category: 'category',
|
||||
workflow: 'workflow',
|
||||
task: 'task',
|
||||
task_history: 'task_history',
|
||||
// ========================基础 View============================
|
||||
_view01_resource: '_view01_resource',
|
||||
_view01_user: '_view01_user',
|
||||
// ========================高级 View============================
|
||||
_view02_user_app: '_view02_user_app',
|
||||
_view02_user_group_role: '_view02_user_group_role',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
class BizError extends Error {
|
||||
constructor({ errorCode, errorReason, errorReasonSupplement }) {
|
||||
super(JSON.stringify({ errorCode, errorReason, errorReasonSupplement }));
|
||||
this.name = 'BizError';
|
||||
this.errorCode = errorCode;
|
||||
this.errorReason = errorReason;
|
||||
this.errorReasonSupplement = errorReasonSupplement;
|
||||
}
|
||||
}
|
||||
|
||||
const errorInfoEnum = {
|
||||
data_exception: { errorCode: 'data_exception', errorReason: '数据异常' },
|
||||
workflow_not_found: { errorCode: 'work_flow_not_found', errorReason: '流程不存在' },
|
||||
task_not_found: { errorCode: 'task_not_found', errorReason: '任务不存在' },
|
||||
node_not_found: { errorCode: 'node_not_found', errorReason: '节点不存在' },
|
||||
line_not_found: { errorCode: 'line_not_found', errorReason: '线路不存在' },
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
BizError,
|
||||
errorInfoEnum,
|
||||
};
|
||||
Reference in new issue
Block a user