Browse Source

风险分析相关接口修改

wukai 3 days ago
parent
commit
029c591def

+ 6 - 6
jjt-biz/src/main/java/com/jjt/risk/controller/RiskAnalysisController.java

@@ -74,8 +74,8 @@ public class RiskAnalysisController extends BaseController {
     }
 
     @ApiOperation("立即分析")
-    @GetMapping(value = "/atOnce/{riskId}")
-    public AjaxResult atOnce(@PathVariable("riskId") Long riskId) {
+    @GetMapping(value = "/atOnce")
+    public AjaxResult atOnce(Long riskId) {
         RiskModel rm = riskModelService.selectRiskModelByRiskId(riskId);
         Date d = new Date();
         try {
@@ -93,8 +93,8 @@ public class RiskAnalysisController extends BaseController {
     }
 
     @ApiOperation("获取异类组件分析结果")
-    @GetMapping(value = "/type3/result/{resultId}")
-    public AjaxResult type3info(@PathVariable("resultId") Long resultId) {
+    @GetMapping(value = "/type3/result")
+    public AjaxResult type3info(Long resultId) {
         Map<String, Object> result = new HashMap<>(16);
         RiskAnalysis analysis = riskAnalysisService.selectRiskAnalysisByResultId(resultId);
 
@@ -104,8 +104,8 @@ public class RiskAnalysisController extends BaseController {
     }
 
     @ApiOperation("根据对象获取曲线")
-    @GetMapping(value = "/type3/trend/{id}")
-    public AjaxResult type3trend(@PathVariable("id") Long id) {
+    @GetMapping(value = "/type3/trend")
+    public AjaxResult type3trend(Long id) {
         Map<String, Object> result = new HashMap<>(16);
         List<Map<String, Object>> list = new ArrayList();
         LocalDateTime ed = LocalDateTime.now();

+ 4 - 4
jjt-biz/src/main/java/com/jjt/risk/controller/RiskModelController.java

@@ -52,8 +52,8 @@ public class RiskModelController extends BaseController {
     }
 
     @ApiOperation("根据指标ID查询对象列表")
-    @GetMapping("/obj/list/{metricsId}")
-    public AjaxResult objList(@PathVariable Long metricsId) {
+    @GetMapping("/obj/list")
+    public AjaxResult objList(Long metricsId) {
         List<BizObj> list = objService.selectBizObjListByMetricsId(metricsId);
         return AjaxResult.success(list);
     }
@@ -132,8 +132,8 @@ public class RiskModelController extends BaseController {
     @ApiOperation("删除风险管理")
     //@PreAuthorize("@ss.hasPermi('risk:model:remove')")
     @Log(title = "风险管理", businessType = BusinessType.DELETE)
-    @GetMapping("/del/{riskIds}")
-    public AjaxResult remove(@PathVariable Long[] riskIds) {
+    @GetMapping("/del")
+    public AjaxResult remove(Long[] riskIds) {
         return toAjax(riskModelService.deleteRiskModelByRiskIds(riskIds));
     }
 }

+ 2 - 2
jjt-biz/src/main/java/com/jjt/risk/controller/RiskMsConfigController.java

@@ -93,8 +93,8 @@ public class RiskMsConfigController extends BaseController {
     @ApiOperation("删除风险管理指标配置")
     //@PreAuthorize("@ss.hasPermi('risk:config:remove')")
     @Log(title = "风险管理指标配置", businessType = BusinessType.DELETE)
-    @GetMapping("/del/{hcIds}")
-    public AjaxResult remove(@PathVariable Long[] hcIds) {
+    @GetMapping("/del")
+    public AjaxResult remove(Long[] hcIds) {
         return toAjax(riskMsConfigService.deleteRiskMsConfigByHcIds(hcIds));
     }
 }

+ 6 - 6
jjt-biz/src/main/java/com/jjt/risk/controller/RiskOtherController.java

@@ -66,8 +66,8 @@ public class RiskOtherController extends BaseController {
     }
 
     @ApiOperation("业务主机分析")
-    @GetMapping(value = "/host/{modelId}")
-    public AjaxResult host(@PathVariable("modelId") Long modelId) {
+    @GetMapping(value = "/host")
+    public AjaxResult host(Long modelId) {
 
         RiskMsConfig q = new RiskMsConfig();
         q.setConfigType("host");
@@ -130,8 +130,8 @@ public class RiskOtherController extends BaseController {
     }
 
     @ApiOperation("业务主机分析趋势")
-    @GetMapping(value = "/host/trend/{id}")
-    public AjaxResult hostTrend(@PathVariable("id") Long id) {
+    @GetMapping(value = "/host/trend")
+    public AjaxResult hostTrend(Long id) {
         Map<String, Object> result = new HashMap<>(16);
         List<String> xData = new ArrayList<>();
         List<Float> curr = new ArrayList<>();
@@ -155,8 +155,8 @@ public class RiskOtherController extends BaseController {
     }
 
     @ApiOperation("网络状况分析")
-    @GetMapping(value = "/network/{modelId}/{metricsId}")
-    public AjaxResult network(@PathVariable("modelId") Long modelId, @PathVariable("metricsId") Long metricsId) {
+    @GetMapping(value = "/network")
+    public AjaxResult network(Long modelId, Long metricsId) {
         List<Map<String, Object>> result = new ArrayList<>();
         final int[] len = {0};
         final List<Date>[] standTime = new List[]{new ArrayList<>()};