|
|
@@ -20,6 +20,7 @@ import org.springframework.data.mongodb.core.query.Criteria;
|
|
|
import org.springframework.data.mongodb.core.query.Query;
|
|
|
import org.springframework.data.mongodb.gridfs.GridFsResource;
|
|
|
import org.springframework.data.mongodb.gridfs.GridFsTemplate;
|
|
|
+import org.springframework.security.crypto.password.PasswordEncoder;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
@@ -51,6 +52,8 @@ public class UserFaceServiceImpl implements UserFaceService {
|
|
|
|
|
|
@Value("${faceImage.height}")
|
|
|
private int height;
|
|
|
+ @Autowired
|
|
|
+ private PasswordEncoder passwordEncoder;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -143,19 +146,15 @@ public class UserFaceServiceImpl implements UserFaceService {
|
|
|
userFaceQueryModel.setUserFace(userFace);
|
|
|
userFaceBase64List.add(userFaceQueryModel);
|
|
|
}
|
|
|
-// gridFSFiles.forEach(gridFS -> {
|
|
|
-// // 读取文件内容转换为Base64
|
|
|
-// try {
|
|
|
-//
|
|
|
-// } catch (IOException e) {
|
|
|
-// log.error("gridFsFile转换Base64异常");
|
|
|
-// throw new RuntimeException(e);
|
|
|
-// }
|
|
|
-// });
|
|
|
}
|
|
|
return ResultContent.buildContent(userFaceBase64List);
|
|
|
}
|
|
|
|
|
|
+ public ResultContent<String> matches(String userFace){
|
|
|
+
|
|
|
+ return ResultContent.buildContent("userId");
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 将 InputStream 转换为 Base64 字符串
|
|
|
*
|