Commit 8d13e621 by huangjy

feat:saas端激活设备写入失败抛异常

parent 4b29c078
...@@ -409,7 +409,12 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg> ...@@ -409,7 +409,12 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
.eq(StringUtils.isNotEmpty(param.getStatus()), PlatOrg::getStatus, param.getStatus()) .eq(StringUtils.isNotEmpty(param.getStatus()), PlatOrg::getStatus, param.getStatus())
.eq(PlatOrg::getStatus, CommonEnum.YES.getValue()) .eq(PlatOrg::getStatus, CommonEnum.YES.getValue())
); );
return getOrgTree(orgList, Collections.singletonList(TenantIdUtil.getTenantId())); Map<String, List<PlatOrg>> parentIdMap = orgList.stream().collect(Collectors.groupingBy(PlatOrg::getParentId));
orgList.forEach(vo -> {
List<PlatOrg> childList = parentIdMap.get(vo.getId());
vo.setChildren(childList);
});
return orgList;
} }
//平台账号 查询权限范围 生成不一定连续的树结构 //平台账号 查询权限范围 生成不一定连续的树结构
......
...@@ -758,7 +758,10 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev ...@@ -758,7 +758,10 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
map.put("license",platDeviceActiveVO.getLicense()); map.put("license",platDeviceActiveVO.getLicense());
map.put("appid",shengwangProperties.getAppId()); map.put("appid",shengwangProperties.getAppId());
devicePropertiesOperateService.deviceWriteAttr(platDevice.getOriDeviceId(),map); String result = devicePropertiesOperateService.deviceWriteAttr(platDevice.getOriDeviceId(), map);
if (StringUtils.isNotEmpty(result)) {
throw new RuntimeException(result);
}
} }
} }
......
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