支付优化
This commit is contained in:
@@ -782,7 +782,8 @@ public class SendEmailUtil {
|
||||
|
||||
public static void subscriptionEmailReminder(String type, SubscriptionEmailParamsDTO subscriptionEmailParamsDTO, String language, String receiverAddress){
|
||||
try{
|
||||
String kimEmail = "kimwong@code-create.com.hk";
|
||||
// String merchantEmail = "kimwong@code-create.com.hk";
|
||||
String merchantEmail = "xupei3360@163.com";
|
||||
Credential cred = new Credential(SECRET_ID, SECRET_KEy);
|
||||
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
||||
HttpProfile httpProfile = new HttpProfile();
|
||||
@@ -798,7 +799,7 @@ public class SendEmailUtil {
|
||||
user.setDestination(new String[]{receiverAddress});
|
||||
SendEmailRequest merchant = new SendEmailRequest();
|
||||
merchant.setFromEmailAddress(SEND_ADDRESS);
|
||||
merchant.setDestination(new String[]{kimEmail});
|
||||
merchant.setDestination(new String[]{merchantEmail});
|
||||
Template templateUser = new Template();
|
||||
Template templateMerchant = new Template();
|
||||
switch (type) {
|
||||
@@ -848,12 +849,15 @@ public class SendEmailUtil {
|
||||
templateMerchant.setTemplateData(JSON.toJSONString(subscriptionEmailParamsDTO));
|
||||
merchant.setTemplate(templateMerchant);
|
||||
|
||||
// 返回的resp是一个SendEmailResponse的实例,与请求对象对应
|
||||
SendEmailResponse respUser = client.SendEmail(user);
|
||||
// todo 暂时先不发商家邮件
|
||||
// SendEmailResponse respMerchant = client.SendEmail(merchant);
|
||||
log.info("邮件发送结果toUser###{}", SendEmailResponse.toJsonString(respUser));
|
||||
// log.info("邮件发送结果toMerchant###{}", SendEmailResponse.toJsonString(respMerchant));
|
||||
if (!type.equals("cancel")){
|
||||
// 返回的resp是一个SendEmailResponse的实例,与请求对象对应
|
||||
SendEmailResponse respUser = client.SendEmail(user);
|
||||
log.info("邮件发送结果toUser###{}", SendEmailResponse.toJsonString(respUser));
|
||||
}
|
||||
if (!type.equals("reminder")){
|
||||
SendEmailResponse respMerchant = client.SendEmail(merchant);
|
||||
log.info("邮件发送结果toMerchant###{}", SendEmailResponse.toJsonString(respMerchant));
|
||||
}
|
||||
} catch (TencentCloudSDKException e) {
|
||||
log.info("邮件发送失败###{}", e.toString());
|
||||
throw new BusinessException("failed.to.send.mail");
|
||||
|
||||
Reference in New Issue
Block a user