Merge remote-tracking branch 'origin/dev/dev' into dev/dev

This commit is contained in:
shahaibo
2025-02-04 14:29:32 +08:00
4 changed files with 29 additions and 26 deletions

View File

@@ -836,7 +836,8 @@ public class SendEmailUtil {
public static void subscriptionEmailReminder(String type, SubscriptionEmailParamsDTO subscriptionEmailParamsDTO, String language, String receiverAddress) {
try {
// String merchantEmail = "kimwong@code-create.com.hk";
String merchantEmail = "xupei3360@163.com";
String developer = "xupei3360@163.com";
String[] receiverEmail = {/*merchantEmail, */developer};
Credential cred = new Credential(SECRET_ID, SECRET_KEy);
// 实例化一个http选项可选的没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
@@ -852,7 +853,7 @@ public class SendEmailUtil {
user.setDestination(new String[]{receiverAddress});
SendEmailRequest merchant = new SendEmailRequest();
merchant.setFromEmailAddress(SEND_ADDRESS);
merchant.setDestination(new String[]{merchantEmail});
merchant.setDestination(receiverEmail);
Template templateUser = new Template();
Template templateMerchant = new Template();
switch (type) {
@@ -938,7 +939,7 @@ public class SendEmailUtil {
private final static Long AFFILIATE_REFUSED = 132125L;
private final static Long AFFILIATE_MONTHLY_SUMMARY = 132126L;
public static void affiliateEmailReminder(String receiverAddress, AffiliateEmailParamsDTO paramsDTO, String type) {
public static void affiliateEmailReminder(String[] receiverAddress, AffiliateEmailParamsDTO paramsDTO, String type) {
try {
Credential cred = new Credential(SECRET_ID, SECRET_KEy);
// 实例化一个http选项可选的没有特殊需求可以跳过
@@ -952,7 +953,7 @@ public class SendEmailUtil {
// 实例化一个请求对象,每个接口都会对应一个request对象
SendEmailRequest req = new SendEmailRequest();
req.setFromEmailAddress(SEND_ADDRESS);
req.setDestination(new String[]{receiverAddress});
req.setDestination(receiverAddress);
Template template = new Template();
switch (type) {
case "new":

View File

@@ -76,9 +76,10 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
affiliate.setPromotionMethod(promotionMethod);
baseMapper.insert(affiliate);
// 邮件通知审批者
// String email = "kimwong@code-create.com.hk";
String email = "xupei3360@163.com";
SendEmailUtil.affiliateEmailReminder(email, new AffiliateEmailParamsDTO(userHolder.getUsername(), promotionMethod), "new");
// String merchantEmail = "kimwong@code-create.com.hk";
String developer = "xupei3360@163.com";
String[] receiverEmail = {/*merchantEmail, */developer};
SendEmailUtil.affiliateEmailReminder(receiverEmail, new AffiliateEmailParamsDTO(userHolder.getUsername(), promotionMethod), "new");
}else {
throw new BusinessException("You have registered an Affiliate", ResultEnum.PROMPT.getCode());
}
@@ -169,7 +170,7 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
// 2、将批准结果邮件通知用户
Account account = accountService.getById(affiliate.getAccountId());
String userEmail = account.getUserEmail();
String[] userEmail = {account.getUserEmail()};
String userName = account.getUserName();
if (isApproved){
SendEmailUtil.affiliateEmailReminder(userEmail, new AffiliateEmailParamsDTO(userName), "accepted");
@@ -312,8 +313,9 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
affiliateEmailParamsDTO.setUnpaidEarnings(totalCommission.toString());
affiliateEmailParamsDTO.setPaidEarnings("0");
String receiverEmail = "xupei3360@163.com";
// String receiverEmail = "kimwong@code-create.com.hk";
// String merchantEmail = "kimwong@code-create.com.hk";
String developer = "xupei3360@163.com";
String[] receiverEmail = {/*merchantEmail, */developer};
// 邮件通知
SendEmailUtil.affiliateEmailReminder(receiverEmail, affiliateEmailParamsDTO, "summary");
}

View File

@@ -257,7 +257,7 @@ public class AlipayHKServiceImpl implements AlipayHKService {
"positive",
orderByOrderNo.getOrderNo());
log.info("用户:{} 积分信息更新成功",orderByOrderNo.getAccountId());
// 邮件通知Kim
// 填入用户信息,邮件通知Kim
String username = accountMapper.selectById(orderByOrderNo.getAccountId()).getUserName();
SendEmailUtil.creditsPurchaseReminder(username, String.valueOf(quantity), totalAmount);
} finally {