Commit 14630cf4 by 罗志长

feat: saas设备详情读取属性

parent 0d971952
......@@ -661,6 +661,21 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
deviceOtherLambdaQueryWrapper.eq(PlatDeviceOther::getDeviceId, platDevice.getId());
PlatDeviceOther platDeviceOther = platDeviceOtherService.getOne(deviceOtherLambdaQueryWrapper, false);
PlatDeviceBaseAttrDTO iotAttr = getDeviceBaseAttrDTO(platDevice);
if (platDeviceOther != null) {
String oldAttr = platDeviceOther.getAttribute();
if (StringUtils.isBlank(platDeviceOther.getAttribute())) {
PlatDeviceBaseAttrDTO defaultAttr = getDefaultAttr(platDevice);
String attr = defaultAttr != null ? JSON.toJSONString(defaultAttr) : null;
platDeviceOther.setAttribute(attr);
}
String attr = getAfterComparisonAttr(iotAttr, platDeviceOther.getAttribute());
if (!StringUtils.equals(oldAttr, attr)) {
platDeviceOther.setAttribute(attr);
platDeviceOtherService.updateById(platDeviceOther);
}
}
DeviceDetail detail = iotProductDeviceService.getDetail(platDevice.getOriDeviceId());
if (detail != null) {
if (detail.getFirmwareInfo() != null) {
......
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