Merge branch 'dev/dev_xp' into dev/dev

This commit is contained in:
2025-01-13 11:13:31 +08:00
4 changed files with 29 additions and 11 deletions

View File

@@ -305,8 +305,6 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
}
//绑定
account.setUserEmail(accountBindEmailDTO.getUserEmail());
account.setCountry(accountBindEmailDTO.getCountry());
account.setOccupation(accountBindEmailDTO.getOccupation());
accountMapper.updateById(account);
// updatePwdByUserId(accountBindEmailDTO.getUserEmail(), accountBindEmailDTO.getUserId());
return Boolean.TRUE;
@@ -418,11 +416,29 @@ 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,
SendEmailUtil.CHANGE_MAILBOX_TEMPLATE_ID, randomVerifyCode);
break;
case UPDATE_USERINFO:
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);
result = true;
}
break;
default:
}
if (!result) {