浏览代码

修改完了 烦死了。

wukai 5 天之前
父节点
当前提交
202b2ee96e

+ 18 - 19
jjt-biz/src/main/java/com/jjt/biz/controller/BizObjController.java

@@ -52,28 +52,28 @@ public class BizObjController extends BaseController {
     private IPrometheusService prometheusService;
 
     @ApiOperation("选择模板")
-    @GetMapping("/tpl/select/{objId}")
-    public TableDataInfo select(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId) {
+    @GetMapping("/tpl/select")
+    public TableDataInfo select(@ApiParam(value = "对象ID", required = true) Long objId) {
         startPage();
         List<MetricsTpl> list = bizObjTplService.selectTplList(objId);
         return getDataTable(list);
     }
 
     @ApiOperation("添加模板")
-    @GetMapping("/tpl/add/{objId}")
-    public AjaxResult add(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId, @ApiParam(value = "指标ID数组", required = true) Long[] tplIds) {
+    @GetMapping("/tpl/add")
+    public AjaxResult add(@ApiParam(value = "对象ID", required = true)  Long objId, @ApiParam(value = "指标ID数组", required = true) Long[] tplIds) {
         return success(bizObjTplService.insertTplDetails(objId, tplIds));
     }
 
     @ApiOperation("删除模板")
-    @GetMapping("/tpl/del/{objId}/{tplId}")
-    public AjaxResult del(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId, @ApiParam(value = "模板ID", required = true) @PathVariable("tplId") Long tplId) {
+    @GetMapping("/tpl/del")
+    public AjaxResult del(@ApiParam(value = "对象ID", required = true) Long objId, @ApiParam(value = "模板ID", required = true) Long tplId) {
         return success(bizObjTplService.del(objId, tplId));
     }
 
     @ApiOperation("选择指标")
-    @GetMapping("/metrics/select/{objId}")
-    public TableDataInfo metricsSelect(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId) {
+    @GetMapping("/metrics/select")
+    public TableDataInfo metricsSelect(@ApiParam(value = "对象ID", required = true) Long objId) {
         startPage();
         //只能选择prometheus的指标
         List<MetricsDef> list = metricsService.selectMetricsDefList(objId);
@@ -98,8 +98,8 @@ public class BizObjController extends BaseController {
     }
 
     @ApiOperation("数据接口配置进度")
-    @GetMapping("/schedule/{objId}")
-    public AjaxResult schedule(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId) {
+    @GetMapping("/schedule")
+    public AjaxResult schedule(@ApiParam(value = "对象ID", required = true) Long objId) {
         BizObjMetrics om = new BizObjMetrics();
         om.setObjId(objId);
         List<BizObjMetrics> allList = metricsService.selectBizObjMetricsList(om);
@@ -113,14 +113,14 @@ public class BizObjController extends BaseController {
     }
 
     @ApiOperation("添加指标")
-    @GetMapping("/metrics/add/{objId}")
-    public AjaxResult metricsAdd(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId, @ApiParam(value = "指标ID数组", required = true) Long[] metricsIds) {
+    @GetMapping("/metrics/add")
+    public AjaxResult metricsAdd(@ApiParam(value = "对象ID", required = true)Long objId, @ApiParam(value = "指标ID数组", required = true) Long[] metricsIds) {
         return success(metricsService.insertMetricsDetails(objId, metricsIds));
     }
 
     @ApiOperation("完成自定义指标配置")
-    @GetMapping("/metrics/conf/{objId}")
-    public AjaxResult metricsConf(@ApiParam(value = "对象ID", required = true) @PathVariable("objId") Long objId) {
+    @GetMapping("/metrics/conf")
+    public AjaxResult metricsConf(@ApiParam(value = "对象ID", required = true) Long objId) {
         boolean flag = metricsService.insertMc(objId);
         if (flag) {
             return success();
@@ -159,8 +159,8 @@ public class BizObjController extends BaseController {
      */
     @ApiOperation("获取业务对象详细信息")
     //@PreAuthorize("@ss.hasPermi('obj:obj:query')")
-    @GetMapping(value = "/{objId}")
-    public AjaxResult getInfo(@PathVariable("objId") Long objId) {
+    @GetMapping(value = "/detail")
+    public AjaxResult getInfo(Long objId) {
         return success(bizObjService.selectBizObjByObjId(objId));
     }
 
@@ -195,9 +195,8 @@ public class BizObjController extends BaseController {
     @ApiOperation("删除业务对象")
     //@PreAuthorize("@ss.hasPermi('obj:obj:remove')")
     @Log(title = "业务对象", businessType = BusinessType.DELETE)
-    @GetMapping("/del/{objIds}")
-    public AjaxResult remove(@PathVariable Long[] objIds) {
-
+    @GetMapping("/del")
+    public AjaxResult remove(Long[] objIds) {
         return toAjax(bizObjService.deleteBizObjByObjIds(objIds));
     }
 }

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

@@ -106,8 +106,8 @@ public class BizObjMcController extends BaseController
     @ApiOperation("删除业务对象自定义指标")
     //@PreAuthorize("@ss.hasPermi('biz:mc:remove')")
     @Log(title = "业务对象自定义指标", businessType = BusinessType.DELETE)
-	@GetMapping("/del/{mcIds}")
-    public AjaxResult remove(@PathVariable Long[] mcIds)
+	@GetMapping("/del")
+    public AjaxResult remove(Long[] mcIds)
     {
         return toAjax(bizObjMcService.deleteBizObjMcByMcIds(mcIds));
     }

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

@@ -93,8 +93,8 @@ public class BizObjMetricsController extends BaseController {
      * 获取业务对象指标详细信息
      */
     @ApiOperation("获取业务对象历史趋势")
-    @GetMapping(value = "/history/{objMetricsId}")
-    public AjaxResult history(@PathVariable("objMetricsId") Long objMetricsId) {
+    @GetMapping(value = "/history")
+    public AjaxResult history(Long objMetricsId) {
         int jg = Integer.parseInt(configService.selectConfigByKey("pp.api.time"));
         int size = 1440 / jg * 3;
         //设置默认获取3天的数据,根据数据间隔时间来