工业互联网平台2.0版本后端代码
Jay
2024-11-25 ee9f604388a3e77d3f4654e326f3976552e7f532
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java
@@ -100,8 +100,11 @@
            return pointIdMap.get(id);
        }
        DaPointDTO dto = ConvertUtils.sourceToTarget(daPointDao.selectById(id), DaPointDTO.class);
        if (dto == null) {
            return null;
        }
        pointIdMap.put(id, dto);
        return dto;
        return pointIdMap.get(id);
    }
    @Override
@@ -399,6 +402,7 @@
    }
    @Override
    @DSTransactional(rollbackFor = Exception.class)
    public void enableByIds(String[] ids) {
        if (CollectionUtils.isEmpty(Arrays.asList(ids))) {
            return;
@@ -407,11 +411,13 @@
            DaPointEntity entity = new DaPointEntity();
            entity.setId(item);
            entity.setIsEnable(IsEnableEnum.ENABLE.getCode());
            entity.setUpdateTime(new Date());
            daPointDao.updateById(entity);
        });
    }
    @Override
    @DSTransactional(rollbackFor = Exception.class)
    public void disableByIds(String[] ids) {
        if (CollectionUtils.isEmpty(Arrays.asList(ids))) {
            return;
@@ -420,6 +426,7 @@
            DaPointEntity entity = new DaPointEntity();
            entity.setId(item);
            entity.setIsEnable(IsEnableEnum.DISABLE.getCode());
            entity.setUpdateTime(new Date());
            daPointDao.updateById(entity);
        });
    }