【更新】AuthApi增加校验验证码接口方便其他模块调用

pull/281/head
xuyuxiang 2025-08-02 22:58:36 +08:00
parent ad80b8508c
commit eda0205461
4 changed files with 25 additions and 3 deletions

View File

@ -38,6 +38,14 @@ public interface AuthApi {
*/
Long getThirdUserCount();
/**
*
*
* @author xuyuxiang
* @date 2021/12/28 14:46
**/
void validValidCode(String phoneOrEmail, String validCode, String validCodeReqNo);
/**
* B
*

View File

@ -60,7 +60,7 @@ public class AuthApiProvider implements AuthApi {
jsonObject.set("tokenCount", tokenCount);
jsonObject.set("createTime", DateTime.of(createTime));
return jsonObject;
}).collect(Collectors.toList());
}).toList();
List<JSONObject> sessionListC = StpClientUtil.searchSessionId("", -1, -1, true).stream().map(sessionId -> {
JSONObject jsonObject = JSONUtil.createObj();
@ -72,7 +72,7 @@ public class AuthApiProvider implements AuthApi {
jsonObject.set("tokenCount", tokenCount);
jsonObject.set("createTime", DateTime.of(createTime));
return jsonObject;
}).collect(Collectors.toList());
}).toList();
resultObj.set("backUserSessionCount" ,sessionListB.size());
resultObj.set("clientUserSessionCount" ,sessionListC.size());
return resultObj;
@ -83,6 +83,11 @@ public class AuthApiProvider implements AuthApi {
return authThirdService.count();
}
@Override
public void validValidCode(String phoneOrEmail, String validCode, String validCodeReqNo) {
authService.validValidCode(phoneOrEmail, validCode, validCodeReqNo);
}
@Override
public String doLoginForB(String account, String password, String validCode, String validCodeReqNo) {
AuthAccountPasswordLoginParam authAccountPasswordLoginParam = new AuthAccountPasswordLoginParam();

View File

@ -112,4 +112,12 @@ public interface AuthService {
* @date 2022/7/9 14:44
*/
void register(AuthRegisterParam authRegisterParam, String type);
/**
*
*
* @author xuyuxiang
* @date 2021/12/28 14:46
**/
void validValidCode(String phoneOrEmail, String validCode, String validCodeReqNo);
}

View File

@ -317,7 +317,8 @@ public class AuthServiceImpl implements AuthService {
* @author xuyuxiang
* @date 2022/8/25 15:26
**/
private void validValidCode(String phoneOrEmail, String validCode, String validCodeReqNo) {
@Override
public void validValidCode(String phoneOrEmail, String validCode, String validCodeReqNo) {
// 依据请求号,取出缓存中的验证码进行校验
Object existValidCode;
if(ObjectUtil.isEmpty(phoneOrEmail)) {