Commit fe64a939 by huangjy

fix: 配网空指针问题

parent 10ec209d
...@@ -196,7 +196,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev ...@@ -196,7 +196,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
public void setup(PlatDeviceSetupDTO dto) { public void setup(PlatDeviceSetupDTO dto) {
PlatDevice db = getOne(new QueryWrapper<PlatDevice>().lambda() PlatDevice db = getOne(new QueryWrapper<PlatDevice>().lambda()
.eq(PlatDevice::getOriDeviceId, dto.getOriDeviceId())); .eq(PlatDevice::getOriDeviceId, dto.getOriDeviceId()));
if (db == null) {
throw new RuntimeException("设备不存在:" + db.getOriDeviceId());
}
String id = db.getId(); String id = db.getId();
PlatDeviceOther other = platDeviceOtherService.getOne(new QueryWrapper<PlatDeviceOther>().lambda() PlatDeviceOther other = platDeviceOtherService.getOne(new QueryWrapper<PlatDeviceOther>().lambda()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment