From dc80c3c59491089424da76a41487e6d11b2bcbe4 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 15 Jul 2020 14:55:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=80=81=E9=AA=8C=E8=AF=81=E6=B3=95?= =?UTF-8?q?=E7=BB=99=E5=89=8D=E5=8F=B08000=E4=BB=A5=E4=B8=8A=E7=9A=84?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/constant/PublicUserLoginConstant.java | 8 -------- .../epmet/service/impl/PublicUserLoginServiceImpl.java | 6 +++--- .../com/epmet/commons/tools/exception/EpmetErrorCode.java | 5 ++++- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/epmet-auth/src/main/java/com/epmet/constant/PublicUserLoginConstant.java b/epmet-auth/src/main/java/com/epmet/constant/PublicUserLoginConstant.java index f2a2462e6a..e29d75ad0c 100644 --- a/epmet-auth/src/main/java/com/epmet/constant/PublicUserLoginConstant.java +++ b/epmet-auth/src/main/java/com/epmet/constant/PublicUserLoginConstant.java @@ -14,14 +14,6 @@ public interface PublicUserLoginConstant { * 是否登陆(true false) */ String PARAMETER_EXCEPTION = "是否登陆值错误"; - /** - * 登陆验证 - */ - String LOGON_EXCEPTION = "该手机号未注册"; - /** - * 注册验证 - */ - String ZHU_CE_EXCEPTION = "该手机号已注册"; /** * 用户登陆 新增访问记录 */ diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java index a9b9703cbd..21c0bc8c53 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java @@ -157,11 +157,11 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService { CustomerUserResultDTO ResultDTO = Result.getData(); //登陆 if (formDTO.getIsLogon() && null == ResultDTO.getPaUserResult()) { - throw new RenException(PublicUserLoginConstant.LOGON_EXCEPTION); + throw new RenException(EpmetErrorCode.PUBLIC_NOT_EXISTS.getCode()); } //注册 if (!formDTO.getIsLogon() && null != ResultDTO.getPaUserResult()) { - throw new RenException(PublicUserLoginConstant.ZHU_CE_EXCEPTION); + throw new RenException(EpmetErrorCode.MOBILE_USED.getCode()); } //3、发送短信验证码 SendVerificationCodeFormDTO sendVerificationCodeFormDTO = new SendVerificationCodeFormDTO(); @@ -197,7 +197,7 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService { //2.用户不存在时不允许登陆 PaUserDTO userDTO = resultDTO.getPaUserResult(); if (null == userDTO || StringUtils.isBlank(userDTO.getId())) { - throw new RenException(PublicUserLoginConstant.LOGON_EXCEPTION); + throw new RenException(EpmetErrorCode.PUBLIC_NOT_EXISTS.getCode()); } //3.校验验证码是否正确 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 aa7bc28867..c511a295c2 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 @@ -82,7 +82,10 @@ public enum EpmetErrorCode { DRAFT_CONTENT_IS_NULL(8801, "至少需要添加一个段落"), ARTICLE_PUBLISH_ERROR(8801, "发布文章失败,请刷新重试"), - CUSTOMER_VALIDATE_ERROR(8999, "内部数据校验异常"); + CUSTOMER_VALIDATE_ERROR(8999, "内部数据校验异常"), + + //公众号 865..开头的码 + PUBLIC_NOT_EXISTS(8651,"手机号未注册,请先完成信息注册"),; private int code;