Ver Fonte

指标定义相关接口修改

wukai há 5 dias atrás
pai
commit
68e487b96f

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

@@ -60,8 +60,8 @@ public class MetricsDefController extends BaseController {
      */
     @ApiOperation("获取指标定义详细信息")
     //@PreAuthorize("@ss.hasPermi('metrics:def:query')")
-    @GetMapping(value = "/{metricsId}")
-    public AjaxResult getInfo(@PathVariable("metricsId") Long metricsId) {
+    @GetMapping(value = "/detail")
+    public AjaxResult getInfo(Long metricsId) {
         MetricsDef def = metricsDefService.selectMetricsDefByMetricsId(metricsId);
         return success(def);
     }
@@ -97,8 +97,8 @@ public class MetricsDefController extends BaseController {
     @ApiOperation("删除指标定义")
     //@PreAuthorize("@ss.hasPermi('metrics:def:remove')")
     @Log(title = "指标定义", businessType = BusinessType.DELETE)
-    @GetMapping("/del/{metricsIds}")
-    public AjaxResult remove(@PathVariable Long[] metricsIds) {
+    @GetMapping("/del")
+    public AjaxResult remove(Long[] metricsIds) {
         return toAjax(metricsDefService.deleteMetricsDefByMetricsIds(metricsIds));
     }
 }

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

@@ -61,8 +61,8 @@ public class MetricsTplController extends BaseController {
      */
     @ApiOperation("获取指标模板详细信息")
     //@PreAuthorize("@ss.hasPermi('metrics:tpl:query')")
-    @GetMapping(value = "/{tplId}")
-    public AjaxResult getInfo(@PathVariable("tplId") Long tplId) {
+    @GetMapping(value = "/detail")
+    public AjaxResult getInfo(Long tplId) {
         return success(metricsTplService.selectMetricsTplByTplId(tplId));
     }
 
@@ -97,8 +97,8 @@ public class MetricsTplController extends BaseController {
     @ApiOperation("删除指标模板")
     //@PreAuthorize("@ss.hasPermi('metrics:tpl:remove')")
     @Log(title = "指标模板", businessType = BusinessType.DELETE)
-    @GetMapping("/del/{tplIds}")
-    public AjaxResult remove(@PathVariable Long[] tplIds) {
+    @GetMapping("/del")
+    public AjaxResult remove(Long[] tplIds) {
         return toAjax(metricsTplService.deleteMetricsTplByTplIds(tplIds));
     }
 }

+ 8 - 8
jjt-biz/src/main/java/com/jjt/biz/controller/MetricsTplDetailController.java

@@ -43,16 +43,16 @@ public class MetricsTplDetailController extends BaseController {
     private JdbcTemplate jdbcTemplate;
 
     @ApiOperation("选择指标")
-    @GetMapping("/select/{tplId}")
-    public TableDataInfo select(@ApiParam(value = "模板ID", required = true) @PathVariable("tplId") Long tplId, MetricsDef def) {
+    @GetMapping("/select")
+    public TableDataInfo select(@ApiParam(value = "模板ID", required = true) Long tplId, MetricsDef def) {
         startPage();
         List<MetricsDef> list = metricsTplDetailService.selectMetricsDefList(tplId, def);
         return getDataTable(list);
     }
 
     @ApiOperation("添加指标")
-    @GetMapping("/add/{tplId}")
-    public AjaxResult add(@ApiParam(value = "模板ID", required = true) @PathVariable("tplId") Long tplId, @ApiParam(value = "指标ID数组", required = true) Long[] metricsIds) {
+    @GetMapping("/add")
+    public AjaxResult add(@ApiParam(value = "模板ID", required = true) Long tplId, @ApiParam(value = "指标ID数组", required = true) Long[] metricsIds) {
         return success(metricsTplDetailService.insertMetricsTplDetails(tplId, metricsIds));
     }
 
@@ -87,8 +87,8 @@ public class MetricsTplDetailController extends BaseController {
      */
     @ApiOperation("获取模板指标明细详细信息")
     //@PreAuthorize("@ss.hasPermi('metrics:detail:query')")
-    @GetMapping(value = "/{tplDetailId}")
-    public AjaxResult getInfo(@PathVariable("tplDetailId") Long tplDetailId) {
+    @GetMapping(value = "/detail")
+    public AjaxResult getInfo(Long tplDetailId) {
         return success(metricsTplDetailService.selectMetricsTplDetailByTplDetailId(tplDetailId));
     }
 
@@ -146,8 +146,8 @@ public class MetricsTplDetailController extends BaseController {
     @ApiOperation("删除模板指标明细")
     //@PreAuthorize("@ss.hasPermi('metrics:detail:remove')")
     @Log(title = "模板指标明细", businessType = BusinessType.DELETE)
-    @GetMapping("/del/{tplDetailIds}")
-    public AjaxResult remove(@PathVariable Long[] tplDetailIds) {
+    @GetMapping("/del")
+    public AjaxResult remove(Long[] tplDetailIds) {
         for (Long detailId : tplDetailIds) {
             MetricsTplDetail detail = metricsTplDetailService.selectMetricsTplDetailByTplDetailId(detailId);
             omService.del(detail);

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

@@ -61,8 +61,8 @@ public class MetricsTypeController extends BaseController {
      */
     @ApiOperation("获取指标分类详细信息")
     //@PreAuthorize("@ss.hasPermi('metrics:type:query')")
-    @GetMapping(value = "/{typeId}")
-    public AjaxResult getInfo(@PathVariable("typeId") Long typeId) {
+    @GetMapping(value = "/detail")
+    public AjaxResult getInfo(Long typeId) {
         return success(metricsTypeService.selectMetricsTypeByTypeId(typeId));
     }
 
@@ -96,8 +96,8 @@ public class MetricsTypeController extends BaseController {
     @ApiOperation("删除指标分类")
     //@PreAuthorize("@ss.hasPermi('metrics:type:remove')")
     @Log(title = "指标分类" , businessType = BusinessType.DELETE)
-    @GetMapping("/del/{typeIds}")
-    public AjaxResult remove(@PathVariable Long[] typeIds) {
+    @GetMapping("/del")
+    public AjaxResult remove(Long[] typeIds) {
         return toAjax(metricsTypeService.deleteMetricsTypeByTypeIds(typeIds));
     }
 }