|
@@ -159,20 +159,20 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
public R updateLine(@RequestBody @Validated DeviceInfoDto.UpdateLine updateLine){
|
|
|
LambdaUpdateWrapper<DeviceInfo> luw = new LambdaUpdateWrapper<DeviceInfo>().eq(DeviceInfo::getMercId,updateLine.getMercId());
|
|
|
//绑定线路,更换线路
|
|
|
- if(DeviceInfoDto.UPDATE_LINE_UPDATE.equals(updateLine.getType())){
|
|
|
+ if(DeviceInfoDto.UPDATE.equals(updateLine.getType())){
|
|
|
DeviceInfo deviceInfo = new DeviceInfo();
|
|
|
deviceInfo.setPlaceLineId(updateLine.getPlaceLineId());
|
|
|
luw.in(DeviceInfo::getDeviceId,updateLine.getDeviceIds());
|
|
|
baseMapper.update(deviceInfo,luw);
|
|
|
}
|
|
|
//删除线路
|
|
|
- if(DeviceInfoDto.UPDATE_LINE_DEL.equals(updateLine.getType())) {
|
|
|
+ if(DeviceInfoDto.DEL.equals(updateLine.getType())) {
|
|
|
luw.eq(DeviceInfo::getPlaceLineId, updateLine.getWherePlaceLineId());
|
|
|
luw.set(DeviceInfo::getPlaceLineId, null);
|
|
|
baseMapper.update(null, luw);
|
|
|
}
|
|
|
//解绑线路 设置线路ID为null
|
|
|
- if(DeviceInfoDto.UPDATE_LINE_CLEAR.equals(updateLine.getType())) {
|
|
|
+ if(DeviceInfoDto.CLEAR.equals(updateLine.getType())) {
|
|
|
luw.in(DeviceInfo::getDeviceId, updateLine.getDeviceIds());
|
|
|
luw.set(DeviceInfo::getPlaceLineId, null);
|
|
|
baseMapper.update(null, luw);
|