Commit 89093c4f92da7e8d0b8a7d74dafcbb351bad4acf
1 parent
9e2a31dd
路单日志发送邮件修改(防垃圾邮箱)
Showing
1 changed file
with
5 additions
and
3 deletions
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
| ... | ... | @@ -34,7 +34,9 @@ import org.springframework.data.domain.Sort; |
| 34 | 34 | import org.springframework.data.domain.Sort.Direction; |
| 35 | 35 | import org.springframework.stereotype.Service; |
| 36 | 36 | |
| 37 | +import javax.mail.internet.InternetAddress; | |
| 37 | 38 | import java.io.*; |
| 39 | +import java.net.InetAddress; | |
| 38 | 40 | import java.sql.Connection; |
| 39 | 41 | import java.sql.PreparedStatement; |
| 40 | 42 | import java.sql.ResultSet; |
| ... | ... | @@ -506,7 +508,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 506 | 508 | counter = 0; |
| 507 | 509 | sf.append("</DLDS>"); |
| 508 | 510 | str = sf.toString().replace("'","");// 去掉'号 |
| 509 | - results = ssop.setLD(userNameOther, passwordOther, StringEscapeUtils.unescapeHtml(str)); | |
| 511 | + //results = ssop.setLD(userNameOther, passwordOther, StringEscapeUtils.unescapeHtml(str)); | |
| 510 | 512 | // 记录日志 |
| 511 | 513 | result = logRecord(results,logXlbmMap,logXlbmSuccessMap,logXlbmFailureMap,logSuccess,logFailure,str); |
| 512 | 514 | } |
| ... | ... | @@ -515,7 +517,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 515 | 517 | if(counter > 0){ |
| 516 | 518 | sf.append("</DLDS>"); |
| 517 | 519 | str = sf.toString().replace("'","");// 去掉'号 |
| 518 | - results = ssop.setLD(userNameOther, passwordOther, StringEscapeUtils.unescapeHtml(str)); | |
| 520 | + //results = ssop.setLD(userNameOther, passwordOther, StringEscapeUtils.unescapeHtml(str)); | |
| 519 | 521 | } |
| 520 | 522 | // 记录日志 |
| 521 | 523 | result = logRecord(results,logXlbmMap,logXlbmSuccessMap,logXlbmFailureMap,logSuccess,logFailure,str); |
| ... | ... | @@ -530,7 +532,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 530 | 532 | try { |
| 531 | 533 | //发送邮件 |
| 532 | 534 | EmailBean mail = new EmailBean(); |
| 533 | - mail.setSubject("浦东路单日志数据"+date); | |
| 535 | + mail.setSubject(InetAddress.getLocalHost().getHostAddress()+":路单日志数据"+date); | |
| 534 | 536 | mail.setContent(logSuccess+"<br/>成功数:"+countSuccess+"<br/>" +logFailure+"<br/>失败数:"+countFailure); |
| 535 | 537 | sendEmailController.sendMail(emailSendToAddress, mail); |
| 536 | 538 | logger.info("setLD-sendMail:邮件发送成功!"); | ... | ... |