|
|
@@ -79,10 +79,14 @@ public class DeviceController {
|
|
|
}
|
|
|
|
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
|
- @Operation(summary = "删除设备")
|
|
|
- @RequestMapping(value = "deleteDeviceInfo", method = {RequestMethod.POST})
|
|
|
- public ResultContent deleteDeviceInfo(@RequestBody DeviceIdParam param) {
|
|
|
- return deviceInfoService.deleteDeviceInfo(param.getDeviceId());
|
|
|
+ @Operation(summary = "启用-禁用 设备")
|
|
|
+ @RequestMapping(value = "updateDeviceState", method = {RequestMethod.POST})
|
|
|
+ public ResultContent updateDeviceState(@RequestBody DeviceInfoUpdateRemark param) {
|
|
|
+ Assert.hasText(param.getId(), "ID不能为空");
|
|
|
+ if (param.getState() != null) {
|
|
|
+ return ResultContent.buildFail("state不能为空");
|
|
|
+ }
|
|
|
+ return deviceInfoService.updateDeviceState(param);
|
|
|
}
|
|
|
|
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
|
@@ -92,6 +96,13 @@ public class DeviceController {
|
|
|
return deviceInfoService.cancelDeviceInfo(param.getDeviceId());
|
|
|
}
|
|
|
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
+ @Operation(summary = "删除设备")
|
|
|
+ @RequestMapping(value = "deleteDeviceInfo", method = {RequestMethod.POST})
|
|
|
+ public ResultContent deleteDeviceInfo(@RequestBody DeviceIdParam param) {
|
|
|
+ return deviceInfoService.deleteDeviceInfo(param.getDeviceId());
|
|
|
+ }
|
|
|
+
|
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
|
@Operation(summary = "查询设备详情")
|
|
|
@RequestMapping(value = "getDeviceById", method = {RequestMethod.GET})
|
|
|
@@ -126,16 +137,6 @@ public class DeviceController {
|
|
|
return deviceInfoService.updateProject(param);
|
|
|
}
|
|
|
|
|
|
- @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
- @Operation(summary = "启用-禁用 设备")
|
|
|
- @RequestMapping(value = "updateDeviceState", method = {RequestMethod.POST})
|
|
|
- public ResultContent updateDeviceState(@RequestBody DeviceInfoUpdateRemark param) {
|
|
|
- Assert.hasText(param.getId(), "ID不能为空");
|
|
|
- if (param.getState() != null) {
|
|
|
- return ResultContent.buildFail("state不能为空");
|
|
|
- }
|
|
|
- return deviceInfoService.updateDeviceState(param);
|
|
|
- }
|
|
|
|
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
|
@Operation(summary = "改变是否上传日志")
|