| | |
| | | @Override |
| | | public boolean initSites(DeviceSiteParame param) { |
| | | if (param.getFlagInit() == 1) { |
| | | if (!this.remove(new LambdaQueryWrapper<>())) { |
| | | throw new CoolException("初始化失败: 删除站点失败!!"); |
| | | List<DeviceSite> list = this.list(new LambdaQueryWrapper<DeviceSite>().select(DeviceSite::getId).last("limit 1")); |
| | | if (!list.isEmpty()) { |
| | | if (!this.remove(new LambdaQueryWrapper<>())) { |
| | | throw new CoolException("初始化失败: 删除站点失败!!"); |
| | | } |
| | | } |
| | | } |
| | | if (Objects.isNull(param.getDeviceSites()) || StringUtils.isBlank(param.getDeviceSites())) { |