TASK: Affiliate审批通过后,邮件中添加邀请链接

This commit is contained in:
2025-09-12 16:25:34 +08:00
parent ce68696934
commit c922563919
2 changed files with 6 additions and 2 deletions

View File

@@ -17,6 +17,8 @@ public class AffiliateEmailParamsDTO {
private String paidEarnings;
private String invitationLink;
public AffiliateEmailParamsDTO() {
}

View File

@@ -188,11 +188,13 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
Account account = accountService.getById(affiliate.getAccountId());
String[] userEmail = {account.getUserEmail()};
String userName = account.getUserName();
AffiliateEmailParamsDTO affiliateEmailParamsDTO = new AffiliateEmailParamsDTO(userName);
if (isApproved){
SendEmailUtil.affiliateEmailReminder(userEmail, new AffiliateEmailParamsDTO(userName), "accepted");
affiliateEmailParamsDTO.setInvitationLink(affiliate.getLink());
SendEmailUtil.affiliateEmailReminder(userEmail, affiliateEmailParamsDTO, "accepted");
// emailService.affiliateEmailReminder(Collections.singletonList(account.getUserEmail()), new AffiliateEmailParamsDTO(userName), "accepted");
}else {
SendEmailUtil.affiliateEmailReminder(userEmail, new AffiliateEmailParamsDTO(userName), "refused");
SendEmailUtil.affiliateEmailReminder(userEmail, affiliateEmailParamsDTO, "refused");
// emailService.affiliateEmailReminder(Collections.singletonList(account.getUserEmail()), new AffiliateEmailParamsDTO(userName), "refused");
}
return true;