forked from integrated_whb/integrated_whb
人脸识别处理
parent
60deab8936
commit
07b6b55409
|
@ -192,6 +192,9 @@ public class AppUsersCacheController extends BaseController {
|
|||
}
|
||||
MultipartFile coverpath = ImageUtil.getMultipartFile(Const.HTTPFILEURL + user.getString("COVERPATH"));
|
||||
String USERAVATARURL = Base64Util.getBase64String(coverpath);
|
||||
System.out.println("---------------------------------------------------");
|
||||
System.out.println(pd.getString("USERAVATARURL"));
|
||||
System.out.println("---------------------------------------------------");
|
||||
try {
|
||||
String confidence = FaceUtil.compareFace(pd.getString("USERAVATARURL"), USERAVATARURL);
|
||||
|
||||
|
@ -221,8 +224,10 @@ public class AppUsersCacheController extends BaseController {
|
|||
initPageDataUtil.initSaveApp(faceImg, pd.getString("USER_ID"));
|
||||
// faceImg.put("IS_SUCCESS", 0);
|
||||
faceImgLogService.save(faceImg);
|
||||
|
||||
map.put("result", errInfo);
|
||||
}
|
||||
|
||||
return map;
|
||||
} catch (Exception e) {
|
||||
System.out.println("----------" + e.getMessage());
|
||||
|
|
|
@ -11,7 +11,7 @@ public class Base64Util {
|
|||
String baseStr = null;
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
baseStr = encoder.encode(multiPartFile.getBytes());
|
||||
baseStr = baseStr.replaceAll("\r\n", "");
|
||||
baseStr = baseStr.replaceAll("\\r|\\n", "");
|
||||
return baseStr;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue