lyhzzz 2 년 전
부모
커밋
01ef2c9a5f
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      src/main/java/com/fdkankan/ucenter/service/impl/LoginService.java

+ 2 - 3
src/main/java/com/fdkankan/ucenter/service/impl/LoginService.java

@@ -164,10 +164,9 @@ public class LoginService {
         if (!param.getConfirmPwd().equals(param.getPassword())){
         if (!param.getConfirmPwd().equals(param.getPassword())){
             throw new BusinessException(LoginConstant.FAILURE_CODE_3009, LoginConstant.FAILURE_MSG_3009);
             throw new BusinessException(LoginConstant.FAILURE_CODE_3009, LoginConstant.FAILURE_MSG_3009);
         }
         }
-        if(param.getMsgAuthCode().equals(registerValidCode)){
-
+        if(!param.getMsgAuthCode().equals(registerValidCode)){
+            checkSms(param.getMsgAuthCode(),param.getPhoneNum(),true);
         }
         }
-        checkSms(param.getMsgAuthCode(),param.getPhoneNum(),true);
         User user = userService.getByUserName(param.getPhoneNum());
         User user = userService.getByUserName(param.getPhoneNum());
         if(user != null){
         if(user != null){
             throw new BusinessException(LoginConstant.FAILURE_CODE_3008, LoginConstant.FAILURE_MSG_3008);
             throw new BusinessException(LoginConstant.FAILURE_CODE_3008, LoginConstant.FAILURE_MSG_3008);