|
@@ -41,13 +41,13 @@ public class SmsCodeServiceImpl implements SmsCodeService {
|
|
|
@Override
|
|
|
public boolean sendValidCode(String mobile) {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserByMobile(mobile);
|
|
|
- if (sysUser == null) {
|
|
|
- throw new BizException("账号不存在!");
|
|
|
+ Integer userId = null;
|
|
|
+ if (sysUser != null) {
|
|
|
+ if(sysUser.getLockFlag() == 9 || sysUser.getLockFlag() == 1 || sysUser.getDelFlag() == YesOrNoEnum.YES) {
|
|
|
+ throw new BizException("账号已冻结,请联系管理员");
|
|
|
+ }
|
|
|
+ userId = sysUser.getId();
|
|
|
}
|
|
|
- if(sysUser.getLockFlag() == 9 || sysUser.getLockFlag() == 1 || sysUser.getDelFlag() == YesOrNoEnum.YES) {
|
|
|
- throw new BizException("账号已冻结,请联系管理员");
|
|
|
- }
|
|
|
- Integer userId = sysUser.getId();
|
|
|
SysConfig sysConfig = sysConfigService.findByParamName(SysConfigService.SMS_MAX_TIMES);
|
|
|
int times = 3;
|
|
|
if (sysConfig != null) {
|