fix(视图):修复使用模版创建的仪表板,仪表板视图的创建人用的模版中视图的创建人信息的问题

This commit is contained in:
wangjiahao 2023-08-01 09:12:24 +08:00
parent 682e7dfc93
commit fadf19d7d0
2 changed files with 4 additions and 0 deletions

View File

@ -355,6 +355,8 @@ public class PanelAppTemplateService {
});
chartView.setId(null);
chartView.setSceneId(sceneId);
chartView.setCreateBy(AuthUtils.getUser().getUsername());
chartView.setCreateTime(System.currentTimeMillis());
ChartViewWithBLOBs newOne = chartViewService.newOne(chartView);
chartViewsRealMap.put(oldViewId, newOne.getId());
}

View File

@ -531,6 +531,8 @@ public class PanelGroupService {
chartView.setId(newViewId);
chartView.setSceneId(newPanelId);
chartView.setDataFrom(CommonConstants.VIEW_DATA_FROM.TEMPLATE);
chartView.setCreateBy(AuthUtils.getUser().getUsername());
chartView.setCreateTime(System.currentTimeMillis());
// 数据处理 1.替换viewId 2.加入panelView 数据(数据来源为template) 3.加入模板view data数据
templateData = templateData.replaceAll(originViewId, newViewId);
panelViews.add(new PanelViewInsertDTO(newViewId, newPanelId, position));