|
|
@@ -2,10 +2,7 @@ package com.sckw.auth.service.impl;
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-import com.sckw.auth.model.vo.req.ForgetPasswordReqVo;
|
|
|
-import com.sckw.auth.model.vo.req.LoginReqVo;
|
|
|
-import com.sckw.auth.model.vo.req.RegisterReqVo;
|
|
|
-import com.sckw.auth.model.vo.req.UpdatePasswordReqVo;
|
|
|
+import com.sckw.auth.model.vo.req.*;
|
|
|
import com.sckw.auth.model.vo.res.DeptInfoResVo;
|
|
|
import com.sckw.auth.model.vo.res.EntInfoResVo;
|
|
|
import com.sckw.auth.model.vo.res.LoginResVo;
|
|
|
@@ -15,6 +12,7 @@ import com.sckw.core.utils.StringUtils;
|
|
|
import com.sckw.core.web.model.EntCertificateInfo;
|
|
|
import com.sckw.core.web.model.LoginEntInfo;
|
|
|
import com.sckw.core.web.model.LoginUserInfo;
|
|
|
+import com.sckw.message.api.dubbo.SmsInfoService;
|
|
|
import com.sckw.system.api.model.dto.req.ForgetPasswordReqDto;
|
|
|
import com.sckw.system.api.model.dto.req.UpdatePasswordReqDto;
|
|
|
import com.sckw.system.api.model.dto.req.UserLoginReqDto;
|
|
|
@@ -49,6 +47,9 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
@DubboReference(version = "2.0.0", group = "design", check = false)
|
|
|
private RemoteUserService remoteUserService;
|
|
|
|
|
|
+ @DubboReference(version = "2.0.0", group = "design", check = false)
|
|
|
+ private SmsInfoService smsInfoService;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public LoginResVo login(LoginReqVo reqDto) throws SystemException {
|
|
|
@@ -194,6 +195,15 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
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 {
|
|
|
|