@Override
    public ActionResult updateWithPermission(DashboardUpdateParam param) {
        Dashboard dashboardData = queryExistent(param.getId()).getData();
        PermissionUtils.checkOperationPermission(dashboardData.getUserId());

        param.setGmtModified(LocalDateTime.now());
        DashboardDO dashboardDO = dashboardConverter.updateParam2do(param);
        getMapper().updateById(dashboardDO);
        if (CollectionUtils.isEmpty(param.getChartIds())) {
            return ActionResult.isSuccess();
        }
        deleteDashboardRelation(dashboardDO.getId());
        insertDashboardRelation(dashboardDO.getId(), param.getChartIds());
        return ActionResult.isSuccess();
    }
@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