midway-fatcms 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.default.js +5 -3
- package/dist/configuration.d.ts +0 -3
- package/dist/configuration.js +0 -19
- package/dist/controller/gateway/ProxyApiGatewayController.d.ts +0 -2
- package/dist/controller/gateway/ProxyApiGatewayController.js +0 -18
- package/dist/controller/helpers.controller.d.ts +4 -5
- package/dist/controller/helpers.controller.js +56 -14
- package/dist/controller/manage/AccountRoleManageApi.js +3 -5
- package/dist/controller/manage/AnyApiMangeApi.js +4 -3
- package/dist/controller/manage/AppMangeApi.js +3 -4
- package/dist/controller/manage/AppPageMangeApi.js +4 -3
- package/dist/controller/manage/CrudMethodsMangeApi.js +3 -4
- package/dist/controller/manage/DataDictManageApi.js +6 -7
- package/dist/controller/manage/DeployManageApi.js +4 -5
- package/dist/controller/manage/FlowConfigManageApi.js +3 -5
- package/dist/controller/manage/MenuManageApi.js +3 -4
- package/dist/controller/manage/ProxyApiMangeApi.js +3 -4
- package/dist/controller/manage/SysConfigMangeApi.js +3 -3
- package/dist/controller/manage/SystemInfoManageApi.js +3 -1
- package/dist/controller/manage/WorkbenchMangeApi.js +3 -4
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/libs/crud-pro/models/TransactionSqlServer.js +27 -4
- package/dist/libs/crud-pro/services/CrudProCachedCfgService.d.ts +5 -8
- package/dist/libs/crud-pro/services/CrudProCachedCfgService.js +25 -42
- package/dist/libs/crud-pro/utils/CrudMonitor.d.ts +0 -9
- package/dist/libs/crud-pro/utils/CrudMonitor.js +0 -21
- package/dist/libs/crud-pro/utils/pool/SqlServerUtils.js +26 -0
- package/dist/middleware/cacherefresh.middleware.d.ts +3 -46
- package/dist/middleware/cacherefresh.middleware.js +9 -67
- package/dist/models/CacheRefreshCategory.d.ts +1 -18
- package/dist/models/CacheRefreshCategory.js +0 -17
- package/dist/models/SystemEntities.d.ts +2 -0
- package/dist/models/bizmodels.d.ts +0 -8
- package/dist/models/bizmodels.js +0 -8
- package/dist/schedule/scheduleNames.d.ts +2 -0
- package/dist/schedule/scheduleNames.js +3 -1
- package/dist/service/SysAppService.d.ts +2 -5
- package/dist/service/SysAppService.js +15 -69
- package/dist/service/SysConfigService.d.ts +1 -6
- package/dist/service/SysConfigService.js +7 -46
- package/dist/service/SysDictDataService.d.ts +2 -5
- package/dist/service/SysDictDataService.js +13 -59
- package/dist/service/SysMenuService.d.ts +1 -4
- package/dist/service/SysMenuService.js +6 -42
- package/dist/service/WorkbenchService.d.ts +1 -5
- package/dist/service/WorkbenchService.js +10 -61
- package/dist/service/anyapi/AnyApiService.d.ts +1 -1
- package/dist/service/anyapi/AnyApiService.js +6 -16
- package/dist/service/base/bizmemcache/BizMemCacheService.d.ts +16 -0
- package/dist/service/base/bizmemcache/BizMemCacheService.js +239 -0
- package/dist/service/base/bizmemcache/BizMemCacheStore.d.ts +34 -0
- package/dist/service/base/bizmemcache/BizMemCacheStore.js +118 -0
- package/dist/service/base/bizmemcache/BizMemCacheTypes.d.ts +60 -0
- package/dist/service/base/bizmemcache/BizMemCacheTypes.js +18 -0
- package/dist/service/base/cache-refresh/CacheRefreshHub.d.ts +0 -22
- package/dist/service/base/cache-refresh/CacheRefreshHub.js +0 -22
- package/dist/service/base/cache-refresh/CacheRefreshHubScheduleService.d.ts +0 -6
- package/dist/service/base/cache-refresh/CacheRefreshHubScheduleService.js +0 -6
- package/dist/service/curd/CurdMixByDictService.d.ts +0 -4
- package/dist/service/curd/CurdMixByDictService.js +9 -55
- package/dist/service/curd/CurdMixBySysConfigService.d.ts +0 -5
- package/dist/service/curd/CurdMixBySysConfigService.js +9 -54
- package/dist/service/curd/CurdMixByWorkbenchService.d.ts +0 -1
- package/dist/service/curd/CurdMixByWorkbenchService.js +9 -36
- package/dist/service/curd/CurdProService.d.ts +0 -1
- package/dist/service/curd/CurdProService.js +0 -4
- package/dist/service/proxyapi/ProxyApiLoadService.d.ts +3 -8
- package/dist/service/proxyapi/ProxyApiLoadService.js +40 -68
- package/dist/service/proxyapi/ProxyApiService.d.ts +2 -0
- package/dist/service/proxyapi/ProxyApiService.js +32 -9
- package/dist/service/proxyapi/RouteTrie.d.ts +1 -7
- package/dist/service/proxyapi/RouteTrie.js +1 -17
- package/package.json +1 -1
- package/src/config/config.default.ts +4 -2
- package/src/configuration.ts +0 -23
- package/src/controller/gateway/ProxyApiGatewayController.ts +1 -9
- package/src/controller/helpers.controller.ts +66 -15
- package/src/controller/manage/AccountRoleManageApi.ts +3 -5
- package/src/controller/manage/AnyApiMangeApi.ts +4 -3
- package/src/controller/manage/AppMangeApi.ts +4 -5
- package/src/controller/manage/AppPageMangeApi.ts +4 -3
- package/src/controller/manage/CrudMethodsMangeApi.ts +4 -5
- package/src/controller/manage/DataDictManageApi.ts +7 -8
- package/src/controller/manage/DeployManageApi.ts +2 -3
- package/src/controller/manage/FlowConfigManageApi.ts +3 -5
- package/src/controller/manage/MenuManageApi.ts +4 -5
- package/src/controller/manage/ProxyApiMangeApi.ts +4 -5
- package/src/controller/manage/SysConfigMangeApi.ts +5 -5
- package/src/controller/manage/SystemInfoManageApi.ts +3 -1
- package/src/controller/manage/WorkbenchMangeApi.ts +4 -5
- package/src/index.ts +3 -0
- package/src/libs/crud-pro/models/TransactionSqlServer.ts +26 -4
- package/src/libs/crud-pro/services/CrudProCachedCfgService.ts +25 -43
- package/src/libs/crud-pro/utils/CrudMonitor.ts +0 -23
- package/src/libs/crud-pro/utils/pool/SqlServerUtils.ts +31 -0
- package/src/middleware/cacherefresh.middleware.ts +10 -71
- package/src/models/CacheRefreshCategory.ts +0 -17
- package/src/models/SystemEntities.ts +2 -0
- package/src/models/bizmodels.ts +0 -8
- package/src/schedule/scheduleNames.ts +5 -3
- package/src/service/SysAppService.ts +13 -66
- package/src/service/SysConfigService.ts +6 -39
- package/src/service/SysDictDataService.ts +11 -56
- package/src/service/SysMenuService.ts +4 -37
- package/src/service/WorkbenchService.ts +10 -68
- package/src/service/anyapi/AnyApiService.ts +5 -17
- package/src/service/base/bizmemcache/BizMemCacheService.ts +288 -0
- package/src/service/base/bizmemcache/BizMemCacheStore.ts +158 -0
- package/src/service/base/bizmemcache/BizMemCacheTypes.ts +76 -0
- package/src/service/base/cache-refresh/CacheRefreshHub.ts +0 -22
- package/src/service/base/cache-refresh/CacheRefreshHubScheduleService.ts +0 -6
- package/src/service/curd/CurdMixByDictService.ts +10 -61
- package/src/service/curd/CurdMixBySysConfigService.ts +9 -62
- package/src/service/curd/CurdMixByWorkbenchService.ts +7 -32
- package/src/service/curd/CurdProService.ts +0 -6
- package/src/service/proxyapi/ProxyApiLoadService.ts +39 -77
- package/src/service/proxyapi/ProxyApiService.ts +45 -9
- package/src/service/proxyapi/RouteTrie.ts +1 -18
|
@@ -12,25 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CurdMixByDictService = void 0;
|
|
13
13
|
const _ = require("lodash");
|
|
14
14
|
const core_1 = require("@midwayjs/core");
|
|
15
|
-
const CurdProService_1 = require("./CurdProService");
|
|
16
15
|
const CurdMixUtils_1 = require("./CurdMixUtils");
|
|
17
|
-
const SystemTables_1 = require("../../models/SystemTables");
|
|
18
|
-
const keys_1 = require("../../libs/crud-pro/models/keys");
|
|
19
16
|
const MultiKeyMap_1 = require("../../libs/crud-pro/utils/MultiKeyMap");
|
|
20
|
-
const
|
|
21
|
-
const CacheServiceFactory_1 = require("../base/cache/CacheServiceFactory");
|
|
22
|
-
const bizmodels_1 = require("../../models/bizmodels");
|
|
17
|
+
const BizMemCacheStore_1 = require("../../service/base/bizmemcache/BizMemCacheStore");
|
|
23
18
|
const TMP_CTX_KEY = _.uniqueId('CurdMixByDictService');
|
|
24
19
|
const dictMixUtils = new CurdMixUtils_1.CrudMixUtils(CurdMixUtils_1.RelatedType.dict);
|
|
25
20
|
let CurdMixByDictService = class CurdMixByDictService {
|
|
26
|
-
async getFromCache(code) {
|
|
27
|
-
const cacheService = this.cacheServiceFactory.getCacheServiceByName(bizmodels_1.CacheNameEnum.CurdMixByDict);
|
|
28
|
-
return cacheService.getJsonObject(code);
|
|
29
|
-
}
|
|
30
|
-
async setToCache(code, value) {
|
|
31
|
-
const cacheService = this.cacheServiceFactory.getCacheServiceByName(bizmodels_1.CacheNameEnum.CurdMixByDict);
|
|
32
|
-
return cacheService.setJsonObject(code, value);
|
|
33
|
-
}
|
|
34
21
|
async handleExecuteContextPrepare(executeContext) {
|
|
35
22
|
const codes = dictMixUtils.pickColumnRelationCodes(executeContext);
|
|
36
23
|
if (!codes || codes.length === 0) {
|
|
@@ -40,42 +27,17 @@ let CurdMixByDictService = class CurdMixByDictService {
|
|
|
40
27
|
executeContext[TMP_CTX_KEY] = new MultiKeyMap_1.MultiKeyMap(rows, 'dict_code', 'value');
|
|
41
28
|
}
|
|
42
29
|
async getDictItemRows(codes) {
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
// 从缓存里面取
|
|
46
|
-
let cachedRows = [];
|
|
47
|
-
for (let i = 0; i < codes.length; i++) {
|
|
48
|
-
const code = codes[i];
|
|
49
|
-
const rows1 = await this.getFromCache(code);
|
|
50
|
-
// const rows1 = [];
|
|
51
|
-
if (rows1 && rows1.length > 0) {
|
|
52
|
-
cachedRows = cachedRows.concat(rows1);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
noCacheCodes.push(code);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// 从数据库里面取
|
|
30
|
+
var _a;
|
|
31
|
+
const dictCodeMap = ((_a = BizMemCacheStore_1.bizMemCacheStore.getDataDictItem()) === null || _a === void 0 ? void 0 : _a.dictCodeMap) || {};
|
|
59
32
|
let selectedRows = [];
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
sqlTable: SystemTables_1.SystemTables.sys_data_dict_item,
|
|
66
|
-
sqlSimpleName: keys_1.KeysOfSimpleSQL.SIMPLE_QUERY,
|
|
67
|
-
sqlDatabase: SystemDbName,
|
|
68
|
-
sqlDbType: SystemDbType,
|
|
69
|
-
});
|
|
70
|
-
selectedRows = res1.getResRows();
|
|
71
|
-
//放到缓存里
|
|
72
|
-
for (let i = 0; i < noCacheCodes.length; i++) {
|
|
73
|
-
const noCacheCode = noCacheCodes[i];
|
|
74
|
-
const rows1 = selectedRows.filter(e => e.dict_code === noCacheCode);
|
|
75
|
-
await this.setToCache(noCacheCode, rows1);
|
|
33
|
+
for (let index = 0; index < codes.length; index++) {
|
|
34
|
+
const dict_code = codes[index];
|
|
35
|
+
const itemRows = dictCodeMap[dict_code];
|
|
36
|
+
if (Array.isArray(itemRows)) {
|
|
37
|
+
selectedRows = selectedRows.concat(itemRows);
|
|
76
38
|
}
|
|
77
39
|
}
|
|
78
|
-
return
|
|
40
|
+
return selectedRows;
|
|
79
41
|
}
|
|
80
42
|
async handleExecuteContext(executeContext) {
|
|
81
43
|
const multiKeyMap = executeContext[TMP_CTX_KEY];
|
|
@@ -101,14 +63,6 @@ __decorate([
|
|
|
101
63
|
(0, core_1.Inject)(),
|
|
102
64
|
__metadata("design:type", Object)
|
|
103
65
|
], CurdMixByDictService.prototype, "ctx", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
(0, core_1.Inject)(),
|
|
106
|
-
__metadata("design:type", CurdProService_1.CurdProService)
|
|
107
|
-
], CurdMixByDictService.prototype, "curdProService", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
(0, core_1.Inject)(),
|
|
110
|
-
__metadata("design:type", CacheServiceFactory_1.CacheServiceFactory)
|
|
111
|
-
], CurdMixByDictService.prototype, "cacheServiceFactory", void 0);
|
|
112
66
|
CurdMixByDictService = __decorate([
|
|
113
67
|
(0, core_1.Provide)()
|
|
114
68
|
], CurdMixByDictService);
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { Context } from '@midwayjs/koa';
|
|
2
|
-
import { CurdProService } from './CurdProService';
|
|
3
2
|
import { HandleExecuteContextType, IExecuteContextHandler } from '../../libs/crud-pro/models/ExecuteContext';
|
|
4
3
|
export declare class CurdMixBySysConfigService implements IExecuteContextHandler {
|
|
5
4
|
ctx: Context;
|
|
6
|
-
protected curdProService: CurdProService;
|
|
7
|
-
private cacheServiceFactory;
|
|
8
|
-
private getFromCache;
|
|
9
|
-
private setToCache;
|
|
10
5
|
private queryConfigRowsUseCache;
|
|
11
6
|
handleExecuteContextPrepare(executeContext: HandleExecuteContextType): Promise<void>;
|
|
12
7
|
handleExecuteContext(executeContext: HandleExecuteContextType): Promise<void>;
|
|
@@ -11,59 +11,22 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CurdMixBySysConfigService = void 0;
|
|
13
13
|
const core_1 = require("@midwayjs/core");
|
|
14
|
-
const CurdProService_1 = require("./CurdProService");
|
|
15
14
|
const CurdMixUtils_1 = require("./CurdMixUtils");
|
|
16
15
|
const _ = require("lodash");
|
|
17
|
-
const SystemTables_1 = require("../../models/SystemTables");
|
|
18
|
-
const keys_1 = require("../../libs/crud-pro/models/keys");
|
|
19
16
|
const MultiKeyMap_1 = require("../../libs/crud-pro/utils/MultiKeyMap");
|
|
20
17
|
const parseConfig_1 = require("../../libs/utils/parseConfig");
|
|
21
|
-
const
|
|
22
|
-
const CacheServiceFactory_1 = require("../base/cache/CacheServiceFactory");
|
|
23
|
-
const bizmodels_1 = require("../../models/bizmodels");
|
|
18
|
+
const BizMemCacheStore_1 = require("../../service/base/bizmemcache/BizMemCacheStore");
|
|
24
19
|
const dictMixUtils = new CurdMixUtils_1.CrudMixUtils(CurdMixUtils_1.RelatedType.sysCfgEnum);
|
|
25
20
|
const TMP_CTX_KEY = _.uniqueId('CurdMixBySysConfigService');
|
|
26
21
|
let CurdMixBySysConfigService = class CurdMixBySysConfigService {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
async queryConfigRowsUseCache(codes) {
|
|
36
|
-
const resultRowMap = {};
|
|
37
|
-
for (let i = 0; i < codes.length; i++) {
|
|
38
|
-
const code = codes[i];
|
|
39
|
-
const row = await this.getFromCache(code);
|
|
40
|
-
if (row) {
|
|
41
|
-
resultRowMap[code] = row;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
const notCachedCodes = codes.filter((code) => !resultRowMap[code]);
|
|
45
|
-
if (notCachedCodes.length === 0) {
|
|
46
|
-
return Object.values(resultRowMap);
|
|
47
|
-
}
|
|
48
|
-
const { SystemDbName, SystemDbType } = global_config_1.GLOBAL_STATIC_CONFIG.getConfig();
|
|
49
|
-
const res1 = await this.curdProService.executeCrudByCfg({
|
|
50
|
-
condition: { config_code: { $in: notCachedCodes }, deleted_at: 0, status: 1 },
|
|
51
|
-
}, {
|
|
52
|
-
sqlTable: SystemTables_1.SystemTables.sys_configs,
|
|
53
|
-
sqlSimpleName: keys_1.KeysOfSimpleSQL.SIMPLE_QUERY,
|
|
54
|
-
sqlDatabase: SystemDbName,
|
|
55
|
-
sqlDbType: SystemDbType,
|
|
22
|
+
queryConfigRowsUseCache(codes) {
|
|
23
|
+
var _a;
|
|
24
|
+
const codeSet = new Set(codes);
|
|
25
|
+
const sysConfigList = ((_a = BizMemCacheStore_1.bizMemCacheStore.getSysConfig()) === null || _a === void 0 ? void 0 : _a.sysConfigList) || [];
|
|
26
|
+
return sysConfigList.filter((row) => {
|
|
27
|
+
const { config_code } = row;
|
|
28
|
+
return codeSet.has(config_code);
|
|
56
29
|
});
|
|
57
|
-
const rows = res1.getResRows();
|
|
58
|
-
if (Array.isArray(rows) && rows.length > 0) {
|
|
59
|
-
for (let i = 0; i < rows.length; i++) {
|
|
60
|
-
const row = rows[i];
|
|
61
|
-
const { config_code } = row;
|
|
62
|
-
await this.setToCache(config_code, row);
|
|
63
|
-
resultRowMap[config_code] = row;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return Object.values(resultRowMap);
|
|
67
30
|
}
|
|
68
31
|
async handleExecuteContextPrepare(executeContext) {
|
|
69
32
|
const codes = dictMixUtils.pickColumnRelationCodes(executeContext);
|
|
@@ -71,7 +34,7 @@ let CurdMixBySysConfigService = class CurdMixBySysConfigService {
|
|
|
71
34
|
return;
|
|
72
35
|
}
|
|
73
36
|
const multiKeyMap = new MultiKeyMap_1.MultiKeyMap();
|
|
74
|
-
const rows =
|
|
37
|
+
const rows = this.queryConfigRowsUseCache(codes);
|
|
75
38
|
for (let i = 0; i < rows.length; i++) {
|
|
76
39
|
const row = rows[i];
|
|
77
40
|
const { config_code } = row;
|
|
@@ -104,14 +67,6 @@ __decorate([
|
|
|
104
67
|
(0, core_1.Inject)(),
|
|
105
68
|
__metadata("design:type", Object)
|
|
106
69
|
], CurdMixBySysConfigService.prototype, "ctx", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
(0, core_1.Inject)(),
|
|
109
|
-
__metadata("design:type", CurdProService_1.CurdProService)
|
|
110
|
-
], CurdMixBySysConfigService.prototype, "curdProService", void 0);
|
|
111
|
-
__decorate([
|
|
112
|
-
(0, core_1.Inject)(),
|
|
113
|
-
__metadata("design:type", CacheServiceFactory_1.CacheServiceFactory)
|
|
114
|
-
], CurdMixBySysConfigService.prototype, "cacheServiceFactory", void 0);
|
|
115
70
|
CurdMixBySysConfigService = __decorate([
|
|
116
71
|
(0, core_1.Provide)()
|
|
117
72
|
], CurdMixBySysConfigService);
|
|
@@ -4,7 +4,6 @@ import { HandleExecuteContextType, IExecuteContextHandler } from '../../libs/cru
|
|
|
4
4
|
export declare class CurdMixByWorkbenchService implements IExecuteContextHandler {
|
|
5
5
|
protected ctx: Context;
|
|
6
6
|
protected curdProService: CurdProService;
|
|
7
|
-
private cacheServiceFactory;
|
|
8
7
|
private loadWorkbenchListMap;
|
|
9
8
|
handleExecuteContextPrepare(executeContext: HandleExecuteContextType): Promise<void>;
|
|
10
9
|
handleExecuteContext(executeContext: HandleExecuteContextType): Promise<void>;
|
|
@@ -8,44 +8,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var CurdMixByWorkbenchService_1;
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
exports.CurdMixByWorkbenchService = void 0;
|
|
14
13
|
const core_1 = require("@midwayjs/core");
|
|
15
14
|
const _ = require("lodash");
|
|
16
15
|
const CurdProService_1 = require("./CurdProService");
|
|
17
16
|
const CurdMixUtils_1 = require("./CurdMixUtils");
|
|
18
|
-
const SystemTables_1 = require("../../models/SystemTables");
|
|
19
|
-
const keys_1 = require("../../libs/crud-pro/models/keys");
|
|
20
17
|
const MixinUtils_1 = require("../../libs/crud-pro/utils/MixinUtils");
|
|
21
|
-
const
|
|
22
|
-
const CacheServiceFactory_1 = require("../base/cache/CacheServiceFactory");
|
|
23
|
-
const bizmodels_1 = require("../../models/bizmodels");
|
|
18
|
+
const BizMemCacheStore_1 = require("../../service/base/bizmemcache/BizMemCacheStore");
|
|
24
19
|
const workbenchMixUtils = new CurdMixUtils_1.CrudMixUtils(CurdMixUtils_1.RelatedType.workbenchBasic);
|
|
25
20
|
const TMP_CTX_KEY = _.uniqueId('CurdMixByWorkbenchService');
|
|
26
|
-
let CurdMixByWorkbenchService =
|
|
21
|
+
let CurdMixByWorkbenchService = class CurdMixByWorkbenchService {
|
|
27
22
|
async loadWorkbenchListMap() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
cacheName: bizmodels_1.CacheNameEnum.CurdMixByWorkbench,
|
|
32
|
-
refreshCache: false,
|
|
33
|
-
getter: async (ctx) => {
|
|
34
|
-
const service = await ctx.requestContext.getAsync(CurdMixByWorkbenchService_1);
|
|
35
|
-
const reqJson = {
|
|
36
|
-
columns: 'workbench_code,workbench_name,workbench_domain',
|
|
37
|
-
condition: { deleted_at: 0, status: 1 },
|
|
38
|
-
};
|
|
39
|
-
const res = await service.curdProService.executeCrudByCfg(reqJson, {
|
|
40
|
-
sqlTable: SystemTables_1.SystemTables.sys_workbench,
|
|
41
|
-
sqlSimpleName: keys_1.KeysOfSimpleSQL.SIMPLE_QUERY,
|
|
42
|
-
sqlDatabase: SystemDbName,
|
|
43
|
-
sqlDbType: SystemDbType,
|
|
44
|
-
});
|
|
45
|
-
const workbenchList = res.getResRows();
|
|
46
|
-
return MixinUtils_1.MixinUtils.toNewMap(workbenchList, (obj) => obj.workbench_code);
|
|
47
|
-
},
|
|
48
|
-
});
|
|
23
|
+
var _a;
|
|
24
|
+
const workbenchList = ((_a = BizMemCacheStore_1.bizMemCacheStore.getWorkbench()) === null || _a === void 0 ? void 0 : _a.workbenchList) || [];
|
|
25
|
+
return MixinUtils_1.MixinUtils.toNewMap(workbenchList, (obj) => obj.workbench_code);
|
|
49
26
|
}
|
|
50
27
|
async handleExecuteContextPrepare(executeContext) {
|
|
51
28
|
const relations = workbenchMixUtils.pickColumnRelations(executeContext);
|
|
@@ -55,12 +32,12 @@ let CurdMixByWorkbenchService = CurdMixByWorkbenchService_1 = class CurdMixByWor
|
|
|
55
32
|
executeContext[TMP_CTX_KEY] = await this.loadWorkbenchListMap();
|
|
56
33
|
}
|
|
57
34
|
async handleExecuteContext(executeContext) {
|
|
58
|
-
const
|
|
59
|
-
if (!
|
|
35
|
+
const workbenchInfoMap = executeContext[TMP_CTX_KEY];
|
|
36
|
+
if (!workbenchInfoMap || workbenchInfoMap.size === 0) {
|
|
60
37
|
return;
|
|
61
38
|
}
|
|
62
39
|
workbenchMixUtils.forEachRowAndColumnsRelation(executeContext, (row, columnRelation) => {
|
|
63
|
-
workbenchMixUtils.copyColumnRelationToRowNoRelatedCode(row,
|
|
40
|
+
workbenchMixUtils.copyColumnRelationToRowNoRelatedCode(row, workbenchInfoMap, columnRelation);
|
|
64
41
|
});
|
|
65
42
|
}
|
|
66
43
|
};
|
|
@@ -72,11 +49,7 @@ __decorate([
|
|
|
72
49
|
(0, core_1.Inject)(),
|
|
73
50
|
__metadata("design:type", CurdProService_1.CurdProService)
|
|
74
51
|
], CurdMixByWorkbenchService.prototype, "curdProService", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, core_1.Inject)(),
|
|
77
|
-
__metadata("design:type", CacheServiceFactory_1.CacheServiceFactory)
|
|
78
|
-
], CurdMixByWorkbenchService.prototype, "cacheServiceFactory", void 0);
|
|
79
|
-
CurdMixByWorkbenchService = CurdMixByWorkbenchService_1 = __decorate([
|
|
52
|
+
CurdMixByWorkbenchService = __decorate([
|
|
80
53
|
(0, core_1.Provide)()
|
|
81
54
|
], CurdMixByWorkbenchService);
|
|
82
55
|
exports.CurdMixByWorkbenchService = CurdMixByWorkbenchService;
|
|
@@ -191,6 +191,5 @@ export declare class CurdProService extends BaseService {
|
|
|
191
191
|
* );
|
|
192
192
|
*/
|
|
193
193
|
getAllTableInfos(query: ITableNamesQuery, options?: ITableNamesOptions): Promise<ITableListResult>;
|
|
194
|
-
loadMethodCache(ctx?: any): Promise<void>;
|
|
195
194
|
loadTableMetaCache(ctx?: any): Promise<void>;
|
|
196
195
|
}
|
|
@@ -25,7 +25,6 @@ const crud_sharding_1 = require("../../libs/crud-sharding");
|
|
|
25
25
|
const fixCfgModel_1 = require("./fixCfgModel");
|
|
26
26
|
const global_config_1 = require("../../libs/global-config/global-config");
|
|
27
27
|
const fixSoftDelete_1 = require("../../libs/crud-pro-quick/fixSoftDelete");
|
|
28
|
-
const CrudProCachedCfgService_1 = require("../../libs/crud-pro/services/CrudProCachedCfgService");
|
|
29
28
|
function toVisitor(ctx) {
|
|
30
29
|
const workbenchInfo = ctx.workbenchInfo;
|
|
31
30
|
const userSession = ctx.userSession;
|
|
@@ -360,9 +359,6 @@ let CurdProService = class CurdProService extends BaseService_1.BaseService {
|
|
|
360
359
|
const curdPro = this.getCrudPro();
|
|
361
360
|
return curdPro.getAllTableInfos(query, options);
|
|
362
361
|
}
|
|
363
|
-
async loadMethodCache(ctx) {
|
|
364
|
-
(0, CrudProCachedCfgService_1.clearMethodCache)();
|
|
365
|
-
}
|
|
366
362
|
async loadTableMetaCache(ctx) {
|
|
367
363
|
const { SystemDbName, SystemDbType } = global_config_1.GLOBAL_STATIC_CONFIG.getConfig();
|
|
368
364
|
await this.getAllTableInfos({
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import { Context } from '@midwayjs/koa';
|
|
2
1
|
import { BaseService } from '../base/BaseService';
|
|
3
2
|
import { RouteTrie } from './RouteTrie';
|
|
4
3
|
/**
|
|
5
4
|
* 接口代理。 数据加载
|
|
6
5
|
*/
|
|
7
6
|
export declare class ProxyApiLoadService extends BaseService {
|
|
8
|
-
protected ctx: Context;
|
|
9
|
-
private curdProService;
|
|
10
7
|
private workbenchService;
|
|
11
8
|
/**
|
|
12
|
-
*
|
|
13
|
-
* 先构建全新的 RouteTrie,完成后原子替换,避免重建期间路由不可用
|
|
14
|
-
* @param workbench_code
|
|
9
|
+
* 获取站点路由树;routeTrieMap 为空或缺失时懒重建
|
|
15
10
|
*/
|
|
16
|
-
|
|
11
|
+
getRouteTrie(workbench_code: string): RouteTrie;
|
|
12
|
+
private buildRouteTrie;
|
|
17
13
|
private buildUpstreamMap;
|
|
18
14
|
private loadProxyApiEntity;
|
|
19
15
|
private addUpstreamInfo;
|
|
20
|
-
refreshRouteTrie(): Promise<any>;
|
|
21
16
|
}
|
|
@@ -15,16 +15,13 @@ const _ = require("lodash");
|
|
|
15
15
|
const BaseService_1 = require("../base/BaseService");
|
|
16
16
|
const RouteTrie_1 = require("./RouteTrie");
|
|
17
17
|
const RouteHandler_1 = require("./RouteHandler");
|
|
18
|
-
const CurdProService_1 = require("../curd/CurdProService");
|
|
19
|
-
const SystemTables_1 = require("../../models/SystemTables");
|
|
20
|
-
const keys_1 = require("../../libs/crud-pro/models/keys");
|
|
21
18
|
const functions_1 = require("../../libs/utils/functions");
|
|
22
19
|
const ProxyApiUtils_1 = require("./ProxyApiUtils");
|
|
23
20
|
const WeightedRandom_1 = require("./WeightedRandom");
|
|
24
21
|
const WeightedRoundRobin_1 = require("./WeightedRoundRobin");
|
|
22
|
+
const BizMemCacheStore_1 = require("../../service/base/bizmemcache/BizMemCacheStore");
|
|
25
23
|
const WorkbenchService_1 = require("../WorkbenchService");
|
|
26
24
|
const exceptions_1 = require("../../libs/crud-pro/exceptions");
|
|
27
|
-
const global_config_1 = require("../../libs/global-config/global-config");
|
|
28
25
|
function toUpstreamInfo(config_content) {
|
|
29
26
|
const obj = (0, functions_1.parseJsonObject)(config_content);
|
|
30
27
|
if (!obj) {
|
|
@@ -62,40 +59,41 @@ function toUpstreamInfo(config_content) {
|
|
|
62
59
|
*/
|
|
63
60
|
let ProxyApiLoadService = class ProxyApiLoadService extends BaseService_1.BaseService {
|
|
64
61
|
/**
|
|
65
|
-
*
|
|
66
|
-
* 先构建全新的 RouteTrie,完成后原子替换,避免重建期间路由不可用
|
|
67
|
-
* @param workbench_code
|
|
62
|
+
* 获取站点路由树;routeTrieMap 为空或缺失时懒重建
|
|
68
63
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
|
|
64
|
+
getRouteTrie(workbench_code) {
|
|
65
|
+
var _a;
|
|
66
|
+
const cacheObj = BizMemCacheStore_1.bizMemCacheStore.getSysProxyApi();
|
|
67
|
+
if ((_a = cacheObj === null || cacheObj === void 0 ? void 0 : cacheObj.routeTrieMap) === null || _a === void 0 ? void 0 : _a[workbench_code]) {
|
|
68
|
+
return cacheObj.routeTrieMap[workbench_code];
|
|
69
|
+
}
|
|
70
|
+
return this.buildRouteTrie(workbench_code);
|
|
71
|
+
}
|
|
72
|
+
buildRouteTrie(workbench_code) {
|
|
73
|
+
const upstreamMap = this.buildUpstreamMap();
|
|
74
|
+
const routeTrie = new RouteTrie_1.RouteTrie();
|
|
75
|
+
const entities = this.loadProxyApiEntity(workbench_code, upstreamMap);
|
|
73
76
|
for (let i = 0; i < entities.length; i++) {
|
|
74
77
|
const entity = entities[i];
|
|
75
78
|
if (entity.status === 1) {
|
|
76
79
|
const path_prefix2 = '/' + entity.upstream_code + entity.path_prefix;
|
|
77
|
-
|
|
80
|
+
routeTrie.addRoute(path_prefix2, new RouteHandler_1.RouteHandler(entity));
|
|
78
81
|
}
|
|
79
82
|
}
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
const cacheObj = BizMemCacheStore_1.bizMemCacheStore.getSysProxyApi();
|
|
84
|
+
if (cacheObj) {
|
|
85
|
+
if (!cacheObj.routeTrieMap) {
|
|
86
|
+
cacheObj.routeTrieMap = {};
|
|
87
|
+
}
|
|
88
|
+
cacheObj.routeTrieMap[workbench_code] = routeTrie;
|
|
89
|
+
}
|
|
90
|
+
return routeTrie;
|
|
82
91
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
condition: {
|
|
88
|
-
biz_tag: 'upstream',
|
|
89
|
-
deleted_at: 0,
|
|
90
|
-
},
|
|
91
|
-
}, {
|
|
92
|
-
sqlTable: SystemTables_1.SystemTables.sys_configs,
|
|
93
|
-
sqlDatabase: SystemDbName,
|
|
94
|
-
sqlDbType: SystemDbType,
|
|
95
|
-
sqlSimpleName: keys_1.KeysOfSimpleSQL.SIMPLE_QUERY,
|
|
96
|
-
});
|
|
92
|
+
buildUpstreamMap() {
|
|
93
|
+
var _a;
|
|
94
|
+
const sysConfigList = ((_a = BizMemCacheStore_1.bizMemCacheStore.getSysConfig()) === null || _a === void 0 ? void 0 : _a.sysConfigList) || [];
|
|
95
|
+
const rows = sysConfigList.filter((row) => row.biz_tag === 'upstream');
|
|
97
96
|
const upstreamMap = {};
|
|
98
|
-
const rows = res.getResRows();
|
|
99
97
|
for (let i = 0; i < rows.length; i++) {
|
|
100
98
|
const row = rows[i];
|
|
101
99
|
const { config_code, config_content } = row || {};
|
|
@@ -103,30 +101,24 @@ let ProxyApiLoadService = class ProxyApiLoadService extends BaseService_1.BaseSe
|
|
|
103
101
|
}
|
|
104
102
|
return upstreamMap;
|
|
105
103
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
sqlDatabase: SystemDbName,
|
|
113
|
-
sqlDbType: SystemDbType,
|
|
114
|
-
sqlSimpleName: keys_1.KeysOfSimpleSQL.SIMPLE_QUERY,
|
|
115
|
-
});
|
|
116
|
-
const rows0 = res.getResRows();
|
|
117
|
-
const rows = rows0.filter(s => {
|
|
104
|
+
loadProxyApiEntity(workbench_code, upstreamMap) {
|
|
105
|
+
var _a;
|
|
106
|
+
const rows0 = ((_a = BizMemCacheStore_1.bizMemCacheStore.getSysProxyApi()) === null || _a === void 0 ? void 0 : _a.sysProxyApiList) || [];
|
|
107
|
+
const rows = [];
|
|
108
|
+
for (let i = 0; i < rows0.length; i++) {
|
|
109
|
+
const s = rows0[i];
|
|
118
110
|
if (!(0, functions_1.isEntityOK)(s)) {
|
|
119
|
-
|
|
111
|
+
continue;
|
|
120
112
|
}
|
|
121
113
|
if (!s.workbench_code_array) {
|
|
122
114
|
throw new exceptions_1.CommonException('IS_SUPPORT_CURRENT_WORKBENCH', '未配置支持的站点字段');
|
|
123
115
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const row =
|
|
128
|
-
|
|
129
|
-
|
|
116
|
+
if (!this.workbenchService.isMatchWorkbenchCode(s.workbench_code_array, workbench_code)) {
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
const row = JSON.parse(JSON.stringify(s));
|
|
120
|
+
this.addUpstreamInfo(row, row.upstream_code, upstreamMap);
|
|
121
|
+
rows.push(row);
|
|
130
122
|
}
|
|
131
123
|
return rows;
|
|
132
124
|
}
|
|
@@ -141,27 +133,7 @@ let ProxyApiLoadService = class ProxyApiLoadService extends BaseService_1.BaseSe
|
|
|
141
133
|
row.weightedRandom = new WeightedRandom_1.WeightedRandom(upstreamInfo.targetList || []);
|
|
142
134
|
row.weightedRoundRobin = new WeightedRoundRobin_1.WeightedRoundRobin(upstreamInfo.targetList || []);
|
|
143
135
|
}
|
|
144
|
-
async refreshRouteTrie() {
|
|
145
|
-
const workbenchList = await this.workbenchService.getAllWorkbenchInfoList();
|
|
146
|
-
for (let i = 0; i < workbenchList.length; i++) {
|
|
147
|
-
const workbenchInfo = workbenchList[i];
|
|
148
|
-
try {
|
|
149
|
-
await this.buildRouteTrie(workbenchInfo.workbench_code);
|
|
150
|
-
}
|
|
151
|
-
catch (e) {
|
|
152
|
-
this.logError('ProxyApiLoadService_runBySchedule', e);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
136
|
};
|
|
157
|
-
__decorate([
|
|
158
|
-
(0, core_1.Inject)(),
|
|
159
|
-
__metadata("design:type", Object)
|
|
160
|
-
], ProxyApiLoadService.prototype, "ctx", void 0);
|
|
161
|
-
__decorate([
|
|
162
|
-
(0, core_1.Inject)(),
|
|
163
|
-
__metadata("design:type", CurdProService_1.CurdProService)
|
|
164
|
-
], ProxyApiLoadService.prototype, "curdProService", void 0);
|
|
165
137
|
__decorate([
|
|
166
138
|
(0, core_1.Inject)(),
|
|
167
139
|
__metadata("design:type", WorkbenchService_1.WorkbenchService)
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProxyApiService = void 0;
|
|
13
13
|
const core_1 = require("@midwayjs/core");
|
|
14
14
|
const _ = require("lodash");
|
|
15
|
-
const RouteTrie_1 = require("./RouteTrie");
|
|
16
15
|
const exceptions_1 = require("../../libs/crud-pro/exceptions");
|
|
17
16
|
const devops_1 = require("../../models/devops");
|
|
18
17
|
const CurdProService_1 = require("../curd/CurdProService");
|
|
@@ -23,6 +22,7 @@ const ProxyApiUtils_1 = require("./ProxyApiUtils");
|
|
|
23
22
|
const ProxyApiLoadService_1 = require("./ProxyApiLoadService");
|
|
24
23
|
const ApiBaseService_1 = require("../base/ApiBaseService");
|
|
25
24
|
const base64_1 = require("../../libs/utils/base64");
|
|
25
|
+
const functions_1 = require("../../libs/utils/functions");
|
|
26
26
|
/**
|
|
27
27
|
* 接口代理
|
|
28
28
|
*/
|
|
@@ -33,7 +33,7 @@ let ProxyApiService = class ProxyApiService extends ApiBaseService_1.ApiBaseServ
|
|
|
33
33
|
* @param upstream_path : 形如/[upstream_code]/[api_path]
|
|
34
34
|
*/
|
|
35
35
|
async handleProxyRequest(current_workbench_code, upstream_path) {
|
|
36
|
-
const routeTrie =
|
|
36
|
+
const routeTrie = this.proxyApiLoadService.getRouteTrie(current_workbench_code);
|
|
37
37
|
const ss = routeTrie.findLongestMatch(upstream_path);
|
|
38
38
|
if (!ss) {
|
|
39
39
|
throw new devops_1.BizException('路径没有匹配到', exceptions_1.Exceptions.CFG_NOT_FOUND);
|
|
@@ -69,16 +69,12 @@ let ProxyApiService = class ProxyApiService extends ApiBaseService_1.ApiBaseServ
|
|
|
69
69
|
// const response_type: ResponseType = (proxyApiEntity.response_type || 'stream') as any;
|
|
70
70
|
const response_type = 'stream';
|
|
71
71
|
try {
|
|
72
|
-
const headers =
|
|
73
|
-
|
|
74
|
-
host: targetUrl.host, // 设置正确的 host
|
|
75
|
-
};
|
|
76
|
-
delete headers['content-length'];
|
|
77
|
-
this.setRequestHeaders(headers, proxyApiEntity);
|
|
72
|
+
const headers = this.buildRequestHeaders(targetUrl.host, proxyApiEntity);
|
|
73
|
+
const requestBody = this.buildRequestBody(ctx.request.body, proxyApiEntity);
|
|
78
74
|
const axiosParams = {
|
|
79
75
|
method: ctx.method,
|
|
80
76
|
url: targetUrl.toString(),
|
|
81
|
-
data:
|
|
77
|
+
data: requestBody,
|
|
82
78
|
headers: headers,
|
|
83
79
|
responseType: response_type,
|
|
84
80
|
timeout: Number(proxyApiEntity.timeout_ms) || 5 * 60 * 1000,
|
|
@@ -227,6 +223,16 @@ let ProxyApiService = class ProxyApiService extends ApiBaseService_1.ApiBaseServ
|
|
|
227
223
|
const ss = targetList[proxyApiEntity.targetIndex];
|
|
228
224
|
return ss ? ss.origin : null;
|
|
229
225
|
}
|
|
226
|
+
buildRequestHeaders(targetHost, proxyApiEntity) {
|
|
227
|
+
const ctx = this.ctx;
|
|
228
|
+
const headers = {
|
|
229
|
+
...ctx.headers,
|
|
230
|
+
host: targetHost, // 设置正确的 host
|
|
231
|
+
};
|
|
232
|
+
delete headers['content-length'];
|
|
233
|
+
this.setRequestHeaders(headers, proxyApiEntity);
|
|
234
|
+
return headers;
|
|
235
|
+
}
|
|
230
236
|
setRequestHeaders(headers, proxyApiEntity) {
|
|
231
237
|
const ctx = this.ctx;
|
|
232
238
|
// 转发IP
|
|
@@ -251,6 +257,23 @@ let ProxyApiService = class ProxyApiService extends ApiBaseService_1.ApiBaseServ
|
|
|
251
257
|
if (proxyApiEntity.change_origin && proxyApiEntity.change_origin.length > 0) {
|
|
252
258
|
headers.origin = proxyApiEntity.change_origin;
|
|
253
259
|
}
|
|
260
|
+
// 强制设置自定义Header
|
|
261
|
+
const custom_header = (0, functions_1.parseJsonObject)(proxyApiEntity.custom_header);
|
|
262
|
+
if (custom_header && typeof custom_header === 'object' && Object.keys(custom_header).length > 0) {
|
|
263
|
+
Object.assign(headers, custom_header);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
buildRequestBody(requestBody, proxyApiEntity) {
|
|
267
|
+
// 强制设置自定义body
|
|
268
|
+
const custom_body = (0, functions_1.parseJsonObject)(proxyApiEntity.custom_body);
|
|
269
|
+
if (custom_body && typeof custom_body === 'object' && Object.keys(custom_body).length > 0) {
|
|
270
|
+
if (requestBody && typeof requestBody === 'object') {
|
|
271
|
+
Object.assign(requestBody, custom_body);
|
|
272
|
+
return requestBody;
|
|
273
|
+
}
|
|
274
|
+
return custom_body;
|
|
275
|
+
}
|
|
276
|
+
return requestBody;
|
|
254
277
|
}
|
|
255
278
|
buildUserContextHeader(proxyApiEntity) {
|
|
256
279
|
var _a, _b, _c;
|
|
@@ -8,10 +8,4 @@ declare class RouteTrie {
|
|
|
8
8
|
getRouteCount(): number;
|
|
9
9
|
findLongestMatch(path: string): any;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 原子替换指定 domainCode 的 RouteTrie
|
|
14
|
-
* 用于重建路由时先构建新树再整体替换,避免清空后重建期间路由不可用
|
|
15
|
-
*/
|
|
16
|
-
declare function setRouteTrie(domainCode: string, routeTrie: RouteTrie): void;
|
|
17
|
-
export { RouteTrie, getRouteTrie, setRouteTrie };
|
|
11
|
+
export { RouteTrie };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RouteTrie = void 0;
|
|
4
4
|
class RouteTrieNode {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.children = {}; // 子节点字典
|
|
@@ -54,19 +54,3 @@ class RouteTrie {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
exports.RouteTrie = RouteTrie;
|
|
57
|
-
const ROUTE_TRIE_MANAGER = {};
|
|
58
|
-
function getRouteTrie(domainCode) {
|
|
59
|
-
if (!ROUTE_TRIE_MANAGER[domainCode]) {
|
|
60
|
-
ROUTE_TRIE_MANAGER[domainCode] = new RouteTrie();
|
|
61
|
-
}
|
|
62
|
-
return ROUTE_TRIE_MANAGER[domainCode];
|
|
63
|
-
}
|
|
64
|
-
exports.getRouteTrie = getRouteTrie;
|
|
65
|
-
/**
|
|
66
|
-
* 原子替换指定 domainCode 的 RouteTrie
|
|
67
|
-
* 用于重建路由时先构建新树再整体替换,避免清空后重建期间路由不可用
|
|
68
|
-
*/
|
|
69
|
-
function setRouteTrie(domainCode, routeTrie) {
|
|
70
|
-
ROUTE_TRIE_MANAGER[domainCode] = routeTrie;
|
|
71
|
-
}
|
|
72
|
-
exports.setRouteTrie = setRouteTrie;
|