czh 2 лет назад
Родитель
Сommit
f403fb4977

+ 0 - 25
sckw-auth/src/main/java/com/sckw/auth/service/IAuthService.java

@@ -25,22 +25,6 @@ public interface IAuthService {
      */
     void register(RegisterReqVo reqVo);
 
-    /**
-     * @param reqDto 忘记密码入参
-     * @desc: 忘记密码
-     * @author: czh
-     * @date: 2023/6/19
-     */
-    void forgetPassword(ForgetPasswordReqVo reqDto);
-
-    /**
-     * @param reqVo 修改密码入参
-     * @desc: 修改密码
-     * @author: czh
-     * @date: 2023/7/3
-     */
-    void updatePassword(UpdatePasswordReqVo reqVo);
-
     /**
      * @param id 用户id
      * @desc: 重置密码
@@ -49,15 +33,6 @@ public interface IAuthService {
      */
     void resetPassword(Long id);
 
-    /**
-     * @desc: 获取验证码
-     * @param: reqVo 入参
-     * @author: czh
-     * @date 2023/7/23
-     * @return String
-     */
-    String getRegisterSms(GetRegisterSmsReqVo reqVo);
-
     /**
      * 司机端登录
      * @param loginBase

+ 3 - 30
sckw-auth/src/main/java/com/sckw/auth/service/impl/AuthServiceImpl.java

@@ -8,6 +8,7 @@ import com.sckw.auth.model.vo.res.EntInfoResVo;
 import com.sckw.auth.model.vo.res.LoginResVo;
 import com.sckw.auth.model.vo.res.LoginResVo1;
 import com.sckw.auth.util.AsyncFactory;
+import com.sckw.core.common.enums.enums.DictEnum;
 import com.sckw.core.model.enums.ClientTypeEnum;
 import com.sckw.core.model.enums.LoginMethodEnum;
 import com.sckw.core.model.enums.SystemTypeEnum;
@@ -177,15 +178,11 @@ public class AuthServiceImpl implements IAuthService {
     @Transactional(rollbackFor = {})
     public void register(RegisterReqVo reqVo) {
         /*校验验证码*/
-        String key = Global.USER_LOGIN_CAPTCHA + reqVo.getPhone() + Global.COLON + reqVo.getSystemType();
+        String key = StringUtils.format(RedisConstant.MESSAGE_SMS_VERIFY_CODE_VALUE_KEY, DictEnum.SMS_REGISTER.getValue(), reqVo.getPhone());
         String sms = RedissonUtils.getString(key);
-//        if (!reqVo.getCaptcha().equals(sms)) {
-//            throw new SystemException(HttpStatus.CODE_10301, HttpStatus.CAPTCHA_ERROR);
-//        }
-        if (!"12345".equals(reqVo.getCaptcha())) {
+        if (!reqVo.getCaptcha().equals(sms)) {
             throw new SystemException(HttpStatus.CODE_10301, HttpStatus.CAPTCHA_ERROR);
         }
-
         RegisterReqDto registerReqDto = new RegisterReqDto();
         BeanUtils.copyProperties(reqVo, registerReqDto);
         remoteUserService.register(registerReqDto);
@@ -193,35 +190,11 @@ public class AuthServiceImpl implements IAuthService {
     }
 
 
-    @Override
-    public void forgetPassword(ForgetPasswordReqVo reqDto) throws SystemException {
-        ForgetPasswordReqDto forgetPasswordReqDto = new ForgetPasswordReqDto();
-        BeanUtils.copyProperties(reqDto, forgetPasswordReqDto);
-        remoteUserService.forgetPassword(forgetPasswordReqDto);
-    }
-
-    @Override
-    public void updatePassword(UpdatePasswordReqVo reqVo) throws SystemException {
-        UpdatePasswordReqDto updatePassword = new UpdatePasswordReqDto();
-        BeanUtils.copyProperties(reqVo, updatePassword);
-        remoteUserService.updatePassword(updatePassword);
-    }
-
     @Override
     public void resetPassword(Long id) {
         remoteUserService.resetPassword(id);
     }
 
-    @Override
-    public String getRegisterSms(GetRegisterSmsReqVo reqVo) {
-        String code = "";
-        remoteUserService.checkRegisterParam(reqVo.getEntName(), reqVo.getPhone(), reqVo.getSystemType());
-        String key = Global.USER_LOGIN_CAPTCHA + reqVo.getPhone() + Global.COLON + reqVo.getSystemType();
-        RedissonUtils.put(key, code, 30L);
-        return code;
-    }
-
-
     static class AsyncProcess implements Runnable {
 
         private final LoginResVo loginResVo;