From 21a230951296d4969162e52e7156d51c48212e69 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 21 Dec 2021 18:51:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=88=AA=E5=B1=8F=E5=8F=AA=E6=9C=89?= =?UTF-8?q?=E5=8D=8A=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pom.xml | 12 +++++++++--- .../sechedule/strategy/impl/EmailTaskHandler.java | 4 ++-- .../io/dataease/plugins/server/XEmailTaskServer.java | 6 +++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/backend/pom.xml b/backend/pom.xml index 375150777d..f00f9fdbdc 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -21,6 +21,11 @@ + + ru.yandex.qatools.ashot + ashot + 1.5.4 + com.google.guava @@ -255,6 +260,7 @@ org.seleniumhq.selenium selenium-java + @@ -408,14 +414,14 @@ - + - + - + diff --git a/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java b/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java index 83172c2235..2b23aea483 100644 --- a/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java +++ b/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java @@ -104,7 +104,7 @@ public class EmailTaskHandler extends TaskHandler implements Job { @Async public void sendReport(GlobalTaskInstance taskInstance, XpackEmailTemplateDTO emailTemplateDTO, - SysUserEntity user) { + SysUserEntity user) { EmailXpackService emailXpackService = SpringContextUtil.getBean(EmailXpackService.class); try { byte[] bytes = emailXpackService.printData(panelUrl(emailTemplateDTO.getPanelId()), tokenByUser(user), @@ -153,7 +153,7 @@ public class EmailTaskHandler extends TaskHandler implements Job { private String panelUrl(String panelId) { String domain = ServletUtils.domain(); - return domain + "/#/preview/" + panelId; + return domain + "/#/previewScreenShot/" + panelId + "/true"; } } diff --git a/backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java b/backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java index 82462243e4..78dfecc793 100644 --- a/backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java +++ b/backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java @@ -34,7 +34,7 @@ public class XEmailTaskServer { @PostMapping("/queryTasks/{goPage}/{pageSize}") public Pager> queryTask(@PathVariable int goPage, @PathVariable int pageSize, - @RequestBody XpackGridRequest request) { + @RequestBody XpackGridRequest request) { EmailXpackService emailXpackService = SpringContextUtil.getBean(EmailXpackService.class); Page page = PageHelper.startPage(goPage, pageSize, true); List tasks = emailXpackService.taskGrid(request); @@ -80,7 +80,7 @@ public class XEmailTaskServer { String panelId = request.getPanelId(); String content = request.getContent(); - String url = ServletUtils.domain() + "/#/preview/" + panelId; + String url = ServletUtils.domain() + "/#/previewScreenShot/" + panelId + "/true"; String token = ServletUtils.getToken(); String fileId = null; @@ -116,7 +116,7 @@ public class XEmailTaskServer { @PostMapping("/queryInstancies/{goPage}/{pageSize}") public Pager> instancesGrid(@PathVariable int goPage, @PathVariable int pageSize, - @RequestBody XpackGridRequest request) { + @RequestBody XpackGridRequest request) { EmailXpackService emailXpackService = SpringContextUtil.getBean(EmailXpackService.class); Page page = PageHelper.startPage(goPage, pageSize, true); List instances = emailXpackService.taskInstanceGrid(request);