@Override
    public DataResult<Dashboard> find(Long id) {
        DashboardDO dashboardDO = getMapper().selectById(id);
        if (YesOrNoEnum.YES.getLetter().equals(dashboardDO.getDeleted())) {
            return DataResult.empty();
        }
        Dashboard dashboard = dashboardConverter.do2model(dashboardDO);
        LambdaQueryWrapper<DashboardChartRelationDO> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(DashboardChartRelationDO::getDashboardId, id);
        List<DashboardChartRelationDO> relationDO = getMapper1().selectList(queryWrapper);
        List<Long> chartIds = relationDO.stream().map(DashboardChartRelationDO::getChartId).toList();
        dashboard.setChartIds(chartIds);
        return DataResult.of(dashboard);
    }
@author moji
@version DashboardServiceImpl.java, v 0.1 June 9, 2023 16:06 moji Exp $
@date 2023/06/09
chat2db-server/chat2db-server-domain/chat2db-server-domain-core/src/main/java/ai/chat2db/server/domain/core/impl/DashboardServiceImpl.java