forked from github/dataease
refactor(数据大屏、仪表板): 仪表板数据大屏删除,相关资源改为物理删除
This commit is contained in:
parent
0a11266374
commit
3ee2098f16
@ -16,6 +16,7 @@ import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@Mapper
|
||||
public interface ExtDataVisualizationMapper {
|
||||
@ -51,5 +52,7 @@ public interface ExtDataVisualizationMapper {
|
||||
|
||||
List<VisualizationReportFilterVO> queryReportFilter(@Param("dvId") Long dvId,@Param("taskId") Long taskId);
|
||||
|
||||
void deleteDataVBatch(@Param("ids") Set<Long> ids);
|
||||
|
||||
void deleteViewsBatch(@Param("ids") Set<Long> ids);
|
||||
}
|
||||
|
@ -89,7 +89,11 @@ public class CoreVisualizationManage {
|
||||
});
|
||||
}
|
||||
}
|
||||
extMapper.batchDel(delIds, System.currentTimeMillis(), AuthUtils.getUser().getUserId());
|
||||
// 删除可视化资源
|
||||
extDataVisualizationMapper.deleteDataVBatch(delIds);
|
||||
// 删除图表信息
|
||||
extDataVisualizationMapper.deleteViewsBatch(delIds);
|
||||
|
||||
coreOptRecentManage.saveOpt(id, OptConstants.OPT_RESOURCE_TYPE.VISUALIZATION, OptConstants.OPT_TYPE.DELETE);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
INSERT INTO area (id, level, name, pid) VALUES ('156440315', 'district', '大鹏新区', '156440300');
|
||||
|
||||
DELETE ccv
|
||||
FROM
|
||||
core_chart_view ccv
|
||||
INNER JOIN data_visualization_info dvi ON ccv.scene_id = dvi.id
|
||||
WHERE
|
||||
dvi.delete_flag =1;
|
||||
delete from data_visualization_info dvi where dvi.delete_flag =1;
|
@ -1 +1,9 @@
|
||||
INSERT INTO area (id, level, name, pid) VALUES ('156440315', 'district', '大鹏新区', '156440300');
|
||||
INSERT INTO area (id, level, name, pid) VALUES ('156440315', 'district', '大鹏新区', '156440300');
|
||||
|
||||
DELETE ccv
|
||||
FROM
|
||||
core_chart_view ccv
|
||||
INNER JOIN data_visualization_info dvi ON ccv.scene_id = dvi.id
|
||||
WHERE
|
||||
dvi.delete_flag =1;
|
||||
delete from data_visualization_info dvi where dvi.delete_flag =1;
|
@ -419,4 +419,25 @@
|
||||
visualization_report_filter
|
||||
where visualization_report_filter.resource_id = #{dvId} and visualization_report_filter.task_id = #{taskId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteDataVBatch">
|
||||
DELETE
|
||||
FROM
|
||||
data_visualization_info dvi
|
||||
WHERE
|
||||
dvi.id IN
|
||||
<foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteViewsBatch">
|
||||
DELETE
|
||||
FROM
|
||||
core_chart_view ccv
|
||||
WHERE
|
||||
ccv.scene_id IN
|
||||
<foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user