midway-fatcms 0.0.1-beta.2 → 0.0.1-beta.22

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.
Files changed (265) hide show
  1. package/.eslintrc.json +12 -0
  2. package/.prettierrc.js +4 -0
  3. package/README.md +7 -0
  4. package/dist/config/config.default.js +52 -15
  5. package/dist/configuration.d.ts +1 -0
  6. package/dist/configuration.js +33 -8
  7. package/dist/controller/base/BaseApiController.d.ts +1 -1
  8. package/dist/controller/base/BaseApiController.js +14 -6
  9. package/dist/controller/gateway/AsyncTaskController.d.ts +14 -0
  10. package/dist/controller/gateway/AsyncTaskController.js +108 -0
  11. package/dist/controller/gateway/CrudMtdGatewayController.d.ts +3 -3
  12. package/dist/controller/gateway/CrudMtdGatewayController.js +9 -6
  13. package/dist/controller/gateway/CrudStdGatewayController.d.ts +5 -5
  14. package/dist/controller/gateway/DocGatewayController.js +14 -9
  15. package/dist/controller/gateway/PublicApiController.js +4 -6
  16. package/dist/controller/gateway/StaticController.d.ts +2 -0
  17. package/dist/controller/gateway/StaticController.js +59 -40
  18. package/dist/controller/helpers.controller.d.ts +1 -1
  19. package/dist/controller/home.controller.js +2 -2
  20. package/dist/controller/manage/AnyApiMangeApi.js +2 -2
  21. package/dist/controller/manage/AppLogMangeApi.js +2 -2
  22. package/dist/controller/manage/AppMangeApi.js +2 -2
  23. package/dist/controller/manage/AppPageMangeApi.js +2 -2
  24. package/dist/controller/manage/AppSchemaHistoryApi.js +2 -2
  25. package/dist/controller/manage/CrudMethodsMangeApi.js +2 -2
  26. package/dist/controller/manage/CrudStandardDesignApi.d.ts +1 -1
  27. package/dist/controller/manage/CrudStandardDesignApi.js +78 -75
  28. package/dist/controller/manage/DataDictManageApi.d.ts +1 -1
  29. package/dist/controller/manage/DataDictManageApi.js +1 -1
  30. package/dist/controller/manage/DeployManageApi.d.ts +1 -1
  31. package/dist/controller/manage/DeployManageApi.js +38 -34
  32. package/dist/controller/manage/DocLibManageApi.js +2 -2
  33. package/dist/controller/manage/DocManageApi.js +2 -2
  34. package/dist/controller/manage/FileManageApi.js +1 -1
  35. package/dist/controller/manage/LowCodeTplManageApi.js +2 -2
  36. package/dist/controller/manage/MenuManageApi.js +2 -2
  37. package/dist/controller/manage/ProxyApiMangeApi.js +2 -2
  38. package/dist/controller/manage/SuperAdminManageApi.d.ts +2 -2
  39. package/dist/controller/manage/SuperAdminManageApi.js +12 -8
  40. package/dist/controller/manage/SysConfigMangeApi.d.ts +1 -1
  41. package/dist/controller/manage/SysConfigMangeApi.js +8 -6
  42. package/dist/controller/manage/SystemInfoManageApi.d.ts +1 -1
  43. package/dist/controller/manage/SystemInfoManageApi.js +7 -1
  44. package/dist/controller/manage/UserAccountManageApi.d.ts +2 -2
  45. package/dist/controller/manage/UserAccountManageApi.js +7 -2
  46. package/dist/controller/manage/WorkbenchMangeApi.js +3 -3
  47. package/dist/controller/myinfo/AuthController.d.ts +0 -4
  48. package/dist/controller/myinfo/AuthController.js +1 -54
  49. package/dist/controller/render/AppRenderController.js +10 -4
  50. package/dist/controller/test.controller.d.ts +1 -1
  51. package/dist/controller/test.controller.js +5 -5
  52. package/dist/index.d.ts +34 -4
  53. package/dist/index.js +34 -4
  54. package/dist/libs/crud-pro/CrudPro.d.ts +1 -0
  55. package/dist/libs/crud-pro/CrudPro.js +5 -0
  56. package/dist/libs/crud-pro/defaultConfigs.js +2 -0
  57. package/dist/libs/crud-pro/interfaces.d.ts +7 -1
  58. package/dist/libs/crud-pro/models/ExecuteContext.d.ts +2 -1
  59. package/dist/libs/crud-pro/models/ExecuteContextFunc.d.ts +8 -1
  60. package/dist/libs/crud-pro/models/ExecuteContextFunc.js +8 -0
  61. package/dist/libs/crud-pro/models/RequestCfgModel.d.ts +1 -1
  62. package/dist/libs/crud-pro/models/ResModel.d.ts +16 -0
  63. package/dist/libs/crud-pro/models/ResModel.js +2 -0
  64. package/dist/libs/crud-pro/models/SqlCfgModel.d.ts +1 -1
  65. package/dist/libs/crud-pro/models/TransactionSqlServer.js +1 -1
  66. package/dist/libs/crud-pro/services/CrudProCachedCfgService.d.ts +1 -0
  67. package/dist/libs/crud-pro/services/CrudProCachedCfgService.js +27 -15
  68. package/dist/libs/crud-pro/services/CrudProExecuteSqlService.js +13 -17
  69. package/dist/libs/crud-pro/services/CrudProGenSqlCondition.d.ts +1 -1
  70. package/dist/libs/crud-pro/services/CrudProGenSqlCondition.js +10 -12
  71. package/dist/libs/crud-pro/services/CrudProGenSqlService.js +14 -23
  72. package/dist/libs/crud-pro/services/CrudProOriginToExecuteSql.js +7 -6
  73. package/dist/libs/crud-pro/services/CrudProServiceBase.d.ts +2 -6
  74. package/dist/libs/crud-pro/services/CrudProServiceBase.js +3 -2
  75. package/dist/libs/crud-pro/services/CrudProTableMetaService.d.ts +1 -0
  76. package/dist/libs/crud-pro/services/CrudProTableMetaService.js +32 -7
  77. package/dist/libs/crud-pro/utils/DatabaseName.js +24 -3
  78. package/dist/libs/crud-pro/utils/MixinUtils.js +1 -1
  79. package/dist/libs/crud-pro/utils/ValidateUtils.js +1 -1
  80. package/dist/libs/crud-pro/utils/sqlConvert/convertColumnName.js +2 -2
  81. package/dist/libs/crud-pro/utils/sqlConvert/convertMix.d.ts +3 -0
  82. package/dist/libs/crud-pro/utils/sqlConvert/convertMix.js +22 -0
  83. package/dist/libs/global-config/global-config.d.ts +45 -0
  84. package/dist/libs/global-config/global-config.js +33 -0
  85. package/dist/libs/utils/errorToString.d.ts +2 -0
  86. package/dist/libs/utils/errorToString.js +57 -0
  87. package/dist/libs/utils/fatcms-request.js +2 -2
  88. package/dist/middleware/forbidden.middleware.js +4 -20
  89. package/dist/middleware/global.middleware.js +8 -1
  90. package/dist/models/AsyncTaskModel.d.ts +69 -0
  91. package/dist/models/AsyncTaskModel.js +26 -0
  92. package/dist/models/RedisKeys.d.ts +8 -0
  93. package/dist/models/RedisKeys.js +11 -0
  94. package/dist/models/SystemTables.d.ts +1 -3
  95. package/dist/models/SystemTables.js +2 -4
  96. package/dist/schedule/anonymousContext.d.ts +13 -0
  97. package/dist/schedule/anonymousContext.js +59 -0
  98. package/dist/schedule/index.d.ts +4 -3
  99. package/dist/schedule/index.js +8 -67
  100. package/dist/schedule/runSchedule.d.ts +15 -0
  101. package/dist/schedule/runSchedule.js +68 -0
  102. package/dist/schedule/scheduleNames.d.ts +13 -0
  103. package/dist/schedule/scheduleNames.js +17 -0
  104. package/dist/service/AuthService.js +8 -5
  105. package/dist/service/EnumInfoService.js +7 -4
  106. package/dist/service/FileCenterService.js +13 -9
  107. package/dist/service/SysConfigService.js +4 -2
  108. package/dist/service/UserAccountService.js +10 -6
  109. package/dist/service/UserSessionService.js +2 -1
  110. package/dist/service/VisitStatService.d.ts +1 -1
  111. package/dist/service/VisitStatService.js +20 -27
  112. package/dist/service/WorkbenchService.js +4 -2
  113. package/dist/service/anyapi/AnyApiService.js +4 -2
  114. package/dist/service/asyncTask/AsyncTaskRunnerService.d.ts +37 -0
  115. package/dist/service/asyncTask/AsyncTaskRunnerService.js +232 -0
  116. package/dist/service/asyncTask/AsyncTaskService.d.ts +7 -0
  117. package/dist/service/asyncTask/AsyncTaskService.js +34 -0
  118. package/dist/service/crudstd/CrudStdService.d.ts +2 -1
  119. package/dist/service/crudstd/CrudStdService.js +48 -3
  120. package/dist/service/curd/CrudProQuick.d.ts +24 -0
  121. package/dist/service/curd/CrudProQuick.js +105 -0
  122. package/dist/service/curd/CurdMixByAccountService.js +12 -6
  123. package/dist/service/curd/CurdMixByDictService.js +4 -2
  124. package/dist/service/curd/CurdMixByLinkToCustomService.d.ts +10 -1
  125. package/dist/service/curd/CurdMixByLinkToCustomService.js +72 -24
  126. package/dist/service/curd/CurdMixBySysConfigService.js +4 -2
  127. package/dist/service/curd/CurdMixByWorkbenchService.js +4 -2
  128. package/dist/service/curd/CurdMixService.d.ts +1 -1
  129. package/dist/service/curd/CurdMixService.js +2 -2
  130. package/dist/service/curd/CurdMixUtils.d.ts +7 -0
  131. package/dist/service/curd/CurdMixUtils.js +65 -28
  132. package/dist/service/curd/CurdProService.d.ts +2 -10
  133. package/dist/service/curd/CurdProService.js +31 -146
  134. package/dist/service/curd/fixCfgModel.d.ts +3 -0
  135. package/dist/service/curd/fixCfgModel.js +107 -0
  136. package/dist/service/proxyapi/ProxyApiLoadService.js +7 -4
  137. package/dist/views/404_app.html +31 -0
  138. package/dist/views/404_workbench.html +34 -0
  139. package/dist/views/static/favicon.ico +0 -0
  140. package/package.json +9 -2
  141. package/src/config/config.default.ts +58 -27
  142. package/src/configuration.ts +42 -9
  143. package/src/controller/base/BaseApiController.ts +26 -19
  144. package/src/controller/gateway/AnyApiGatewayController.ts +1 -1
  145. package/src/controller/gateway/AsyncTaskController.ts +83 -0
  146. package/src/controller/gateway/CrudMtdGatewayController.ts +17 -13
  147. package/src/controller/gateway/CrudStdGatewayController.ts +4 -4
  148. package/src/controller/gateway/DocGatewayController.ts +25 -17
  149. package/src/controller/gateway/FileController.ts +8 -9
  150. package/src/controller/gateway/ProxyApiGatewayController.ts +4 -4
  151. package/src/controller/gateway/PublicApiController.ts +19 -22
  152. package/src/controller/gateway/StaticController.ts +234 -242
  153. package/src/controller/helpers.controller.ts +1 -1
  154. package/src/controller/home.controller.ts +8 -15
  155. package/src/controller/manage/AnyApiMangeApi.ts +11 -11
  156. package/src/controller/manage/AppLogMangeApi.ts +5 -5
  157. package/src/controller/manage/AppMangeApi.ts +7 -7
  158. package/src/controller/manage/AppPageMangeApi.ts +5 -5
  159. package/src/controller/manage/AppSchemaHistoryApi.ts +3 -3
  160. package/src/controller/manage/CrudMethodsMangeApi.ts +5 -5
  161. package/src/controller/manage/CrudStandardDesignApi.ts +106 -113
  162. package/src/controller/manage/DataDictManageApi.ts +5 -5
  163. package/src/controller/manage/DeployManageApi.ts +85 -89
  164. package/src/controller/manage/DocLibManageApi.ts +5 -5
  165. package/src/controller/manage/DocManageApi.ts +10 -10
  166. package/src/controller/manage/FileManageApi.ts +1 -1
  167. package/src/controller/manage/LowCodeTplManageApi.ts +2 -2
  168. package/src/controller/manage/MenuManageApi.ts +10 -15
  169. package/src/controller/manage/ProxyApiMangeApi.ts +2 -2
  170. package/src/controller/manage/SuperAdminManageApi.ts +14 -13
  171. package/src/controller/manage/SysConfigMangeApi.ts +11 -11
  172. package/src/controller/manage/SystemInfoManageApi.ts +11 -6
  173. package/src/controller/manage/UserAccountManageApi.ts +10 -4
  174. package/src/controller/manage/WorkbenchMangeApi.ts +8 -8
  175. package/src/controller/myinfo/AuthController.ts +6 -72
  176. package/src/controller/render/AppRenderController.ts +24 -21
  177. package/src/controller/test.controller.ts +18 -18
  178. package/src/index.ts +38 -4
  179. package/src/libs/crud-pro/CrudPro.ts +7 -0
  180. package/src/libs/crud-pro/defaultConfigs.ts +2 -0
  181. package/src/libs/crud-pro/interfaces.ts +10 -3
  182. package/src/libs/crud-pro/models/ExecuteContext.ts +3 -3
  183. package/src/libs/crud-pro/models/ExecuteContextFunc.ts +11 -1
  184. package/src/libs/crud-pro/models/RequestCfgModel.ts +1 -1
  185. package/src/libs/crud-pro/models/RequestModel.ts +1 -1
  186. package/src/libs/crud-pro/models/ResModel.ts +19 -0
  187. package/src/libs/crud-pro/models/SqlCfgModel.ts +2 -2
  188. package/src/libs/crud-pro/models/Transaction.ts +8 -9
  189. package/src/libs/crud-pro/models/TransactionPostgres.ts +1 -1
  190. package/src/libs/crud-pro/models/TransactionSqlServer.ts +8 -13
  191. package/src/libs/crud-pro/services/CrudProCachedCfgService.ts +32 -23
  192. package/src/libs/crud-pro/services/CrudProExecuteSqlService.ts +38 -54
  193. package/src/libs/crud-pro/services/CrudProGenSqlCondition.ts +26 -45
  194. package/src/libs/crud-pro/services/CrudProGenSqlService.ts +23 -40
  195. package/src/libs/crud-pro/services/CrudProOriginToExecuteSql.ts +25 -29
  196. package/src/libs/crud-pro/services/CrudProServiceBase.ts +5 -9
  197. package/src/libs/crud-pro/services/CrudProTableMetaService.ts +36 -9
  198. package/src/libs/crud-pro/utils/DatabaseName.ts +35 -15
  199. package/src/libs/crud-pro/utils/DateTimeUtils.ts +2 -2
  200. package/src/libs/crud-pro/utils/MixinUtils.ts +1 -1
  201. package/src/libs/crud-pro/utils/ValidateUtils.ts +1 -3
  202. package/src/libs/crud-pro/utils/pool/MySQLUtils.ts +1 -1
  203. package/src/libs/crud-pro/utils/pool/PostgresUtils.ts +3 -3
  204. package/src/libs/crud-pro/utils/pool/SqlServerUtils.ts +3 -3
  205. package/src/libs/crud-pro/utils/sqlConvert/convertColumnName.ts +2 -2
  206. package/src/libs/crud-pro/utils/sqlConvert/convertMix.ts +26 -0
  207. package/src/libs/global-config/global-config.ts +78 -0
  208. package/src/libs/utils/crypto-utils.ts +2 -4
  209. package/src/libs/utils/errorToString.ts +61 -0
  210. package/src/libs/utils/fatcms-request.ts +9 -21
  211. package/src/libs/utils/ordernum-utils.ts +2 -6
  212. package/src/libs/utils/parseConfig.ts +7 -15
  213. package/src/middleware/forbidden.middleware.ts +6 -25
  214. package/src/middleware/global.middleware.ts +18 -16
  215. package/src/models/AsyncTaskModel.ts +79 -0
  216. package/src/models/RedisKeys.ts +13 -0
  217. package/src/models/SystemTables.ts +1 -4
  218. package/src/models/bizmodels.ts +1 -2
  219. package/src/schedule/anonymousContext.ts +79 -0
  220. package/src/schedule/index.ts +11 -72
  221. package/src/schedule/runSchedule.ts +83 -0
  222. package/src/schedule/scheduleNames.ts +21 -0
  223. package/src/service/AuthService.ts +13 -8
  224. package/src/service/EnumInfoService.ts +8 -3
  225. package/src/service/FileCenterService.ts +12 -6
  226. package/src/service/SysConfigService.ts +10 -6
  227. package/src/service/UserAccountService.ts +14 -4
  228. package/src/service/UserSessionService.ts +5 -4
  229. package/src/service/VisitStatService.ts +57 -70
  230. package/src/service/WorkbenchService.ts +7 -2
  231. package/src/service/anyapi/AnyApiService.ts +11 -8
  232. package/src/service/asyncTask/AsyncTaskRunnerService.ts +255 -0
  233. package/src/service/asyncTask/AsyncTaskService.ts +21 -0
  234. package/src/service/base/BaseService.ts +2 -2
  235. package/src/service/crudstd/CrudStdService.ts +60 -5
  236. package/src/service/curd/CrudProQuick.ts +137 -0
  237. package/src/service/curd/CurdMixByAccountService.ts +14 -6
  238. package/src/service/curd/CurdMixByDictService.ts +8 -2
  239. package/src/service/curd/CurdMixByLinkToCustomService.ts +101 -50
  240. package/src/service/curd/CurdMixBySysConfigService.ts +7 -2
  241. package/src/service/curd/CurdMixByWorkbenchService.ts +6 -2
  242. package/src/service/curd/CurdMixService.ts +3 -3
  243. package/src/service/curd/CurdMixUtils.ts +82 -39
  244. package/src/service/curd/CurdProService.ts +45 -189
  245. package/src/service/curd/fixCfgModel.ts +139 -0
  246. package/src/service/proxyapi/ProxyApiLoadService.ts +12 -3
  247. package/src/views/404_app.html +31 -0
  248. package/src/views/404_workbench.html +34 -0
  249. package/src/views/static/favicon.ico +0 -0
  250. package/tsconfig.json +32 -0
  251. package/dist/controller/medstatistic/MedAdminController.d.ts +0 -35
  252. package/dist/controller/medstatistic/MedAdminController.js +0 -205
  253. package/dist/controller/medstatistic/MedClientController.d.ts +0 -28
  254. package/dist/controller/medstatistic/MedClientController.js +0 -188
  255. package/dist/controller/medstatistic/MedMessageService.d.ts +0 -19
  256. package/dist/controller/medstatistic/MedMessageService.js +0 -95
  257. package/dist/controller/medstatistic/MedScoreService.d.ts +0 -21
  258. package/dist/controller/medstatistic/MedScoreService.js +0 -107
  259. package/dist/controller/medstatistic/constants.d.ts +0 -32
  260. package/dist/controller/medstatistic/constants.js +0 -43
  261. package/src/controller/medstatistic/MedAdminController.ts +0 -221
  262. package/src/controller/medstatistic/MedClientController.ts +0 -188
  263. package/src/controller/medstatistic/MedMessageService.ts +0 -89
  264. package/src/controller/medstatistic/MedScoreService.ts +0 -108
  265. package/src/controller/medstatistic/constants.ts +0 -63
@@ -1,71 +1,70 @@
1
- import {Controller, Fields, Files, Inject, Post, Query} from '@midwayjs/core';
2
- import {Context} from '@midwayjs/koa';
3
- import {BaseApiController} from '../base/BaseApiController';
4
- import {checkPermission} from '../../middleware/permission.middleware';
5
- import {SystemFuncCode} from '../../models/SystemPerm';
6
- import {CommonResult} from "../../libs/utils/common-dto";
7
- import {AccessType, UploadCategoryType} from "../../models/bizmodels";
8
- import {BizException} from "../../models/devops";
9
- import {FileCenterService, toDownloadPaths} from '../../service/FileCenterService';
10
- import {SystemDbName, SystemDbType, SystemTables} from "../../models/SystemTables";
11
- import {KeysOfSimpleSQL} from "../../libs/crud-pro/models/keys";
12
- import {WorkbenchService} from "../../service/WorkbenchService";
13
-
1
+ import { Controller, Fields, Files, Inject, Post, Query } from '@midwayjs/core';
2
+ import { Context } from '@midwayjs/koa';
3
+ import { BaseApiController } from '../base/BaseApiController';
4
+ import { checkPermission } from '../../middleware/permission.middleware';
5
+ import { SystemFuncCode } from '../../models/SystemPerm';
6
+ import { CommonResult } from '../../libs/utils/common-dto';
7
+ import { AccessType, UploadCategoryType } from '../../models/bizmodels';
8
+ import { BizException } from '../../models/devops';
9
+ import { FileCenterService, toDownloadPaths } from '../../service/FileCenterService';
10
+ import { SystemTables } from '../../models/SystemTables';
11
+ import { KeysOfSimpleSQL } from '../../libs/crud-pro/models/keys';
12
+ import { WorkbenchService } from '../../service/WorkbenchService';
13
+ import { GLOBAL_STATIC_CONFIG } from '@/libs/global-config/global-config';
14
14
 
15
15
  interface IReleaseAssetsParams {
16
- cdnResources: any[],
17
- packageName: string,
18
- packageVersion: string,
16
+ cdnResources: any[];
17
+ packageName: string;
18
+ packageVersion: string;
19
19
  }
20
20
 
21
-
22
21
  function toAssetsSchema(fileList: any) {
23
22
  for (let i = 0; i < fileList.length; i++) {
24
23
  const fileListElement = fileList[i];
25
- fileListElement.settingKey = "assets"+i;
24
+ fileListElement.settingKey = 'assets' + i;
26
25
  }
27
26
  return {
28
- "schema": [{
29
- "title": "资源配置",
30
- "name": "fileList",
31
- "type": "array",
32
- "properties": {
33
- "fileUrl": {"label": "文件URL", "component": "Input", "xProps": {"hasClear": true}, "width": 500},
34
- "fileType": {
35
- "label": "文件类型",
36
- "component": "Select",
37
- enums: [
38
- {label: 'js', value: 'js'},
39
- {label: 'css', value: 'css'},
40
- ],
41
- "xProps": {
42
- "hasClear": true
27
+ schema: [
28
+ {
29
+ title: '资源配置',
30
+ name: 'fileList',
31
+ type: 'array',
32
+ properties: {
33
+ fileUrl: { label: '文件URL', component: 'Input', xProps: { hasClear: true }, width: 500 },
34
+ fileType: {
35
+ label: '文件类型',
36
+ component: 'Select',
37
+ enums: [
38
+ { label: 'js', value: 'js' },
39
+ { label: 'css', value: 'css' },
40
+ ],
41
+ xProps: {
42
+ hasClear: true,
43
+ },
44
+ width: 500,
43
45
  },
44
- width: 500
45
- },
46
- "isModule": {
47
- "label": "isModule",
48
- "component": "Select",
49
- enums: [
50
- {label: 'true', value: true},
51
- {label: 'false', value: false},
52
- ],
53
- "xProps": {
54
- "hasClear": true
46
+ isModule: {
47
+ label: 'isModule',
48
+ component: 'Select',
49
+ enums: [
50
+ { label: 'true', value: true },
51
+ { label: 'false', value: false },
52
+ ],
53
+ xProps: {
54
+ hasClear: true,
55
+ },
56
+ width: 500,
55
57
  },
56
- width: 500
57
58
  },
58
-
59
- }
60
- }],
61
- "data": {
62
- "fileList": fileList
63
- }
59
+ },
60
+ ],
61
+ data: {
62
+ fileList: fileList,
63
+ },
64
64
  };
65
65
  }
66
66
 
67
-
68
- @Controller('/ns/api/manage/deploy', { middleware: [checkPermission([ SystemFuncCode.AppMangeRead, SystemFuncCode.WorkbenchMangeRead])] })
67
+ @Controller('/ns/api/manage/deploy', { middleware: [checkPermission([SystemFuncCode.AppMangeRead, SystemFuncCode.WorkbenchMangeRead])] })
69
68
  export class DeployManageApi extends BaseApiController {
70
69
  @Inject()
71
70
  protected ctx: Context;
@@ -108,7 +107,6 @@ export class DeployManageApi extends BaseApiController {
108
107
  return CommonResult.successRes(data);
109
108
  }
110
109
 
111
-
112
110
  /**
113
111
  * 资源文件让其生效
114
112
  */
@@ -123,57 +121,55 @@ export class DeployManageApi extends BaseApiController {
123
121
  throw new BizException('packageName参数小于5');
124
122
  }
125
123
 
126
- const cdnResources = params.cdnResources
124
+ const cdnResources = params.cdnResources;
127
125
  if (!Array.isArray(cdnResources) || cdnResources.length === 0) {
128
126
  throw new BizException('cdnResources参数不存在');
129
127
  }
130
128
 
131
- const workbench = await this.curdMixService.executeCrudByCfg({
132
- data: {
133
- package_assets: JSON.stringify(toAssetsSchema(cdnResources)),
129
+ const { SystemDbName, SystemDbType } = GLOBAL_STATIC_CONFIG.getConfig();
130
+
131
+ const workbench = await this.curdMixService.executeCrudByCfg(
132
+ {
133
+ data: {
134
+ package_assets: JSON.stringify(toAssetsSchema(cdnResources)),
135
+ },
136
+ condition: {
137
+ package_name: params.packageName,
138
+ },
134
139
  },
135
- condition: {
136
- package_name: params.packageName
140
+ {
141
+ sqlTable: SystemTables.sys_workbench,
142
+ sqlDatabase: SystemDbName,
143
+ sqlDbType: SystemDbType,
144
+ sqlSimpleName: KeysOfSimpleSQL.SIMPLE_UPDATE,
137
145
  }
138
- },{
139
- sqlTable: SystemTables.sys_workbench,
140
- sqlDatabase: SystemDbName,
141
- sqlDdType: SystemDbType,
142
- sqlSimpleName: KeysOfSimpleSQL.SIMPLE_UPDATE
143
- });
146
+ );
144
147
 
145
-
146
-
147
- const app = await this.curdMixService.executeCrudByCfg({
148
- data: {
149
- package_assets: JSON.stringify(toAssetsSchema(cdnResources)),
148
+ const app = await this.curdMixService.executeCrudByCfg(
149
+ {
150
+ data: {
151
+ package_assets: JSON.stringify(toAssetsSchema(cdnResources)),
152
+ },
153
+ condition: {
154
+ package_name: params.packageName,
155
+ },
150
156
  },
151
- condition: {
152
- package_name: params.packageName
157
+ {
158
+ sqlTable: SystemTables.sys_app,
159
+ sqlDatabase: SystemDbName,
160
+ sqlDbType: SystemDbType,
161
+ sqlSimpleName: KeysOfSimpleSQL.SIMPLE_UPDATE,
153
162
  }
154
- },{
155
- sqlTable: SystemTables.sys_app,
156
- sqlDatabase: SystemDbName,
157
- sqlDdType: SystemDbType,
158
- sqlSimpleName: KeysOfSimpleSQL.SIMPLE_UPDATE
159
- });
160
-
163
+ );
161
164
 
162
165
  this.workbenchService.clearCache();
163
166
 
164
167
  const workbenchAffected = workbench.getResModelItem('affected') || {};
165
168
  const appAffected = app.getResModelItem('affected') || {};
166
169
 
167
- const result = CommonResult.successRes({workbenchAffected, appAffected});
170
+ const result = CommonResult.successRes({ workbenchAffected, appAffected });
168
171
 
169
- result.message = `${cdnResources.length}个文件,更新到${workbenchAffected.affectedRows}个站点模版;更新到${appAffected.affectedRows}个应用模版,`
172
+ result.message = `${cdnResources.length}个文件,更新到${workbenchAffected.affectedRows}个站点模版;更新到${appAffected.affectedRows}个应用模版,`;
170
173
  return result;
171
174
  }
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
175
  }
@@ -30,7 +30,7 @@ export class DocLibManageApi extends BaseApiController {
30
30
  });
31
31
  }
32
32
 
33
- @Post('/createDocLib', { middleware: [checkPermission(SystemFuncCode.DocMangeWrite)] })
33
+ @Post('/createDocLib', { middleware: [checkPermission(SystemFuncCode.DocMangeWrite)] })
34
34
  async createDocLib() {
35
35
  return this.executeSysSimpleSQL(SystemTables.sys_doc_lib, KeysOfSimpleSQL.SIMPLE_INSERT, {
36
36
  validateCfg: {
@@ -42,11 +42,11 @@ export class DocLibManageApi extends BaseApiController {
42
42
  });
43
43
  }
44
44
 
45
- @Post('/updateDocLib', { middleware: [checkPermission(SystemFuncCode.DocMangeWrite)] })
45
+ @Post('/updateDocLib', { middleware: [checkPermission(SystemFuncCode.DocMangeWrite)] })
46
46
  async updateDocLib() {
47
47
  return this.executeSysSimpleSQL(SystemTables.sys_doc_lib, KeysOfSimpleSQL.SIMPLE_UPDATE, {
48
48
  validateCfg: {
49
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
49
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
50
50
  'data.title': [KeysOfValidators.REQUIRED, KeysOfValidators.STRING],
51
51
  },
52
52
  updateCfg: {
@@ -55,11 +55,11 @@ export class DocLibManageApi extends BaseApiController {
55
55
  });
56
56
  }
57
57
 
58
- @Post('/deleteDocLib', { middleware: [checkPermission(SystemFuncCode.DocMangeWrite)] })
58
+ @Post('/deleteDocLib', { middleware: [checkPermission(SystemFuncCode.DocMangeWrite)] })
59
59
  async deleteDocLib() {
60
60
  return this.executeSysSimpleSQL(SystemTables.sys_doc_lib, KeysOfSimpleSQL.SIMPLE_DELETE, {
61
61
  validateCfg: {
62
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
62
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
63
63
  },
64
64
  updateCfg: {
65
65
  'condition.workbench_code': { contextAsString: CTX_WORKBENCH_CODE },
@@ -1,11 +1,11 @@
1
1
  import { Controller, Inject, Post } from '@midwayjs/core';
2
2
  import { Context } from '@midwayjs/koa';
3
- import { KeysOfSimpleSQL, KeysOfValidators } from '../../libs/crud-pro/models/keys';
3
+ import { KeysOfSimpleSQL, KeysOfValidators } from '@/libs/crud-pro/models/keys';
4
4
  import { BaseApiController } from '../base/BaseApiController';
5
- import { checkPermission } from '../../middleware/permission.middleware';
6
- import { SystemFuncCode } from '../../models/SystemPerm';
7
- import { SystemTables } from '../../models/SystemTables';
8
- import { CTX_VISITOR_ID, CTX_WORKBENCH_CODE } from '../../models/bizmodels';
5
+ import { checkPermission } from '@/middleware/permission.middleware';
6
+ import { SystemFuncCode } from '@/models/SystemPerm';
7
+ import { SystemTables } from '@/models/SystemTables';
8
+ import { CTX_VISITOR_ID, CTX_WORKBENCH_CODE } from '@/models/bizmodels';
9
9
 
10
10
  const publishUpdateCfg = {
11
11
  'data.last_publish_by': { contextAsString: CTX_VISITOR_ID },
@@ -57,7 +57,7 @@ export class DocManageApi extends BaseApiController {
57
57
  return false;
58
58
  }
59
59
 
60
- @Post('/createDoc', { middleware: [checkPermission(SystemFuncCode.DocMangeWrite)] })
60
+ @Post('/createDoc', { middleware: [checkPermission(SystemFuncCode.DocMangeWrite)] })
61
61
  async createDoc() {
62
62
  const isPublish = this.setReleaseData();
63
63
  return this.executeSysSimpleSQL('sys_doc', KeysOfSimpleSQL.SIMPLE_INSERT, {
@@ -70,13 +70,13 @@ export class DocManageApi extends BaseApiController {
70
70
  });
71
71
  }
72
72
 
73
- @Post('/updateDoc', { middleware: [checkPermission(SystemFuncCode.DocMangeWrite)] })
73
+ @Post('/updateDoc', { middleware: [checkPermission(SystemFuncCode.DocMangeWrite)] })
74
74
  async updateDoc() {
75
75
  const isPublish = this.setReleaseData();
76
76
  const updateCfg = isPublish ? publishUpdateCfg : {};
77
77
  return this.executeSysSimpleSQL('sys_doc', KeysOfSimpleSQL.SIMPLE_UPDATE, {
78
78
  validateCfg: {
79
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
79
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
80
80
  },
81
81
  updateCfg: {
82
82
  ...updateCfg,
@@ -85,11 +85,11 @@ export class DocManageApi extends BaseApiController {
85
85
  });
86
86
  }
87
87
 
88
- @Post('/deleteDoc', { middleware: [checkPermission(SystemFuncCode.DocMangeWrite)] })
88
+ @Post('/deleteDoc', { middleware: [checkPermission(SystemFuncCode.DocMangeWrite)] })
89
89
  async deleteDoc() {
90
90
  return this.executeSysSimpleSQL('sys_doc', KeysOfSimpleSQL.SIMPLE_DELETE, {
91
91
  validateCfg: {
92
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
92
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
93
93
  },
94
94
  updateCfg: {
95
95
  'condition.workbench_code': { contextAsString: CTX_WORKBENCH_CODE },
@@ -32,7 +32,7 @@ export class FileMangeApi extends BaseApiController {
32
32
  async updateFile() {
33
33
  return this.executeSysSimpleSQL(SystemTables.sys_file, KeysOfSimpleSQL.SIMPLE_UPDATE, {
34
34
  validateCfg: {
35
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
35
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
36
36
  },
37
37
  });
38
38
  }
@@ -36,7 +36,7 @@ export class LowCodeTplManageApi extends BaseApiController {
36
36
  async updateLowCodeTpl() {
37
37
  return this.executeSysSimpleSQL(tableName, KeysOfSimpleSQL.SIMPLE_UPDATE, {
38
38
  validateCfg: {
39
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
39
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
40
40
  },
41
41
  });
42
42
  }
@@ -45,7 +45,7 @@ export class LowCodeTplManageApi extends BaseApiController {
45
45
  async deleteLowCodeTpl() {
46
46
  return this.executeSysSimpleSQL(tableName, KeysOfSimpleSQL.SIMPLE_DELETE, {
47
47
  validateCfg: {
48
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
48
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
49
49
  },
50
50
  });
51
51
  }
@@ -14,50 +14,45 @@ export class MenuManageApi extends BaseApiController {
14
14
  @Post('/getMenuList')
15
15
  async getMenuList() {
16
16
  return this.executeSysSimpleSQL(SystemTables.sys_menus, KeysOfSimpleSQL.SIMPLE_QUERY_PAGE, {
17
- updateCfg: {
18
- },
17
+ updateCfg: {},
19
18
  });
20
19
  }
21
20
 
22
21
  @Post('/getMenuOne')
23
22
  async getMenuOne() {
24
23
  return this.executeSysSimpleSQL(SystemTables.sys_menus, KeysOfSimpleSQL.SIMPLE_QUERY_ONE, {
25
- updateCfg: {
26
- },
24
+ updateCfg: {},
27
25
  });
28
26
  }
29
27
 
30
- @Post('/createMenu', { middleware: [checkPermission(SystemFuncCode.MenuMangeWrite)] })
28
+ @Post('/createMenu', { middleware: [checkPermission(SystemFuncCode.MenuMangeWrite)] })
31
29
  async createMenu() {
32
30
  return this.executeSysSimpleSQL(SystemTables.sys_menus, KeysOfSimpleSQL.SIMPLE_INSERT, {
33
31
  validateCfg: {
34
32
  'data.menu_code': [KeysOfValidators.REQUIRED, KeysOfValidators.STRING],
35
33
  'data.menu_title': [KeysOfValidators.REQUIRED, KeysOfValidators.STRING],
36
34
  },
37
- updateCfg: {
38
- },
35
+ updateCfg: {},
39
36
  });
40
37
  }
41
38
 
42
- @Post('/updateMenu', { middleware: [checkPermission(SystemFuncCode.MenuMangeWrite)] })
39
+ @Post('/updateMenu', { middleware: [checkPermission(SystemFuncCode.MenuMangeWrite)] })
43
40
  async updateMenu() {
44
41
  return this.executeSysSimpleSQL(SystemTables.sys_menus, KeysOfSimpleSQL.SIMPLE_UPDATE, {
45
42
  validateCfg: {
46
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER]
47
- },
48
- updateCfg: {
43
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
49
44
  },
45
+ updateCfg: {},
50
46
  });
51
47
  }
52
48
 
53
- @Post('/deleteMenu', { middleware: [checkPermission(SystemFuncCode.MenuMangeWrite)] })
49
+ @Post('/deleteMenu', { middleware: [checkPermission(SystemFuncCode.MenuMangeWrite)] })
54
50
  async deleteMenu() {
55
51
  return this.executeSysSimpleSQL(SystemTables.sys_menus, KeysOfSimpleSQL.SIMPLE_DELETE, {
56
52
  validateCfg: {
57
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
58
- },
59
- updateCfg: {
53
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
60
54
  },
55
+ updateCfg: {},
61
56
  });
62
57
  }
63
58
  }
@@ -36,7 +36,7 @@ export class ProxyApiMangeApi extends BaseApiController {
36
36
  async updateProxyApi() {
37
37
  return this.executeSysSimpleSQL(SystemTables.sys_proxyapi, KeysOfSimpleSQL.SIMPLE_UPDATE, {
38
38
  validateCfg: {
39
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
39
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
40
40
  },
41
41
  });
42
42
  }
@@ -45,7 +45,7 @@ export class ProxyApiMangeApi extends BaseApiController {
45
45
  async deleteProxyApi() {
46
46
  return this.executeSysSimpleSQL(SystemTables.sys_proxyapi, KeysOfSimpleSQL.SIMPLE_DELETE, {
47
47
  validateCfg: {
48
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
48
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
49
49
  },
50
50
  });
51
51
  }
@@ -1,12 +1,13 @@
1
1
  import { Controller, Inject, Post, Get } from '@midwayjs/core';
2
2
  import { Context } from '@midwayjs/koa';
3
- import { VisitStatService } from "../../service/VisitStatService";
3
+ import { VisitStatService } from '../../service/VisitStatService';
4
4
  import { KeysOfSimpleSQL } from '../../libs/crud-pro/models/keys';
5
5
  import { BaseApiController } from '../base/BaseApiController';
6
6
  import { checkRole } from '../../middleware/permission.middleware';
7
7
  import { SystemFuncCodeNameMap, SystemRoleCode, SystemRoleCodeNameMap } from '../../models/SystemPerm';
8
- import {SystemDbName, SystemDbType, SystemTables} from '../../models/SystemTables';
9
- import {CommonResult} from "../../libs/utils/common-dto";
8
+ import { SystemTables } from '../../models/SystemTables';
9
+ import { CommonResult } from '../../libs/utils/common-dto';
10
+ import { GLOBAL_STATIC_CONFIG } from '@/libs/global-config/global-config';
10
11
 
11
12
  @Controller('/ns/api/manage/superAdmin', { middleware: [checkRole(SystemRoleCode.SuperAdmin)] })
12
13
  export class SuperAdminManageApi extends BaseApiController {
@@ -16,12 +17,13 @@ export class SuperAdminManageApi extends BaseApiController {
16
17
  @Inject()
17
18
  protected visitStatService: VisitStatService;
18
19
 
19
-
20
20
  /**
21
21
  * 预设系统内置功能点数据
22
22
  */
23
23
  @Post('/presetsFuncCode')
24
24
  async presetsFuncCode() {
25
+ const { SystemDbName, SystemDbType } = GLOBAL_STATIC_CONFIG.getConfig();
26
+
25
27
  const funcCodeList = Object.keys(SystemFuncCodeNameMap);
26
28
  for (let i = 0; i < funcCodeList.length; i++) {
27
29
  const funcCode = funcCodeList[i];
@@ -38,12 +40,11 @@ export class SuperAdminManageApi extends BaseApiController {
38
40
  sqlTable: SystemTables.sys_perm_func,
39
41
  sqlSimpleName: KeysOfSimpleSQL.SIMPLE_INSERT,
40
42
  sqlDatabase: SystemDbName,
41
- sqlDdType: SystemDbType,
43
+ sqlDbType: SystemDbType,
42
44
  }
43
45
  );
44
46
  }
45
47
 
46
-
47
48
  return CommonResult.successRes();
48
49
  }
49
50
 
@@ -52,6 +53,8 @@ export class SuperAdminManageApi extends BaseApiController {
52
53
  */
53
54
  @Post('/presetsRoleCode')
54
55
  async presetsRoleCode() {
56
+ const { SystemDbName, SystemDbType } = GLOBAL_STATIC_CONFIG.getConfig();
57
+
55
58
  const roleCodeList = [SystemRoleCode.DevOpsViewer, SystemRoleCode.DevOpsWriter];
56
59
 
57
60
  for (let i = 0; i < roleCodeList.length; i++) {
@@ -69,7 +72,7 @@ export class SuperAdminManageApi extends BaseApiController {
69
72
  sqlTable: SystemTables.sys_perm_role,
70
73
  sqlSimpleName: KeysOfSimpleSQL.SIMPLE_INSERT,
71
74
  sqlDatabase: SystemDbName,
72
- sqlDdType: SystemDbType,
75
+ sqlDbType: SystemDbType,
73
76
  }
74
77
  );
75
78
  }
@@ -82,6 +85,8 @@ export class SuperAdminManageApi extends BaseApiController {
82
85
  */
83
86
  @Post('/presetsRoleFuncList')
84
87
  async presetsRoleFuncList() {
88
+ const { SystemDbName, SystemDbType } = GLOBAL_STATIC_CONFIG.getConfig();
89
+
85
90
  const funcCodeList = Object.keys(SystemFuncCodeNameMap);
86
91
  for (let i = 0; i < funcCodeList.length; i++) {
87
92
  const funcCode = funcCodeList[i];
@@ -97,7 +102,7 @@ export class SuperAdminManageApi extends BaseApiController {
97
102
  sqlTable: SystemTables.sys_perm_role_func,
98
103
  sqlSimpleName: KeysOfSimpleSQL.SIMPLE_INSERT,
99
104
  sqlDatabase: SystemDbName,
100
- sqlDdType: SystemDbType,
105
+ sqlDbType: SystemDbType,
101
106
  }
102
107
  );
103
108
  }
@@ -116,7 +121,7 @@ export class SuperAdminManageApi extends BaseApiController {
116
121
  sqlTable: SystemTables.sys_perm_role_func,
117
122
  sqlSimpleName: KeysOfSimpleSQL.SIMPLE_INSERT,
118
123
  sqlDatabase: SystemDbName,
119
- sqlDdType: SystemDbType,
124
+ sqlDbType: SystemDbType,
120
125
  }
121
126
  );
122
127
  }
@@ -124,7 +129,6 @@ export class SuperAdminManageApi extends BaseApiController {
124
129
  return CommonResult.successRes();
125
130
  }
126
131
 
127
-
128
132
  /**
129
133
  * 将每天的访问数据,更新到数据库中
130
134
  */
@@ -132,7 +136,4 @@ export class SuperAdminManageApi extends BaseApiController {
132
136
  async flushVisitStatToDB() {
133
137
  return this.visitStatService.flushVisitStatToDB();
134
138
  }
135
-
136
-
137
-
138
139
  }
@@ -5,8 +5,9 @@ import { BaseApiController } from '../base/BaseApiController';
5
5
  import { checkPermission } from '../../middleware/permission.middleware';
6
6
  import { SystemFuncCode } from '../../models/SystemPerm';
7
7
  import { CTX_WORKBENCH_CODE } from '../../models/bizmodels';
8
- import {SystemDbName, SystemDbType, SystemTables} from "../../models/SystemTables";
9
- import {CommonResult} from "../../libs/utils/common-dto";
8
+ import { SystemTables } from '../../models/SystemTables';
9
+ import { CommonResult } from '../../libs/utils/common-dto';
10
+ import { GLOBAL_STATIC_CONFIG } from '@/libs/global-config/global-config';
10
11
 
11
12
  @Controller('/ns/api/manage/sysconfig', { middleware: [checkPermission(SystemFuncCode.SysConfigMangeRead)] })
12
13
  export class SysConfigMangeApi extends BaseApiController {
@@ -48,32 +49,31 @@ export class SysConfigMangeApi extends BaseApiController {
48
49
 
49
50
  @Post('/updateSysConfig', { middleware: [checkPermission(SystemFuncCode.SysConfigMangeWrite)] })
50
51
  async updateSysConfig() {
52
+ const { SystemDbName, SystemDbType } = GLOBAL_STATIC_CONFIG.getConfig();
51
53
 
52
54
  const body = this.ctx.request.body as any;
53
55
  const id = body.condition.id;
54
56
  if (!id) {
55
- return CommonResult.errorRes("id不能为空")
57
+ return CommonResult.errorRes('id不能为空');
56
58
  }
57
59
 
58
- const sysConfig = await this.curdMixService.getBbUtil(SystemDbName, SystemDbType).getOne({condition: body.condition}, SystemTables.sys_configs)
60
+ const sysConfig = await this.curdMixService.getBbUtil(SystemDbName, SystemDbType).getOne({ condition: body.condition }, SystemTables.sys_configs);
59
61
  if (!sysConfig) {
60
- return CommonResult.errorRes("配置项不存在")
62
+ return CommonResult.errorRes('配置项不存在');
61
63
  }
62
64
 
63
- const {edit_auth_type, edit_auth_config} = sysConfig;
65
+ const { edit_auth_type, edit_auth_config } = sysConfig;
64
66
  if (edit_auth_type) {
65
67
  const isOK = this.ctx.userSession.isAuthPass(edit_auth_type, edit_auth_config);
66
68
  if (!isOK) {
67
- return CommonResult.errorRes("编辑权限校验不通过:" + JSON.stringify({edit_auth_type, edit_auth_config}));
69
+ return CommonResult.errorRes('编辑权限校验不通过:' + JSON.stringify({ edit_auth_type, edit_auth_config }));
68
70
  }
69
71
  }
70
72
 
71
-
72
-
73
73
  return this.executeSysSimpleSQL('sys_configs', KeysOfSimpleSQL.SIMPLE_UPDATE, {
74
74
  validateCfg: {
75
75
  'data.workbench_code': [KeysOfValidators.REQUIRED, KeysOfValidators.STRING, 'length:1,64'],
76
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
76
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
77
77
  },
78
78
  updateCfg: {
79
79
  'condition.workbench_code': { contextAsString: CTX_WORKBENCH_CODE },
@@ -85,7 +85,7 @@ export class SysConfigMangeApi extends BaseApiController {
85
85
  async deleteSysConfig() {
86
86
  return this.executeSysSimpleSQL('sys_configs', KeysOfSimpleSQL.SIMPLE_DELETE, {
87
87
  validateCfg: {
88
- 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
88
+ 'condition.id': [KeysOfValidators.REQUIRED, KeysOfValidators.NUMERIC],
89
89
  },
90
90
  updateCfg: {
91
91
  'condition.workbench_code': { contextAsString: CTX_WORKBENCH_CODE },
@@ -2,9 +2,9 @@ import { Controller, Inject, Get } from '@midwayjs/core';
2
2
  import { InfoService } from '@midwayjs/info';
3
3
  import { Context } from '@midwayjs/koa';
4
4
  import { BaseApiController } from '../base/BaseApiController';
5
- import {checkPermission} from '../../middleware/permission.middleware';
6
- import {SystemFuncCode} from '../../models/SystemPerm';
7
- import {CommonResult} from "../../libs/utils/common-dto";
5
+ import { checkPermission } from '../../middleware/permission.middleware';
6
+ import { SystemFuncCode } from '../../models/SystemPerm';
7
+ import { CommonResult } from '../../libs/utils/common-dto';
8
8
 
9
9
  @Controller('/ns/api/manage/systemInfo', { middleware: [checkPermission(SystemFuncCode.SystemInfoManageApiRead)] })
10
10
  export class SystemInfoManageApi extends BaseApiController {
@@ -41,8 +41,13 @@ export class SystemInfoManageApi extends BaseApiController {
41
41
  const networkInfo = this.infoService.networkInfo();
42
42
 
43
43
  return CommonResult.successRes({
44
- projectInfo,systemInfo,resourceOccupationInfo,softwareInfo,timeInfo,envInfo,networkInfo
45
- })
44
+ projectInfo,
45
+ systemInfo,
46
+ resourceOccupationInfo,
47
+ softwareInfo,
48
+ timeInfo,
49
+ envInfo,
50
+ networkInfo,
51
+ });
46
52
  }
47
-
48
53
  }