正在显示
1 个修改的文件
包含
5 行增加
和
0 行删除
@@ -59,6 +59,11 @@ func (l *DeleteChartLogic) DeleteChart(req *types.ChartDeleteRequest) (resp *typ | @@ -59,6 +59,11 @@ func (l *DeleteChartLogic) DeleteChart(req *types.ChartDeleteRequest) (resp *typ | ||
59 | chartSetting, err := l.svcCtx.ChartSettingRepository.FindOne(l.ctx, conn, chart.Id) | 59 | chartSetting, err := l.svcCtx.ChartSettingRepository.FindOne(l.ctx, conn, chart.Id) |
60 | if err == nil && len(chartSetting.DataSourceIds) > 0 { | 60 | if err == nil && len(chartSetting.DataSourceIds) > 0 { |
61 | for _, sourceId := range chartSetting.DataSourceIds { | 61 | for _, sourceId := range chartSetting.DataSourceIds { |
62 | + //删除数据源 | ||
63 | + err = DeleteObjectTable(l.ctx, l.svcCtx, conn, int(sourceId)) | ||
64 | + if err != nil { | ||
65 | + return xerr.NewErrMsg("删除失败") | ||
66 | + } | ||
62 | //删除分组 | 67 | //删除分组 |
63 | err = l.svcCtx.ObjectTableRepository.DeleteGroup(ctx, conn, tenantId, int(sourceId)) | 68 | err = l.svcCtx.ObjectTableRepository.DeleteGroup(ctx, conn, tenantId, int(sourceId)) |
64 | if err != nil { | 69 | if err != nil { |
-
请 注册 或 登录 后发表评论