Commit b899a492 by huangfusuper

改变邮件日志显示格式

parent fac8a599
...@@ -6,13 +6,13 @@ spring: ...@@ -6,13 +6,13 @@ spring:
password: 123456 password: 123456
mail: mail:
host: smtp.163.com #我自己的SMTP服务器地 host: smtp.163.com #���Լ���SMTP��������ַ
username: huangfusuper@163.com #登录用户名 username: huangfusuper@163.com #��¼�û���
password: huangfu0110 #授权密码 password: huangfu0110 #��Ȩ����
default-encoding: UTF-8 default-encoding: UTF-8
protocol: smtp #协 protocol: smtp ��
properties: properties:
from: huangfusuper@163.com #真实邮箱 from: huangfusuper@163.com #��ʵ����
mybatis: mybatis:
mapper-locations: /mapper/*.xml mapper-locations: /mapper/*.xml
...@@ -25,4 +25,9 @@ myth-rpc: ...@@ -25,4 +25,9 @@ myth-rpc:
port: 6665 port: 6665
logging: logging:
path: /data/mythjob path: /data/mythjob
file: myth_log_file file: myth_log_file
\ No newline at end of file
file:
system:
ip: 10.0.120.2
port: 88
\ No newline at end of file
...@@ -12,6 +12,7 @@ import com.byit.service.RunRecordingService; ...@@ -12,6 +12,7 @@ import com.byit.service.RunRecordingService;
import com.byit.util.TimeFormatUtil; import com.byit.util.TimeFormatUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.sql.DataSource; import javax.sql.DataSource;
...@@ -45,6 +46,19 @@ public class RunRecordingScanHelper { ...@@ -45,6 +46,19 @@ public class RunRecordingScanHelper {
*/ */
public static final String SUCCESS_DONE = "3"; public static final String SUCCESS_DONE = "3";
/**
* 文件服务器ip
*/
@Value("${file.system.ip}")
private String fileSystemIp;
/**
* 文件服务器端口号
*/
@Value("${file.system.port}")
private String fileSystemPort;
private static final String FILE_SYSTEM_PRE="http://";
private DataSource dataSource; private DataSource dataSource;
private final EmailAlarmService emailAlarmService; private final EmailAlarmService emailAlarmService;
...@@ -239,6 +253,11 @@ public class RunRecordingScanHelper { ...@@ -239,6 +253,11 @@ public class RunRecordingScanHelper {
jobTaskRunLogs.forEach(jobTaskRunLog -> { jobTaskRunLogs.forEach(jobTaskRunLog -> {
long timeConsuming = jobTaskRunLog.getEndTime().getTime() - jobTaskRunLog.getStartTime().getTime(); long timeConsuming = jobTaskRunLog.getEndTime().getTime() - jobTaskRunLog.getStartTime().getTime();
log.info("######################{}#####################3",timeConsuming); log.info("######################{}#####################3",timeConsuming);
/*
* String iframeHtml = "<iframe src='%s'></iframe>";
* String logFilePath = FILE_SYSTEM_PRE+fileSystemIp+":"+fileSystemPort+"/"+jobTaskRunLog.getLogRemotelyPath();
* String logFileUrl = String.format(iframeHtml,logFilePath);
*/
stringBuilder.append("<tr align='center'>") stringBuilder.append("<tr align='center'>")
.append(String.format("<td>%s</td>", jobTaskRunLog.getNodeName())) .append(String.format("<td>%s</td>", jobTaskRunLog.getNodeName()))
.append(String.format("<td>%s</td>", DateUtil.format(jobTaskRunLog.getStartTime(), DATE_FORMAT))) .append(String.format("<td>%s</td>", DateUtil.format(jobTaskRunLog.getStartTime(), DATE_FORMAT)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment