Commit d9be4074 authored by linruibiao's avatar linruibiao

整改接口

parent 90436a44
......@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
* @date : 2021-03-25 19:09
**/
@RequestMapping("/panel/configs")
@RequestMapping("/panel-configs")
@RestController
@Api(value = "仪表板样式以及数据配置", description = "仪表板样式以及数据配置")
public class InstrumentPanelConfigController {
......@@ -36,11 +36,11 @@ public class InstrumentPanelConfigController {
required = true,
dataTypeClass = InstrumentPanelPermissionDTO.class),
@ApiImplicitParam(name = "configDetails", value = "仪表板配置详情", required = true)})
public R<Boolean> saveInstrumentPanelConfig(@RequestBody InstrumentPanelConfigDTO config) {
public R<String> saveInstrumentPanelConfig(@RequestBody InstrumentPanelConfigDTO config) {
return R.ok(instrumentPanelConfigService.saveInstrumentPanelConfig(config, 1));
}
@PostMapping("save-push")
@PostMapping("/publish")
@ApiOperation("保存发布仪表板样式以及数据配置")
@ApiImplicitParams({@ApiImplicitParam(name = "instrumentPanelId", value = "仪表板id", required = true),
@ApiImplicitParam(name = "visitPermission",
......@@ -48,13 +48,13 @@ public class InstrumentPanelConfigController {
required = true,
dataTypeClass = InstrumentPanelPermissionDTO.class),
@ApiImplicitParam(name = "configDetails", value = "仪表板配置详情", required = true)})
public R<Boolean> saveAndPushConfig(@RequestBody InstrumentPanelConfigDTO config) {
return R.ok(instrumentPanelConfigService.saveInstrumentPanelConfig(config, 2));
public R<String> publish(@RequestBody InstrumentPanelConfigDTO config) {
return R.ok(instrumentPanelConfigService.publish(config));
}
@GetMapping("{panelId}")
@ApiOperation("根据仪表板id获取仪表板配置")
@ApiImplicitParam(name = "instrumentPanelId", value = "仪表板id")
@ApiImplicitParam(name = "panelId", value = "仪表板id")
public R<InstrumentPanelConfigVo> getInstrumentPanelConfigByInstrumentPanelId(
@PathVariable("panelId") String panelId) {
return R.ok(instrumentPanelConfigService.getInstrumentPanelConfigByInstrumentPanelId(panelId));
......
......@@ -38,7 +38,7 @@ public class InstrumentPanelController {
@PostMapping
@ApiOperation("新增仪表板")
public R<Boolean> saveInstrumentPanel(@RequestBody InstrumentPanel panel) {
public R<String> saveInstrumentPanel(@RequestBody InstrumentPanel panel) {
return R.ok(instrumentPanelService.saveInstrumentPanel(panel));
}
......@@ -49,23 +49,23 @@ public class InstrumentPanelController {
return R.ok(instrumentPanelService.batchPushInstrumentPanel(ids, 1));
}
@PutMapping("/offline/{id}")
@PutMapping("/{id}/offline")
@ApiOperation("下线")
@ApiImplicitParam(name = "id", value = "仪表板id", required = true)
public R<Boolean> offline(@PathVariable("id") String id) {
public R<String> offline(@PathVariable("id") String id) {
return R.ok(instrumentPanelService.offline(id));
}
@DeleteMapping("/{id}")
@ApiOperation("删除仪表板")
@ApiImplicitParam(name = "id", value = "仪表板id", required = true)
public R<Boolean> delPushInstrumentPanel(@PathVariable("id") String id) {
public R<String> delPushInstrumentPanel(@PathVariable("id") String id) {
return R.ok(instrumentPanelService.delPushInstrumentPanel(id));
}
@PostMapping("/save-as")
@ApiOperation("另存为")
public R<Boolean> saveAs(@RequestBody InstrumentPanelDTO instrumentPanelDTO) {
public R<String> saveAs(@RequestBody InstrumentPanelDTO instrumentPanelDTO) {
return R.ok(instrumentPanelService.saveInstrumentPanel(instrumentPanelDTO));
}
......@@ -79,7 +79,7 @@ public class InstrumentPanelController {
@PutMapping("/recovery/{id}")
@ApiOperation("恢复按钮操作")
@ApiImplicitParam(name = "id", value = "仪表板id", required = true)
public R<Boolean> recoveryInstrumentPanel(@PathVariable("id") String id) {
public R<String> recoveryInstrumentPanel(@PathVariable("id") String id) {
return R.ok(instrumentPanelService.recoveryInstrumentPanel(id));
}
......
......@@ -23,7 +23,7 @@ import java.util.List;
* @date : 2021-03-25 15:07
**/
@RestController
@RequestMapping("/panel/groups")
@RequestMapping("/groups")
@Api(value = "仪表板分组")
public class InstrumentPanelGroupController {
......@@ -38,13 +38,13 @@ public class InstrumentPanelGroupController {
return R.ok(instrumentPanelGroupService.loadTrees(name));
}
@GetMapping("/next-nodes")
@GetMapping("/children")
@ApiOperation("点击节点获取,该分组下的仪表板信息,以及分组数据")
@ApiImplicitParams({@ApiImplicitParam(name = "groupId", value = "分组id", required = true),
@ApiImplicitParam(name = "name", value = "分组名称或者仪表板名称")})
public R<List<PanelGroupVo>> findNextNodes(@RequestParam("groupId") String groupId,
public R<List<PanelGroupVo>> children(@RequestParam("groupId") String groupId,
@RequestParam(value = "name", required = false) String name) {
return R.ok(instrumentPanelGroupService.findNextNodes(groupId, name));
return R.ok(instrumentPanelGroupService.children(groupId, name));
}
@GetMapping("/selectInstrumentPanelGroups")
......@@ -55,19 +55,19 @@ public class InstrumentPanelGroupController {
@PostMapping
@ApiOperation("保存仪表板分组")
public R<Boolean> saveInstrumentPanelGroup(@RequestBody InstrumentPanelGroupDTO group) {
public R<String> saveInstrumentPanelGroup(@RequestBody InstrumentPanelGroupDTO group) {
return R.ok(instrumentPanelGroupService.saveInstrumentPanelGroup(group));
}
@PutMapping
@ApiOperation("更新仪表板分组")
public R<Boolean> updateInstrumentPanelGroup(@RequestBody InstrumentPanelGroupDTO group) {
public R<String> updateInstrumentPanelGroup(@RequestBody InstrumentPanelGroupDTO group) {
return R.ok(instrumentPanelGroupService.updateInstrumentPanelGroup(group));
}
@DeleteMapping("/{groupId}")
@ApiOperation("删除仪表板分组")
public R<Boolean> delInstrumentPanelGroup(@PathVariable String groupId) {
public R<String> delInstrumentPanelGroup(@PathVariable String groupId) {
return R.ok(instrumentPanelGroupService.delInstrumentPanelGroup(groupId));
}
......
......@@ -29,7 +29,7 @@ public class InstrumentPanelPermissionController {
@PostMapping
@ApiOperation("保存仪表板权限")
public R<Boolean> saveInstrumentPanelPermission(@RequestBody List<InstrumentPanelPermissionDTO> permissions) {
public R<String> saveInstrumentPanelPermission(@RequestBody List<InstrumentPanelPermissionDTO> permissions) {
return R.ok(instrumentPanelPermissionService.saveInstrumentPanelPermission(permissions));
}
......@@ -43,7 +43,7 @@ public class InstrumentPanelPermissionController {
@PostMapping("/copy-to/{panelId}")
@ApiOperation("将仪表板权限复制给其他仪表板")
@ApiImplicitParam(name = "panelId", value = "其他仪表板id", required = true)
public R<Boolean> saveCopyToOtherInstrumentPanelPermission(
public R<String> saveCopyToOtherInstrumentPanelPermission(
@RequestBody List<InstrumentPanelPermissionDTO> permissions, @PathVariable("panelId") String panelId) {
return R.ok(instrumentPanelPermissionService.saveCopyToOtherInstrumentPanelPermission(permissions, panelId));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment