app设备类型查询
This commit is contained in:
@ -107,4 +107,5 @@ public class Device extends TenantEntity {
|
||||
*/
|
||||
private String createByName;
|
||||
|
||||
private Long bindingUserId;
|
||||
}
|
||||
|
@ -27,4 +27,9 @@ public class AppDeviceVo {
|
||||
* 通讯方式 0:4G;1:蓝牙
|
||||
*/
|
||||
private Integer communicationMode;
|
||||
|
||||
/**
|
||||
* 设备图片
|
||||
*/
|
||||
private String devicePic;
|
||||
}
|
||||
|
@ -90,4 +90,5 @@ public interface DeviceService extends IService<Device> {
|
||||
int bindDevice(AppDeviceBo bo);
|
||||
|
||||
int unBindDevice(Long id);
|
||||
|
||||
}
|
||||
|
@ -496,7 +496,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||
deviceUpdateWrapper.eq("id", device.getId())
|
||||
.set("binding_status", BindingStatusEnum.BOUND.getCode())
|
||||
.set("binding_user_id",userId);
|
||||
return baseMapper.update(null, qw);
|
||||
return baseMapper.update(null, deviceUpdateWrapper);
|
||||
}else{
|
||||
throw new RuntimeException("通讯方式错误");
|
||||
}
|
||||
@ -509,11 +509,10 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||
if(device == null){
|
||||
throw new RuntimeException("请先将设备入库!!!");
|
||||
}
|
||||
// DeviceType deviceType = deviceTypeMapper.selectById(device.getDeviceType());
|
||||
// String mode = deviceType.getCommunicationMode();
|
||||
UpdateWrapper<Device> deviceUpdateWrapper = new UpdateWrapper<>();
|
||||
deviceUpdateWrapper.eq("id", device.getId())
|
||||
.set("binding_status", BindingStatusEnum.UNBOUND.getCode());
|
||||
|
||||
return baseMapper.update(null, deviceUpdateWrapper);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user