diff --git a/src/main/java/com/zcloud/controller/eduApp/AppUsersCacheController.java b/src/main/java/com/zcloud/controller/eduApp/AppUsersCacheController.java index 6160faa..e1074b2 100644 --- a/src/main/java/com/zcloud/controller/eduApp/AppUsersCacheController.java +++ b/src/main/java/com/zcloud/controller/eduApp/AppUsersCacheController.java @@ -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()); diff --git a/src/main/java/com/zcloud/util/Base64Util.java b/src/main/java/com/zcloud/util/Base64Util.java index d2f3980..1af8ab1 100644 --- a/src/main/java/com/zcloud/util/Base64Util.java +++ b/src/main/java/com/zcloud/util/Base64Util.java @@ -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; } }