diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java index f3cef61f98..ed7176c8d4 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java @@ -3,6 +3,7 @@ package com.epmet.service.impl; import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; import cn.binarywang.wx.miniapp.bean.WxMaUserInfo; import com.epmet.common.token.constant.LoginConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.ErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; @@ -248,7 +249,7 @@ public class LoginServiceImpl implements LoginService { //1、验证码是否正确 boolean flag = captchaService.validate(formDTO.getUuid(), formDTO.getCaptcha()); if (!flag) { - return new Result().error(ErrorCode.CAPTCHA_ERROR); + return new Result().error(EpmetErrorCode.ERR10019.getCode()); } //2、账号是否存在 //获取用户信息 diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index c9b876389c..2cb2859bde 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -9,6 +9,7 @@ public enum EpmetErrorCode { ERR10005(10005, "token不能为空"), ERR10006(10006, "登录超时,请重新登录"), ERR10007(10007, "当前帐号已在别处登录"), + ERR10019(10019, "验证码不正确"), ERR401(401, "未授权"), VALIDATE_ERROR(7000, "数据校验异常"), SERVER_ERROR(8000, "服务器开小差了..."), diff --git a/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java b/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java index d3c7d60b6d..acb3d166b5 100644 --- a/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java +++ b/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java @@ -100,6 +100,10 @@ public class CpAuthGatewayFilterFactory extends AbstractGatewayFilterFactory