|
@@ -789,9 +789,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
@Transactional
|
|
|
@Override
|
|
|
public void expiredVerifyCode(Long userId, String mobileNumber) {
|
|
|
- int count = this.baseMapper.updateVerifyCodeExpiredTime(userId,mobileNumber);
|
|
|
- if (count != 1){
|
|
|
- throw ExceptionResultEnum.ERROR.exception("验证码过期失败");
|
|
|
+ SysConfig value = sysConfigService.getByKey("sys.code.enable");
|
|
|
+ if (Objects.nonNull(value) && value.getConfigValue().equals("true")) {
|
|
|
+ int count = this.baseMapper.updateVerifyCodeExpiredTime(userId, mobileNumber);
|
|
|
+ if (count != 1) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("验证码过期失败");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|