|
@@ -25,7 +25,7 @@ public class ApplicationTest {
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void test() {
|
|
public void test() {
|
|
- MailboxInfoDTO emailInfoDTO = this.buildMailbox();
|
|
|
|
|
|
+ MailboxInfoDTO emailInfoDTO = this.buildMailbox("", "");
|
|
//
|
|
//
|
|
// emailInfoDTO.setAccount("jjpj_test");
|
|
// emailInfoDTO.setAccount("jjpj_test");
|
|
// emailInfoDTO.setPassword("shzq#919");
|
|
// emailInfoDTO.setPassword("shzq#919");
|
|
@@ -44,8 +44,8 @@ public class ApplicationTest {
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void reportTest() {
|
|
public void reportTest() {
|
|
- MailboxInfoDTO emailInfoDTO = this.buildMailbox();
|
|
|
|
- Date startDate = DateUtil.parse("2024-10-15 11:10:30", DateConst.YYYY_MM_DD_HH_MM_SS);
|
|
|
|
|
|
+ MailboxInfoDTO emailInfoDTO = this.buildMailbox("x", "x");
|
|
|
|
+ Date startDate = DateUtil.parse("2024-10-15 15:10:30", DateConst.YYYY_MM_DD_HH_MM_SS);
|
|
Date endDate = DateUtil.parse("2024-10-15 17:50:30", DateConst.YYYY_MM_DD_HH_MM_SS);
|
|
Date endDate = DateUtil.parse("2024-10-15 17:50:30", DateConst.YYYY_MM_DD_HH_MM_SS);
|
|
try {
|
|
try {
|
|
emailParseService.parseEmail(emailInfoDTO, startDate, endDate);
|
|
emailParseService.parseEmail(emailInfoDTO, startDate, endDate);
|
|
@@ -74,11 +74,11 @@ public class ApplicationTest {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private MailboxInfoDTO buildMailbox() {
|
|
|
|
|
|
+ private MailboxInfoDTO buildMailbox(String account, String pwd) {
|
|
MailboxInfoDTO emailInfoDTO = new MailboxInfoDTO();
|
|
MailboxInfoDTO emailInfoDTO = new MailboxInfoDTO();
|
|
emailInfoDTO.setUserId(1);
|
|
emailInfoDTO.setUserId(1);
|
|
- emailInfoDTO.setAccount("*");
|
|
|
|
- emailInfoDTO.setPassword("*");
|
|
|
|
|
|
+ emailInfoDTO.setAccount(account);
|
|
|
|
+ emailInfoDTO.setPassword(pwd);
|
|
emailInfoDTO.setHost("imap.exmail.qq.com");
|
|
emailInfoDTO.setHost("imap.exmail.qq.com");
|
|
emailInfoDTO.setPort("993");
|
|
emailInfoDTO.setPort("993");
|
|
emailInfoDTO.setProtocol("imap");
|
|
emailInfoDTO.setProtocol("imap");
|