From 55ac3b8a609b2bdb5d46d5e15a2a17c8fdf03ea5 Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Thu, 21 Jul 2022 09:51:32 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=BC=96=E7=9B=AE=E6=9B=B4=E6=96=B0=202.bugf?= =?UTF-8?q?ix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TDemandCommentController.java | 9 +++++++-- .../processForm/service/ApiGatewayService.java | 6 ++++-- .../main/resources/db/R__init_tb_data_catagory.sql | 11 +++++------ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/demandComment/controller/TDemandCommentController.java b/renren-admin/src/main/java/io/renren/modules/demandComment/controller/TDemandCommentController.java index cc292b59..1cf50309 100644 --- a/renren-admin/src/main/java/io/renren/modules/demandComment/controller/TDemandCommentController.java +++ b/renren-admin/src/main/java/io/renren/modules/demandComment/controller/TDemandCommentController.java @@ -27,6 +27,7 @@ import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.stream.Collectors; @@ -97,10 +98,14 @@ public class TDemandCommentController { // @RequiresPermissions("demandComment:tdemandcomment:info") public Result get(@PathVariable("id") Long id) { TDemandCommentDTO data = tDemandCommentService.get(id); + if (null != data) { + data.setDemandDataDTO(tDemandDataService.get(data.getTargetId())); + return new Result().ok(data); + } else { + return new Result().ok(new TDemandCommentDTO()); + } - data.setDemandDataDTO(tDemandDataService.get(data.getTargetId())); - return new Result().ok(data); } @PostMapping diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/ApiGatewayService.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/ApiGatewayService.java index 9da17e01..a62e962c 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/service/ApiGatewayService.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/ApiGatewayService.java @@ -61,8 +61,10 @@ public class ApiGatewayService { throw new IllegalArgumentException(String.format("未找到对应的资源id:%s", resourceId)); } String apiUrl = resourceEntity.getApiUrl(); - String methods = resourceEntity.getApiMethodType().toUpperCase(); - + String methods = ""; + if (resourceEntity.getApiMethodType() != null) { + methods = resourceEntity.getApiMethodType().toUpperCase(); + } if (StringUtils.isBlank(apiUrl) || StringUtils.isBlank(methods)){ String msg = String.format("注册api参数为空,跳过 apiUrl:%s, methods:%s, resourceId:%s", apiUrl, methods, resourceId); //重要参数没有当成不需要注册 diff --git a/renren-admin/src/main/resources/db/R__init_tb_data_catagory.sql b/renren-admin/src/main/resources/db/R__init_tb_data_catagory.sql index b6416211..e5b80814 100644 --- a/renren-admin/src/main/resources/db/R__init_tb_data_catagory.sql +++ b/renren-admin/src/main/resources/db/R__init_tb_data_catagory.sql @@ -3,7 +3,7 @@ -- 替换前建议备份 -- 注意更新时间 /* - Date: 19/07/2022 10:55:51 + Date: 21/07/2022 09:49:36 */ SET NAMES utf8mb4; @@ -526,20 +526,20 @@ INSERT INTO `tb_data_category` VALUES (1541958011009875969, '数据范围', '组 INSERT INTO `tb_data_category` VALUES (1541958848058736642, '样式服务地址', '组件服务一', '1539529687759314945', 'true', 'input', 'false', 'false', '', 4, 0, 1524924140178481154, '2022-06-29 09:36:52', 1524924140178481154, '2022-06-29 09:36:52', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542755260526624769, '能力类型', '组件服务一', '1534718048405012481', 'true', 'AbilityType', 'false', 'false', '', 1, 0, 1524924140178481154, '2022-07-01 14:21:32', 1524924140178481154, '2022-07-01 14:21:32', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542755491007823873, '组件类型', '组件服务一', '1534718048405012481', 'true', 'ComponentType', 'false', 'false', '', 2, 0, 1524924140178481154, '2022-07-01 14:22:27', 1524924140178481154, '2022-07-01 14:22:27', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `tb_data_category` VALUES (1542759999255478274, '来源应用', '组件服务一', '1534718048405012481', 'true', 'AssociatedApplication', 'false', 'false', '', 19, 0, 1524924140178481154, '2022-07-01 14:40:22', 1524924140178481154, '2022-07-01 14:40:22', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `tb_data_category` VALUES (1542759999255478274, '来源应用', '组件服务一', '1534718048405012481', 'true', 'select', 'false', 'false', '', 19, 0, 1524924140178481154, '2022-07-01 14:40:22', 1524924140178481154, '2022-07-01 14:40:22', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542768397682466818, '服务商', '组件服务一', '1534718048405012481', 'true', 'input', 'false', 'false', '', 13, 0, 1524924140178481154, '2022-07-01 15:13:44', 1524924140178481154, '2022-07-01 15:13:44', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542768571779637250, '服务商联系人', '组件服务一', '1534718048405012481', 'true', 'input', 'false', 'false', '', 14, 0, 1524924140178481154, '2022-07-01 15:14:25', 1524924140178481154, '2022-07-01 15:14:25', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542768616788713473, '服务商联系电话', '组件服务一', '1534718048405012481', 'true', 'input', 'false', 'false', '', 15, 0, 1524924140178481154, '2022-07-01 15:14:36', 1524924140178481154, '2022-07-01 15:14:36', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542769943472234498, '能力类型', '组件服务一', '1538797032767987714', 'true', 'AbilityType', 'false', 'false', '', 1, 0, 1524924140178481154, '2022-07-01 15:19:52', 1524924140178481154, '2022-07-01 15:19:52', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542770087471079426, '组件类型', '组件服务一', '1538797032767987714', 'true', 'ComponentType', 'false', 'false', '', 2, 0, 1524924140178481154, '2022-07-01 15:20:27', 1524924140178481154, '2022-07-01 15:20:27', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `tb_data_category` VALUES (1542773599965798402, '来源应用', '组件服务一', '1538797032767987714', 'true', 'AssociatedApplication', 'false', 'false', '', 14, 0, 1524924140178481154, '2022-07-01 15:34:24', 1524924140178481154, '2022-07-01 15:34:24', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `tb_data_category` VALUES (1542773599965798402, '来源应用', '组件服务一', '1538797032767987714', 'true', 'select', 'false', 'false', '', 14, 0, 1524924140178481154, '2022-07-01 15:34:24', 1524924140178481154, '2022-07-01 15:34:24', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542775012120846337, '能力类型', '基础设施', '1538705458625228801', 'true', 'AbilityType', 'false', 'false', '', 1, 0, 1524924140178481154, '2022-07-01 15:40:01', 1524924140178481154, '2022-07-01 15:40:01', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542775091430940674, '组件类型', '基础设施', '1538705458625228801', 'true', 'ComponentType', 'false', 'false', '', 2, 0, 1524924140178481154, '2022-07-01 15:40:20', 1524924140178481154, '2022-07-01 15:40:20', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `tb_data_category` VALUES (1542775245986848770, '来源应用', '基础设施', '1538705458625228801', 'true', 'AssociatedApplication', 'false', 'false', '', 14, 0, 1524924140178481154, '2022-07-01 15:40:57', 1524924140178481154, '2022-07-01 15:40:57', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `tb_data_category` VALUES (1542775245986848770, '来源应用', '基础设施', '1538705458625228801', 'true', 'select', 'false', 'false', '', 14, 0, 1524924140178481154, '2022-07-01 15:40:57', 1524924140178481154, '2022-07-01 15:40:57', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542777726523400194, '试用地址', '组件服务一', '1539529687759314945', 'true', 'input', 'false', 'false', '', 8, 1, 1524924140178481154, '2022-07-01 15:50:48', 1524924140178481154, '2022-07-16 12:22:57', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542778864555515905, '能力类型', '基础设施', '1539536463208636417', 'true', 'AbilityType', 'false', 'false', '', 1, 0, 1524924140178481154, '2022-07-01 15:55:19', 1524924140178481154, '2022-07-01 15:55:19', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542779816926765057, '组件类型', '组件服务一', '1539536463208636417', 'true', 'ComponentType', 'false', 'false', '', 2, 0, 1524924140178481154, '2022-07-01 15:59:06', 1524924140178481154, '2022-07-01 15:59:06', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `tb_data_category` VALUES (1542780090865147905, '来源应用', '组件服务一', '1539536463208636417', 'true', 'AssociatedApplication', 'false', 'false', '', 14, 0, 1524924140178481154, '2022-07-01 16:00:12', 1524924140178481154, '2022-07-01 16:00:12', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `tb_data_category` VALUES (1542780090865147905, '来源应用', '组件服务一', '1539536463208636417', 'true', 'select', 'false', 'false', '', 14, 0, 1524924140178481154, '2022-07-01 16:00:12', 1524924140178481154, '2022-07-01 16:00:12', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1542785872524468225, '能力类型', '应用资源一', '1534472573403713538', 'true', 'AbilityType', 'false', 'false', '', 1, 0, 1524924140178481154, '2022-07-01 16:23:10', 1524924140178481154, '2022-07-01 16:23:10', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1543894205352337409, '关联组件信息', '应用资源一', '1534472573403713538', 'true', 'AssociatedComponents', 'false', 'false', '', 13, 0, 1524924140178481154, '2022-07-04 17:47:17', 1524924140178481154, '2022-07-04 17:47:17', NULL, NULL, NULL, NULL, NULL); INSERT INTO `tb_data_category` VALUES (1544995280897658882, '1', '组件服务一', '1534472573403713538', 'true', 'input', 'false', 'false', '', 14, 1, 1513433709613187073, '2022-07-07 18:42:34', 1513433709613187073, '2022-07-07 18:42:51', NULL, NULL, NULL, NULL, NULL); @@ -578,4 +578,3 @@ INSERT INTO `tb_data_category` VALUES (1548962613546627073, '部门联系人电 INSERT INTO `tb_data_category` VALUES (1548980404643405825, '使用方式', '组件服务', '1531208527270404097', 'true', 'input', 'true', 'true', '1513714027213660162', 8, 1, 1524924140178481154, '2022-07-18 18:38:02', 1524924140178481154, '2022-07-18 18:43:36', NULL, NULL, NULL, NULL, NULL); SET FOREIGN_KEY_CHECKS = 1; -