Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -14,7 +14,8 @@ public class AccountRegisterDTO {
|
|||||||
@ApiModelProperty("邮箱")
|
@ApiModelProperty("邮箱")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
@NotBlank(message = "password.cannot.be.empty")
|
private Boolean verifyEmail;
|
||||||
|
// @NotBlank(message = "password.cannot.be.empty")
|
||||||
@ApiModelProperty("密码")
|
@ApiModelProperty("密码")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
|||||||
@@ -254,8 +254,9 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public Boolean forgetPwd(AccountRegisterDTO accountDTO) {
|
public Boolean forgetPwd(AccountRegisterDTO accountDTO) {
|
||||||
Account emailAccount = getOneByEmail(accountDTO.getEmail());
|
// Account emailAccount = getOneByEmail(accountDTO.getEmail());
|
||||||
//校验邮箱验证码
|
//校验邮箱验证码
|
||||||
|
if (accountDTO.getVerifyEmail()) {
|
||||||
String verifyCode = LocalCacheUtils.getVerifyCodeCache(AuthenticationOperationTypeEnum.FORGET_PWD.name() + "_" + accountDTO.getEmail());
|
String verifyCode = LocalCacheUtils.getVerifyCodeCache(AuthenticationOperationTypeEnum.FORGET_PWD.name() + "_" + accountDTO.getEmail());
|
||||||
if (StringUtils.isBlank(verifyCode)) {
|
if (StringUtils.isBlank(verifyCode)) {
|
||||||
throw new BusinessException("the.verification.code.has.expired", ResultEnum.PROMPT.getCode());
|
throw new BusinessException("the.verification.code.has.expired", ResultEnum.PROMPT.getCode());
|
||||||
@@ -263,7 +264,9 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
if (!verifyCode.equals(accountDTO.getEmailVerifyCode())) {
|
if (!verifyCode.equals(accountDTO.getEmailVerifyCode())) {
|
||||||
throw new BusinessException("verification.code.error", ResultEnum.PROMPT.getCode());
|
throw new BusinessException("verification.code.error", ResultEnum.PROMPT.getCode());
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
updatePwdByEmail(accountDTO.getPassword(), accountDTO.getEmail());
|
updatePwdByEmail(accountDTO.getPassword(), accountDTO.getEmail());
|
||||||
|
}
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
|||||||
// String suffix = pictureCollectonName.substring(pictureCollectonName.lastIndexOf("."));
|
// String suffix = pictureCollectonName.substring(pictureCollectonName.lastIndexOf("."));
|
||||||
// //获取图片前缀
|
// //获取图片前缀
|
||||||
// String prefix = pictureCollectonName.substring(0,pictureCollectonName.lastIndexOf("."));
|
// String prefix = pictureCollectonName.substring(0,pictureCollectonName.lastIndexOf("."));
|
||||||
element.setName(DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD));
|
element.setName(uploadDTO.getFile().getName());
|
||||||
element.setUrl(path);
|
element.setUrl(path);
|
||||||
//按时区计算
|
//按时区计算
|
||||||
element.setCreateDate(DateUtil.getByTimeZone(uploadDTO.getTimeZone()));
|
element.setCreateDate(DateUtil.getByTimeZone(uploadDTO.getTimeZone()));
|
||||||
|
|||||||
@@ -141,7 +141,11 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
|
|||||||
} else {
|
} else {
|
||||||
String[] idName = name.split("_");
|
String[] idName = name.split("_");
|
||||||
if (idName.length > 1) {
|
if (idName.length > 1) {
|
||||||
|
if (idName[0].equals("null")) {
|
||||||
|
d.setId(null);
|
||||||
|
}else {
|
||||||
d.setId(StringUtil.isNullOrEmpty(idName[0]) ? null : Integer.valueOf(idName[0]));
|
d.setId(StringUtil.isNullOrEmpty(idName[0]) ? null : Integer.valueOf(idName[0]));
|
||||||
|
}
|
||||||
d.setName(idName[1]);
|
d.setName(idName[1]);
|
||||||
d.setTcx(idName[2]);
|
d.setTcx(idName[2]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user