TASK:portfolio;

This commit is contained in:
shahaibo
2024-05-17 10:19:34 +08:00
parent f4766d4ab4
commit ebb6577e98
16 changed files with 715 additions and 23 deletions

View File

@@ -355,7 +355,8 @@ public class SendEmailUtil {
}
private final static Long UPGRADE_NOTIFICATION_ID = 118855L;
public static void sendUpgradeNotification(Account account, String senderAddress) {
private final static Long UPGRADE_NOTIFICATION_ID_CHINESE = 122898L;
public static void sendUpgradeNotification(Account account, String senderAddress, Integer type) {
try {
// 实例化一个认证对象
Credential cred = new Credential(SECRET_ID, SECRET_KEy);
@@ -374,8 +375,13 @@ public class SendEmailUtil {
// 根据邮件类型设置不同的主题和模板
String subject = "";
Template template = new Template();
subject = "Upcoming AiDA 3.0 Launch and Scheduled Maintenance";
template.setTemplateID(UPGRADE_NOTIFICATION_ID);
if (type == 1) {
subject = "Upcoming System Upgrade for AiDA 3.0";
template.setTemplateID(UPGRADE_NOTIFICATION_ID);
}else {
subject = "即将到来的AiDA 3.0系统升级";
template.setTemplateID(UPGRADE_NOTIFICATION_ID_CHINESE);
}
template.setTemplateData(buildAccountData(account));
req.setSubject(subject);