绑定邮箱时添加国家、职业信息

This commit is contained in:
2025-01-13 10:55:08 +08:00
parent ac2454fd0e
commit ab303cfeef
3 changed files with 15 additions and 8 deletions

View File

@@ -418,6 +418,15 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
}
result = SendEmailUtil.send(emailSendDTO.getEmail(), null,
SendEmailUtil.BIND_MAILBOX_TEMPLATE_ID, randomVerifyCode);
if (!StringUtil.isNullOrEmpty(emailSendDTO.getCountry()) || !StringUtil.isNullOrEmpty(emailSendDTO.getOccupation())){
Long accountId = UserContext.getUserHolder().getId();
Account account = baseMapper.selectById(accountId);
account.setCountry(emailSendDTO.getCountry());
account.setOccupation(emailSendDTO.getOccupation());
baseMapper.updateById(account);
}
break;
case CHANGE_MAILBOX:
result = SendEmailUtil.send(emailSendDTO.getEmail(), null,