Browse Source

日志级别调整

dev
jianjun 5 years ago
parent
commit
5fc7e64bb8
  1. 7
      epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java
  2. 6
      epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java

7
epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java

@ -10,10 +10,7 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.GovWebLoginFormDTO; import com.epmet.dto.form.GovWebLoginFormDTO;
import com.epmet.dto.form.GovWebOperLoginFormDTO; import com.epmet.dto.form.GovWebOperLoginFormDTO;
import com.epmet.dto.form.LoginByPassWordFormDTO;
import com.epmet.dto.form.PasswordLoginUserInfoFormDTO;
import com.epmet.dto.result.GovWebOperLoginResultDTO; import com.epmet.dto.result.GovWebOperLoginResultDTO;
import com.epmet.dto.result.PasswordLoginUserInfoResultDTO;
import com.epmet.dto.result.UserTokenResultDTO; import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.feign.EpmetUserFeignClient; import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.jwt.JwtTokenProperties; import com.epmet.jwt.JwtTokenProperties;
@ -65,7 +62,7 @@ public class GovWebServiceImpl implements GovWebService {
//2.验证码校验 //2.验证码校验
boolean flag = captchaService.validate(formDTO.getUuid(), formDTO.getCaptcha()); boolean flag = captchaService.validate(formDTO.getUuid(), formDTO.getCaptcha());
if (!flag) { if (!flag) {
logger.error(String.format("用户%s登录,验证码输入错误,暂时放行", formDTO.getPhone())); logger.warn(String.format("用户%s登录,验证码输入错误", formDTO.getPhone()));
//开启验证码校验 //开启验证码校验
throw new RenException(EpmetErrorCode.ERR10019.getCode()); throw new RenException(EpmetErrorCode.ERR10019.getCode());
} }
@ -84,7 +81,7 @@ public class GovWebServiceImpl implements GovWebService {
//4.密码是否正确 //4.密码是否正确
//密码错误 //密码错误
if (!PasswordUtils.matches(formDTO.getPassword(), resultDTO.getPassWord())) { if (!PasswordUtils.matches(formDTO.getPassword(), resultDTO.getPassWord())) {
logger.error("登陆密码错误"); logger.warn("登陆密码错误");
throw new RenException(EpmetErrorCode.ERR10004.getCode()); throw new RenException(EpmetErrorCode.ERR10004.getCode());
} }

6
epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java

@ -293,9 +293,9 @@ public class LoginServiceImpl implements LoginService {
//1、验证码是否正确 //1、验证码是否正确
boolean flag = captchaService.validate(formDTO.getUuid(), formDTO.getCaptcha()); boolean flag = captchaService.validate(formDTO.getUuid(), formDTO.getCaptcha());
if (!flag) { if (!flag) {
logger.error(String.format("用户%s登录,验证码输入错误,暂时放行",formDTO.getPhone())); logger.warn(String.format("用户%s登录,验证码输入错误", formDTO.getPhone()));
//2020-05-21去除验证码校验 TODO //2020-05-21去除验证码校验
//return new Result<UserTokenResultDTO>().error(EpmetErrorCode.ERR10019.getCode()); return new Result<UserTokenResultDTO>().error(EpmetErrorCode.ERR10019.getCode());
} }
//2、账号是否存在 //2、账号是否存在
//获取用户信息 //获取用户信息

Loading…
Cancel
Save