|
@@ -3,17 +3,21 @@ package com.zhongshu.card.server.core.controller.user;
|
|
|
import com.github.microservice.auth.security.annotations.ResourceAuth;
|
|
import com.github.microservice.auth.security.annotations.ResourceAuth;
|
|
|
import com.github.microservice.auth.security.type.AuthType;
|
|
import com.github.microservice.auth.security.type.AuthType;
|
|
|
import com.github.microservice.net.ResultContent;
|
|
import com.github.microservice.net.ResultContent;
|
|
|
|
|
+import com.zhongshu.card.client.model.base.ProjectOidParam;
|
|
|
import com.zhongshu.card.client.model.forgotPassword.ForgotPasswordParam;
|
|
import com.zhongshu.card.client.model.forgotPassword.ForgotPasswordParam;
|
|
|
import com.zhongshu.card.client.model.forgotPassword.ValidateUserModel;
|
|
import com.zhongshu.card.client.model.forgotPassword.ValidateUserModel;
|
|
|
import com.zhongshu.card.client.model.forgotPassword.ValidateUserParam;
|
|
import com.zhongshu.card.client.model.forgotPassword.ValidateUserParam;
|
|
|
import com.zhongshu.card.server.core.service.user.ForgotPassWordService;
|
|
import com.zhongshu.card.server.core.service.user.ForgotPassWordService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
+import jakarta.servlet.http.HttpServletRequest;
|
|
|
|
|
+import jakarta.servlet.http.HttpServletResponse;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
+import org.springframework.http.MediaType;
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
+
|
|
|
|
|
+import java.io.IOException;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
@@ -42,6 +46,18 @@ public class ForgotPassWordController {
|
|
|
return forgotPassWordService.verifyUserExitByFace(param);
|
|
return forgotPassWordService.verifyUserExitByFace(param);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
|
|
+ @RequestMapping(value = "verifyUserExitByImage", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, method = RequestMethod.POST)
|
|
|
|
|
+ @Operation(summary = "用人脸图片判断用户是否存在", description = "用人脸图片判断用户是否存在")
|
|
|
|
|
+ public ResultContent verifyUserExitByImage(
|
|
|
|
|
+ HttpServletRequest request, HttpServletResponse response,
|
|
|
|
|
+ @RequestPart("file") MultipartFile file, ProjectOidParam param) throws IOException {
|
|
|
|
|
+ if (file == null || file.isEmpty()) {
|
|
|
|
|
+ return ResultContent.buildFail("文件不能为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ return forgotPassWordService.verifyUserExitByImage(file);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
|
@Operation(summary = "重置密码", description = "验证用户")
|
|
@Operation(summary = "重置密码", description = "验证用户")
|
|
|
@RequestMapping(value = {"resetPassword"}, method = {RequestMethod.POST})
|
|
@RequestMapping(value = {"resetPassword"}, method = {RequestMethod.POST})
|