|
@@ -125,6 +125,15 @@ public class DeviceServiceImpl implements DeviceService {
|
|
|
return deviceMapper.update(deviceEntity);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Integer updateDeviceState(Long id, int state){
|
|
|
+ if (syncDeviceService.updateDeviceStatus(id, state) > 0){
|
|
|
+ return deviceMapper.updateDeviceState(id, state);
|
|
|
+ }
|
|
|
+ throw BusinessException.builder(500, "同步更新物联网失败");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public IPage<DeviceVo> selectPage(IPage<DeviceDto> page, DeviceDto deviceDto) {
|
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|