...
|
...
|
@@ -59,6 +59,11 @@ func (l *DeleteChartLogic) DeleteChart(req *types.ChartDeleteRequest) (resp *typ |
|
|
chartSetting, err := l.svcCtx.ChartSettingRepository.FindOne(l.ctx, conn, chart.Id)
|
|
|
if err == nil && len(chartSetting.DataSourceIds) > 0 {
|
|
|
for _, sourceId := range chartSetting.DataSourceIds {
|
|
|
//删除数据源
|
|
|
err = DeleteObjectTable(l.ctx, l.svcCtx, conn, int(sourceId))
|
|
|
if err != nil {
|
|
|
return xerr.NewErrMsg("删除失败")
|
|
|
}
|
|
|
//删除分组
|
|
|
err = l.svcCtx.ObjectTableRepository.DeleteGroup(ctx, conn, tenantId, int(sourceId))
|
|
|
if err != nil {
|
...
|
...
|
|