|
@ -1,11 +1,15 @@ |
|
|
package org.dromara.sample.manage.controller; |
|
|
package org.dromara.sample.manage.controller; |
|
|
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission; |
|
|
import cn.dev33.satoken.annotation.SaCheckPermission; |
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
import org.dromara.common.core.domain.R; |
|
|
import org.dromara.common.core.domain.R; |
|
|
|
|
|
import org.dromara.common.json.utils.JsonUtils; |
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
|
|
|
|
import org.dromara.common.redis.utils.RedisUtils; |
|
|
import org.dromara.common.satoken.utils.LoginHelper; |
|
|
import org.dromara.common.satoken.utils.LoginHelper; |
|
|
|
|
|
import org.dromara.common.sdk.cloudapi.device.OsdDock; |
|
|
import org.dromara.common.web.core.BaseController; |
|
|
import org.dromara.common.web.core.BaseController; |
|
|
import org.dromara.sample.manage.model.dto.DeviceDTO; |
|
|
import org.dromara.sample.manage.model.dto.DeviceDTO; |
|
|
import org.dromara.sample.manage.model.dto.DeviceFirmwareUpgradeDTO; |
|
|
import org.dromara.sample.manage.model.dto.DeviceFirmwareUpgradeDTO; |
|
@ -23,6 +27,8 @@ import org.dromara.system.api.model.LoginUser; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
import java.util.Collection; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Optional; |
|
|
import java.util.Optional; |
|
|
|
|
|
|
|
@ -70,10 +76,16 @@ public class DeviceController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//更新设备信息-简版
|
|
|
//更新设备信息-简版
|
|
|
@PutMapping("/{workspace_id}/devices/{device_sn}/simple") |
|
|
@PutMapping("/{workspace_id}/devicesUpdate/simple") |
|
|
public HttpResultResponse updateDeviceSimple(@RequestBody DeviceEntity device, |
|
|
public HttpResultResponse updateDeviceSimple( |
|
|
|
|
|
@RequestBody DeviceEntity device, |
|
|
@PathVariable("workspace_id") String workspaceId |
|
|
@PathVariable("workspace_id") String workspaceId |
|
|
|
|
|
// @RequestParam(name = "deviceSn") String deviceSn,
|
|
|
|
|
|
// @RequestParam(name = "pushDeptId") Long pushDeptId
|
|
|
) { |
|
|
) { |
|
|
|
|
|
// DeviceEntity device = new DeviceEntity();
|
|
|
|
|
|
// device.setDeviceSn(deviceSn);
|
|
|
|
|
|
// device.setPushDeptId(pushDeptId);
|
|
|
boolean isUpd = deviceService.updateDeiceSimple(device); |
|
|
boolean isUpd = deviceService.updateDeiceSimple(device); |
|
|
return isUpd ? HttpResultResponse.success() : HttpResultResponse.error(); |
|
|
return isUpd ? HttpResultResponse.success() : HttpResultResponse.error(); |
|
|
} |
|
|
} |
|
|