绑定邮箱时添加国家、职业信息
This commit is contained in:
@@ -21,12 +21,4 @@ public class AccountBindEmailDTO {
|
||||
@NotBlank(message = "emailVerifyCode.cannot.be.empty")
|
||||
@ApiModelProperty("邮箱验证码")
|
||||
private String emailVerifyCode;
|
||||
|
||||
@NotBlank(message = "country cannot be empty" )
|
||||
@ApiModelProperty("国家")
|
||||
private String country;
|
||||
|
||||
@NotBlank(message = "occupation cannot be empty")
|
||||
@ApiModelProperty("职业")
|
||||
private String occupation;
|
||||
}
|
||||
|
||||
@@ -21,4 +21,10 @@ public class EmailSendDTO {
|
||||
@ApiModelProperty("异常ip")
|
||||
private String ip;
|
||||
|
||||
@ApiModelProperty("国家")
|
||||
private String country;
|
||||
|
||||
@ApiModelProperty("职业")
|
||||
private String occupation;
|
||||
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user