From 7847dbc89f38ad2df4f3dbf8bb694ba723bbe2b5 Mon Sep 17 00:00:00 2001 From: MHW Date: Sun, 15 Mar 2026 09:54:20 +0800 Subject: [PATCH] =?UTF-8?q?26-03-15-09:53=20=E7=81=AB=E5=8A=9B=E8=A7=84?= =?UTF-8?q?=E5=88=99=E6=A8=A1=E5=9D=97=EF=BC=9A=E8=8E=B7=E5=8F=96=E9=80=9A?= =?UTF-8?q?=E4=BF=A1=E7=BB=84=E4=BB=B6=E7=9A=84=E6=89=80=E6=9C=89=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E5=92=8C=E7=BB=84=E4=BB=B6=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=B9=B3=E5=8F=B0description=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../solution/web/controller/rule/FireRuleController.java | 6 +++++- .../solution/rule/domain/vo/PlatformComponentNamesVO.java | 3 +++ .../java/com/solution/rule/service/FireRuleService.java | 5 +++++ .../src/main/resources/mapper/rule/FireRuleMapper.xml | 6 ++++-- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/auto-solution-admin/src/main/java/com/solution/web/controller/rule/FireRuleController.java b/auto-solution-admin/src/main/java/com/solution/web/controller/rule/FireRuleController.java index d4399f3..38d186a 100644 --- a/auto-solution-admin/src/main/java/com/solution/web/controller/rule/FireRuleController.java +++ b/auto-solution-admin/src/main/java/com/solution/web/controller/rule/FireRuleController.java @@ -53,8 +53,12 @@ public class FireRuleController extends BaseController { return success(ruleService.getCommPlatformComponentNames(scenarioId)); } + /** + * 根据场景id获取所有平台及其组件 + * @param scenarioId + * @return + */ @GetMapping("/platforms/{scenarioId}") - @ApiOperation("获取通信组件的所有平台和组件") public AjaxResult platforms(@PathVariable Integer scenarioId){ return success(ruleService.findPlatformComponents(scenarioId)); } diff --git a/auto-solution-rule/src/main/java/com/solution/rule/domain/vo/PlatformComponentNamesVO.java b/auto-solution-rule/src/main/java/com/solution/rule/domain/vo/PlatformComponentNamesVO.java index cd9e6c9..213d9c8 100644 --- a/auto-solution-rule/src/main/java/com/solution/rule/domain/vo/PlatformComponentNamesVO.java +++ b/auto-solution-rule/src/main/java/com/solution/rule/domain/vo/PlatformComponentNamesVO.java @@ -14,4 +14,7 @@ public class PlatformComponentNamesVO { @ApiModelProperty("该平台下的组件名称列表(去重)") private List componentNames; + + @ApiModelProperty("平台描述") + private String platformDescription; } \ No newline at end of file diff --git a/auto-solution-rule/src/main/java/com/solution/rule/service/FireRuleService.java b/auto-solution-rule/src/main/java/com/solution/rule/service/FireRuleService.java index 5955d69..29dae9f 100644 --- a/auto-solution-rule/src/main/java/com/solution/rule/service/FireRuleService.java +++ b/auto-solution-rule/src/main/java/com/solution/rule/service/FireRuleService.java @@ -39,5 +39,10 @@ public interface FireRuleService { */ List getComponents(Integer platformId); + /** + * 根据场景id获取所有平台及其组件 + * @param scenarioId + * @return + */ List findPlatformComponents(Integer scenarioId); } diff --git a/auto-solution-rule/src/main/resources/mapper/rule/FireRuleMapper.xml b/auto-solution-rule/src/main/resources/mapper/rule/FireRuleMapper.xml index 5df2854..6c081b5 100644 --- a/auto-solution-rule/src/main/resources/mapper/rule/FireRuleMapper.xml +++ b/auto-solution-rule/src/main/resources/mapper/rule/FireRuleMapper.xml @@ -13,6 +13,7 @@ + @@ -55,10 +56,11 @@ parameterType="java.lang.Integer"> SELECT p.name AS platformName, - pc.name AS componentName + pc.name AS componentName, + p.description AS description FROM platform p INNER JOIN platform_component pc ON p.id = pc.platform_id - WHERE pc.type = "comm" + WHERE pc.type = 'comm' AND p.scenario_id = #{scenarioId}