Merge branch 'release/3.0' into dev/dev_xp
# Conflicts: # src/main/java/com/ai/da/python/PythonService.java # src/main/java/com/ai/da/service/impl/DesignItemServiceImpl.java
This commit is contained in:
@@ -136,7 +136,7 @@ public class SendEmailUtil {
|
||||
private final static Long TRIAL_ORDER_LIST_ID = 122273L;
|
||||
private final static Long NO_TRIAL_ORDER_LIST_ID = 122591L;
|
||||
|
||||
public static void sendCustomEmail(String receiverAddress, String senderAddress, TrialOrder trialOrder, int emailType, String country) {
|
||||
public static void sendCustomEmail(String receiverAddress, String senderAddress, TrialOrder trialOrder, int emailType, String country, boolean link) {
|
||||
try {
|
||||
// 实例化一个认证对象
|
||||
Credential cred = new Credential(SECRET_ID, SECRET_KEy);
|
||||
@@ -173,7 +173,7 @@ public class SendEmailUtil {
|
||||
}else {
|
||||
template.setTemplateID(NOTIFICATION_TEMPLATE_ID);
|
||||
}
|
||||
template.setTemplateData(buildNotificationData(trialOrder));
|
||||
template.setTemplateData(buildNotificationData(trialOrder, link));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -345,7 +345,7 @@ public class SendEmailUtil {
|
||||
}
|
||||
|
||||
// 构建试用订单通过通知数据
|
||||
private static String buildNotificationData(TrialOrder trialOrder) {
|
||||
private static String buildNotificationData(TrialOrder trialOrder, boolean link) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
// 设置试用订单通过通知相关数据
|
||||
jsonObject.put("title", trialOrder.getTitle());
|
||||
@@ -353,6 +353,11 @@ public class SendEmailUtil {
|
||||
jsonObject.put("givenName", trialOrder.getGivenName());
|
||||
jsonObject.put("userName", trialOrder.getUserName());
|
||||
jsonObject.put("email", trialOrder.getEmail());
|
||||
if (link) {
|
||||
jsonObject.put("days", 14);
|
||||
}else {
|
||||
jsonObject.put("days", 5);
|
||||
}
|
||||
return jsonObject.toJSONString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user