forked from github/dataease
Merge pull request #3078 from dataease/pr@dev@perf_email_task_channel
perf(系统管理-定时报告): 增加消息渠道
This commit is contained in:
commit
c93dd1c59d
@ -68,7 +68,8 @@ public class ShiroServiceImpl implements ShiroService {
|
|||||||
|
|
||||||
filterChainDefinitionMap.put("/**/*.json", ANON);
|
filterChainDefinitionMap.put("/**/*.json", ANON);
|
||||||
filterChainDefinitionMap.put("/system/ui/**", ANON);
|
filterChainDefinitionMap.put("/system/ui/**", ANON);
|
||||||
filterChainDefinitionMap.put("/system/file/**", ANON);
|
filterChainDefinitionMap.put("/system/filedown/**", ANON);
|
||||||
|
filterChainDefinitionMap.put("/system/showpicture/**", ANON);
|
||||||
filterChainDefinitionMap.put("/**/*.js", ANON);
|
filterChainDefinitionMap.put("/**/*.js", ANON);
|
||||||
filterChainDefinitionMap.put("/**/*.css", ANON);
|
filterChainDefinitionMap.put("/**/*.css", ANON);
|
||||||
filterChainDefinitionMap.put("/**/*.map", ANON);
|
filterChainDefinitionMap.put("/**/*.map", ANON);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package io.dataease.controller.sys;
|
package io.dataease.controller.sys;
|
||||||
|
|
||||||
import io.dataease.plugins.common.base.domain.FileMetadata;
|
|
||||||
import io.dataease.plugins.common.base.domain.SystemParameter;
|
import io.dataease.plugins.common.base.domain.SystemParameter;
|
||||||
import io.dataease.commons.constants.ParamConstants;
|
import io.dataease.commons.constants.ParamConstants;
|
||||||
import io.dataease.controller.sys.response.BasicInfo;
|
import io.dataease.controller.sys.response.BasicInfo;
|
||||||
@ -8,6 +8,7 @@ import io.dataease.controller.sys.response.MailInfo;
|
|||||||
import io.dataease.dto.SystemParameterDTO;
|
import io.dataease.dto.SystemParameterDTO;
|
||||||
import io.dataease.listener.DatasetCheckListener;
|
import io.dataease.listener.DatasetCheckListener;
|
||||||
import io.dataease.listener.util.CacheUtils;
|
import io.dataease.listener.util.CacheUtils;
|
||||||
|
import io.dataease.plugins.common.util.GlobalFileUtil;
|
||||||
import io.dataease.plugins.xpack.cas.dto.CasSaveResult;
|
import io.dataease.plugins.xpack.cas.dto.CasSaveResult;
|
||||||
import io.dataease.service.FileService;
|
import io.dataease.service.FileService;
|
||||||
import io.dataease.service.system.EmailService;
|
import io.dataease.service.system.EmailService;
|
||||||
@ -22,7 +23,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -108,21 +109,16 @@ public class SystemParameterController {
|
|||||||
return new ResponseEntity<>(bytes, headers, HttpStatus.OK);
|
return new ResponseEntity<>(bytes, headers, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/file/down/{fileId}/{fileName}")
|
@GetMapping("/filedown/{fileId}/{fileName}")
|
||||||
public ResponseEntity<ByteArrayResource> down(@PathVariable("fileId") String fileId, @PathVariable("fileName") String fileName) throws Exception{
|
public ResponseEntity<ByteArrayResource> down(@PathVariable("fileId") String fileId, @PathVariable("fileName") String fileName) throws Exception {
|
||||||
|
|
||||||
FileMetadata fileMetadata = fileService.getFileMetadataById(fileId);
|
return GlobalFileUtil.down(fileId, fileName);
|
||||||
String type = fileMetadata.getType();
|
}
|
||||||
if (!StringUtils.endsWith(fileName.toUpperCase(), type.toUpperCase())) {
|
|
||||||
fileName += ("." + type);
|
@GetMapping("/showpicture/{fileId}")
|
||||||
}
|
public ResponseEntity<byte[]> showPicture(@PathVariable("fileId") String fileId) throws Exception {
|
||||||
byte[] bytes = fileService.loadFileAsBytes(fileId);
|
|
||||||
ByteArrayResource bar = new ByteArrayResource(bytes);
|
return GlobalFileUtil.showPicture(fileId);
|
||||||
final HttpHeaders headers = new HttpHeaders();
|
|
||||||
headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
|
|
||||||
ContentDisposition contentDisposition = ContentDisposition.parse("attachment; filename=" + URLEncoder.encode(fileName, "UTF-8"));
|
|
||||||
headers.setContentDisposition(contentDisposition);
|
|
||||||
return new ResponseEntity<>(bar, headers, HttpStatus.OK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/save/ui", consumes = {"multipart/form-data"})
|
@PostMapping(value = "/save/ui", consumes = {"multipart/form-data"})
|
||||||
|
@ -2338,6 +2338,11 @@ export default {
|
|||||||
panel: 'Panel',
|
panel: 'Panel',
|
||||||
content: 'Content',
|
content: 'Content',
|
||||||
recipients: 'Recipients',
|
recipients: 'Recipients',
|
||||||
|
recisetting: 'channel',
|
||||||
|
email: 'Email',
|
||||||
|
wecom: 'Wecom',
|
||||||
|
dingtalk: 'Dingtalk',
|
||||||
|
lark: 'Lark',
|
||||||
pixel: 'Pixel',
|
pixel: 'Pixel',
|
||||||
default: 'Default',
|
default: 'Default',
|
||||||
custom: 'Custom',
|
custom: 'Custom',
|
||||||
|
@ -2335,10 +2335,15 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
emailtask: {
|
emailtask: {
|
||||||
title: '郵件主題',
|
title: '報告主題',
|
||||||
panel: '儀錶闆',
|
panel: '儀錶闆',
|
||||||
content: '郵件正文',
|
content: '報告正文',
|
||||||
recipients: '收件人',
|
recipients: '收件人',
|
||||||
|
recisetting: '接受設置',
|
||||||
|
email: '郵件',
|
||||||
|
wecom: '企業微信',
|
||||||
|
dingtalk: '釘釘',
|
||||||
|
lark: '飛書',
|
||||||
pixel: '分辨率',
|
pixel: '分辨率',
|
||||||
default: '默認',
|
default: '默認',
|
||||||
custom: '自定義',
|
custom: '自定義',
|
||||||
|
@ -2335,10 +2335,15 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
emailtask: {
|
emailtask: {
|
||||||
title: '邮件主题',
|
title: '报告主题',
|
||||||
panel: '仪表板',
|
panel: '仪表板',
|
||||||
content: '邮件正文',
|
content: '报告正文',
|
||||||
recipients: '收件人',
|
recipients: '收件人',
|
||||||
|
recisetting: '接受设置',
|
||||||
|
email: '邮件',
|
||||||
|
wecom: '企业微信',
|
||||||
|
dingtalk: '钉钉',
|
||||||
|
lark: '飞书',
|
||||||
pixel: '分辨率',
|
pixel: '分辨率',
|
||||||
default: '默认',
|
default: '默认',
|
||||||
custom: '自定义',
|
custom: '自定义',
|
||||||
|
Loading…
Reference in New Issue
Block a user