Commit a0260526 by 杨林龙

有效试驾和无在店数据表添加车辆设备关系表id字段

1 parent 98e8f1d0
...@@ -35,7 +35,9 @@ public class ElectricInStoreService { ...@@ -35,7 +35,9 @@ public class ElectricInStoreService {
vehicleDevice.setBindStatus(1); vehicleDevice.setBindStatus(1);
vehicleDevice.setDelFlag(0); vehicleDevice.setDelFlag(0);
VehicleDevice device = vehicleDeviceMapper.selectOne(vehicleDevice); VehicleDevice device = vehicleDeviceMapper.selectOne(vehicleDevice);
electricInStoreDrive.setVdId(device.getId()); if (device != null) {
electricInStoreDrive.setVdId(device.getId());
}
electricInStoreMapper.insert(electricInStoreDrive); electricInStoreMapper.insert(electricInStoreDrive);
} }
} }
...@@ -37,7 +37,9 @@ public class FenceDriverService { ...@@ -37,7 +37,9 @@ public class FenceDriverService {
vehicleDevice.setBindStatus(1); vehicleDevice.setBindStatus(1);
vehicleDevice.setDelFlag(0); vehicleDevice.setDelFlag(0);
VehicleDevice device = vehicleDeviceMapper.selectOne(vehicleDevice); VehicleDevice device = vehicleDeviceMapper.selectOne(vehicleDevice);
fenceDrive.setVdId(device.getId()); if (device != null) {
fenceDrive.setVdId(device.getId());
}
electricFenceDriveMapper.insert(fenceDrive); electricFenceDriveMapper.insert(fenceDrive);
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!