修改邮件代码

master
bynt 1 year ago
parent 386e809909
commit 19fba9ef80

@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
@Generated( @Generated(
value = "org.mapstruct.ap.MappingProcessor", value = "org.mapstruct.ap.MappingProcessor",
date = "2023-08-09T18:29:07+0800", date = "2023-09-27T14:06:43+0800",
comments = "version: 1.3.1.Final, compiler: javac, environment: Java 1.8.0_251 (Oracle Corporation)" comments = "version: 1.3.1.Final, compiler: javac, environment: Java 1.8.0_251 (Oracle Corporation)"
) )
@Component @Component

@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
@Generated( @Generated(
value = "org.mapstruct.ap.MappingProcessor", value = "org.mapstruct.ap.MappingProcessor",
date = "2023-08-09T18:29:07+0800", date = "2023-09-27T14:06:43+0800",
comments = "version: 1.3.1.Final, compiler: javac, environment: Java 1.8.0_251 (Oracle Corporation)" comments = "version: 1.3.1.Final, compiler: javac, environment: Java 1.8.0_251 (Oracle Corporation)"
) )
@Component @Component

@ -86,8 +86,8 @@ public class StatisticsDmpServiceImpl implements StatisticsDmpService {
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
list.add(conditionDto.getMail()); list.add(conditionDto.getMail());
emailVo.setTos(list); emailVo.setTos(list);
emailVo.setSubject("一次性短链");
emailVo.setContent(link); emailVo.setContent(link);
emailVo.setSubject("一次性短链".concat(StrUtil.DASHED).concat((conditionDto.getQueryType() == 1 ? "方式一" : "方式二")));
emailService.outlookMail(emailVo, emailService.find()); emailService.outlookMail(emailVo, emailService.find());
} }

@ -182,12 +182,14 @@ public class SimpleTest {
public static void main(String[] args) { public static void main(String[] args) {
List<String> strings = ToolExcelUtils.excelParseListByUrl("F:\\新建文件夹\\电销名单\\123456\\123123\\chenlei1\\萧山\\恒园公寓萧山经济开发区1266 (1).xlsx"); int length = "5a8913474914b8878c9b035d7e540be0".length();
System.out.println(length);
/* List<String> strings = ToolExcelUtils.excelParseListByUrl("F:\\新建文件夹\\电销名单\\123456\\123123\\chenlei1\\萧山\\恒园公寓萧山经济开发区1266 (1).xlsx");
for (String string : strings) { for (String string : strings) {
System.out.println(string); System.out.println(string);
} }
*/
} }

@ -116,7 +116,7 @@ public class EmailServiceImpl implements EmailService {
while (count < 3) { while (count < 3) {
boolean result = MailUtil.sendEmail(emailConfig.getFromUser(), boolean result = MailUtil.sendEmail(emailConfig.getFromUser(),
EncryptUtils.desDecrypt(emailConfig.getPass()), EncryptUtils.desDecrypt(emailConfig.getPass()),
emailConfig.getHost(), emailConfig.getPort(), toAddress, "一次性短链", emailVo.getContent()); emailConfig.getHost(), emailConfig.getPort(), toAddress, emailVo.getSubject(), emailVo.getContent());
log.info("===================== send mail result as {} =====================", result); log.info("===================== send mail result as {} =====================", result);
if (result) { if (result) {
break; break;

Loading…
Cancel
Save