midway-fatcms 0.0.12 → 0.0.13
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/controller/gateway/DocGatewayController.js +7 -5
- package/dist/controller/gateway/PublicApiController.js +32 -3
- package/dist/controller/home.controller.js +2 -1
- package/dist/controller/manage/DataDictManageApi.d.ts +2 -0
- package/dist/controller/manage/DataDictManageApi.js +41 -9
- package/dist/controller/manage/DocManageApi.js +2 -2
- package/dist/controller/render/AppRenderController.js +7 -6
- package/dist/libs/crud-pro/CrudPro.d.ts +0 -1
- package/dist/libs/crud-pro/CrudPro.js +2 -11
- package/dist/libs/crud-pro/exceptions.d.ts +6 -0
- package/dist/libs/crud-pro/exceptions.js +6 -0
- package/dist/libs/crud-pro/utils/SqlErrorParseUtils.d.ts +22 -0
- package/dist/libs/crud-pro/utils/SqlErrorParseUtils.js +219 -0
- package/dist/libs/utils/functions.js +3 -0
- package/dist/service/anyapi/AnyApiService.js +1 -1
- package/dist/service/crudstd/CrudStdService.js +2 -2
- package/dist/service/curd/CurdMixByDictService.js +1 -1
- package/dist/service/curd/CurdMixBySysConfigService.js +1 -1
- package/dist/service/curd/CurdMixByWorkbenchService.js +1 -1
- package/dist/service/proxyapi/ProxyApiLoadService.js +3 -0
- package/package.json +1 -1
- package/src/controller/gateway/DocGatewayController.ts +9 -5
- package/src/controller/gateway/PublicApiController.ts +39 -4
- package/src/controller/home.controller.ts +3 -1
- package/src/controller/manage/DataDictManageApi.ts +48 -11
- package/src/controller/manage/DocManageApi.ts +2 -2
- package/src/controller/render/AppRenderController.ts +9 -7
- package/src/libs/crud-pro/CrudPro.ts +2 -12
- package/src/libs/crud-pro/exceptions.ts +6 -0
- package/src/libs/crud-pro/utils/SqlErrorParseUtils.ts +236 -0
- package/src/libs/utils/functions.ts +3 -0
- package/src/service/anyapi/AnyApiService.ts +2 -2
- package/src/service/crudstd/CrudStdService.ts +3 -3
- package/src/service/curd/CurdMixByDictService.ts +1 -1
- package/src/service/curd/CurdMixBySysConfigService.ts +1 -1
- package/src/service/curd/CurdMixByWorkbenchService.ts +1 -1
- package/src/service/proxyapi/ProxyApiLoadService.ts +4 -1
|
@@ -60,7 +60,7 @@ export class CurdMixBySysConfigService implements IExecuteContextHandler {
|
|
|
60
60
|
const { SystemDbName, SystemDbType } = GLOBAL_STATIC_CONFIG.getConfig();
|
|
61
61
|
const res1 = await this.curdProService.executeCrudByCfg(
|
|
62
62
|
{
|
|
63
|
-
condition: { config_code: { $in: notCachedCodes }, deleted_at: 0 },
|
|
63
|
+
condition: { config_code: { $in: notCachedCodes }, deleted_at: 0, status: 1 },
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
sqlTable: SystemTables.sys_configs,
|
|
@@ -38,7 +38,7 @@ export class CurdMixByWorkbenchService implements IExecuteContextHandler {
|
|
|
38
38
|
const service: CurdMixByWorkbenchService = await ctx.requestContext.getAsync(CurdMixByWorkbenchService);
|
|
39
39
|
const reqJson = {
|
|
40
40
|
columns: 'workbench_code,workbench_name,workbench_domain',
|
|
41
|
-
condition: { deleted_at: 0 },
|
|
41
|
+
condition: { deleted_at: 0, status: 1 },
|
|
42
42
|
};
|
|
43
43
|
const res = await service.curdProService.executeCrudByCfg(reqJson, {
|
|
44
44
|
sqlTable: SystemTables.sys_workbench,
|
|
@@ -8,7 +8,7 @@ import { CurdProService } from '../curd/CurdProService';
|
|
|
8
8
|
import { SystemTables } from '../../models/SystemTables';
|
|
9
9
|
import { KeysOfSimpleSQL } from '../../libs/crud-pro/models/keys';
|
|
10
10
|
import { IProxyApiEntity, IUpstreamInfo } from '../../models/SystemEntities';
|
|
11
|
-
import { parseJsonObject } from '../../libs/utils/functions';
|
|
11
|
+
import { isEntityOK, parseJsonObject } from '../../libs/utils/functions';
|
|
12
12
|
import { BALANCE_STRATEGY } from './ProxyApiUtils';
|
|
13
13
|
import { WeightedRandom } from './WeightedRandom';
|
|
14
14
|
import { WeightedRoundRobin } from './WeightedRoundRobin';
|
|
@@ -131,6 +131,9 @@ export class ProxyApiLoadService extends BaseService {
|
|
|
131
131
|
const rows0 = res.getResRows() as IProxyApiEntity[];
|
|
132
132
|
|
|
133
133
|
const rows = rows0.filter(s => {
|
|
134
|
+
if (!isEntityOK(s)) {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
134
137
|
if (!s.workbench_code_array) {
|
|
135
138
|
throw new CommonException('IS_SUPPORT_CURRENT_WORKBENCH', '未配置支持的站点字段');
|
|
136
139
|
}
|