|
|
@@ -60,6 +60,11 @@ public class ForgotPassWordService extends SuperService {
|
|
|
// 随机key存储的时间 10 分钟
|
|
|
private final Long keyTime = 60 * 10L;
|
|
|
|
|
|
+ /**
|
|
|
+ * 通过手机号码和身份证验证用户是否存在
|
|
|
+ * @param param
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public ResultContent<ValidateUserModel> verifyUserExitByPhone(ValidateUserParam param) {
|
|
|
ValidateUserModel model = new ValidateUserModel();
|
|
|
if (StringUtils.isEmpty(param.getPhone())) {
|
|
|
@@ -83,23 +88,14 @@ public class ForgotPassWordService extends SuperService {
|
|
|
return ResultContent.buildSuccess(model);
|
|
|
}
|
|
|
|
|
|
- public ResultContent<ValidateUserModel> verifyUserExitByFace(ValidateUserParam param) {
|
|
|
- ValidateUserModel model = new ValidateUserModel();
|
|
|
- if (StringUtils.isEmpty(param.getFaceUrl())) {
|
|
|
- return ResultContent.buildFail("faceUrl is empty");
|
|
|
- }
|
|
|
- String faceBase64 = commonService.getUrlFileBase64(param.getFaceUrl());
|
|
|
- return ResultContent.buildSuccess(model);
|
|
|
- }
|
|
|
-
|
|
|
public ResultContent<ValidateUserModel> verifyUserExitByImage(MultipartFile file) {
|
|
|
ValidateUserModel model = new ValidateUserModel();
|
|
|
- com.github.microservice.auth.client.content.ResultContent<Object> resultContent = userFaceService.matches(file);
|
|
|
+ com.github.microservice.auth.client.content.ResultContent<String> resultContent = userFaceService.getMatchesKey(file);
|
|
|
if (resultContent.isFailed()) {
|
|
|
return ResultContent.buildFail(resultContent.getMsg());
|
|
|
}
|
|
|
|
|
|
- String userId = "";
|
|
|
+ String userId = resultContent.getContent();
|
|
|
UserAccount userAccount = userCountDao.findTopByUserId(userId);
|
|
|
if (ObjectUtils.isEmpty(userAccount)) {
|
|
|
return ResultContent.buildFail("用户不存在");
|