|
|
@@ -159,4 +159,17 @@ public class IotServerInfoServiceImpl extends ServiceImpl<IotServerInfoMapper, I
|
|
|
response.setCharacterEncoding("utf-8");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Transactional
|
|
|
+ @Override
|
|
|
+ public void del(Long id) {
|
|
|
+ final IotServerInfo info = getById(id);
|
|
|
+ if (ObjectUtil.isEmpty(info)) {
|
|
|
+ throw new RuntimeException("未找到具体iot服务!");
|
|
|
+ }
|
|
|
+ if (1 == info.getIotStatus()) {
|
|
|
+ throw new RuntimeException("请先停用该iot服务!");
|
|
|
+ }
|
|
|
+ removeById(id);
|
|
|
+ }
|
|
|
}
|