From 865b832105d02170fbcce5100b584bb377ab8869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E6=B3=A2?= Date: Tue, 1 Apr 2025 20:11:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=B8=8B=E4=B8=8B3333?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 6 +++--- .../controller/FaceInfoManagerController.java | 22 ++++------------------ 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/pom.xml b/pom.xml index 25b08a2..178b505 100644 --- a/pom.xml +++ b/pom.xml @@ -222,7 +222,7 @@ 13307 log4j2-dev.xml org.apache.ibatis.logging.stdout.StdOutImpl - 3MB + 5MB 5MB 8080 @@ -240,7 +240,7 @@ 47.97.80.223 13307 log4j2 - 3MB + 5MB 5MB org.apache.ibatis.logging.stdout.StdOutImpl @@ -257,7 +257,7 @@ jdbc:mysql://${jdbcIp}:${jdbcPort}/edu-train-dev?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Hongkong&useSSL=false&allowMultiQueries=true 47.97.80.223 13307 - 3MB + 5MB 5MB log4j2.xml org.apache.ibatis.logging.log4j2.Log4j2Impl diff --git a/src/main/java/com/face/attachment/controller/FaceInfoManagerController.java b/src/main/java/com/face/attachment/controller/FaceInfoManagerController.java index 1d39aa2..b9dd8f5 100644 --- a/src/main/java/com/face/attachment/controller/FaceInfoManagerController.java +++ b/src/main/java/com/face/attachment/controller/FaceInfoManagerController.java @@ -131,8 +131,8 @@ public class FaceInfoManagerController extends ManageBaseController { @RequestParam(required = true, value = "faceId") String faceId ) throws Exception { - if(null!=file && file.getSize()> 3145728L){ - throw SystemExceptionUtils.buildBusinessException("上传图片请不要超过3MB!"); + if(null!=file && file.getSize()> 3566353L){ + throw SystemExceptionUtils.buildBusinessException("上传图片请不要超过3.3MB!"); } String imgUrl=""; FuseFaceResponse resp=null; @@ -164,7 +164,7 @@ public class FaceInfoManagerController extends ManageBaseController { // Path imageFile = Paths.get("F:\\体验腾讯人脸融合-素材\\222.jpg"); byte[] imageBytes = file.getBytes(); - +/* // long timeStamp1 = System.currentTimeMillis(); Path uploadPath = Paths.get(fileUploadProperties.getUploadDir()).toAbsolutePath().normalize(); @@ -181,27 +181,13 @@ public class FaceInfoManagerController extends ManageBaseController { //将文件存储在服务器的磁盘目录 file.transferTo(new File(filePath.toString())); -/* // 构建文件的访问URL(可选) - String fileDownloadUri = ServletUriComponentsBuilder.fromCurrentContextPath() - .path("/download/") + */ - - -/* - InputStream imageInputStream = new FileInputStream("F:\\体验腾讯人脸融合-素材\\111.jpg"); - byte[] imageBytes = new byte[imageInputStream.available()]; - imageInputStream.read(imageBytes); - imageInputStream.close();*/ - String imgBase = Base64.getEncoder().encodeToString(imageBytes); - - - - //{"MaterialInfos":[{"MaterialId":"mt_1895077021871144960","MaterialStatus":21,"CreateTime":"2025-02-27 19:42:25","UpdateTime":"2025-02-27 19:42:25","MaterialFaceList":[{"FaceId":"mt_1895077021871144960_1","FaceInfo":{"X":159,"Y":360,"Width":49,"Height":64}}],"MaterialName":"微信图片_20250227194033.png","AuditResult":""},{"MaterialId":"mt_1895077032491122688","MaterialStatus":21,"CreateTime":"2025-02-27 19:42:28","UpdateTime":"2025-02-27 19:42:28","MaterialFaceList":[{"FaceId":"mt_1895077032491122688_1","FaceInfo":{"X":373,"Y":362,"Width":49,"Height":69}}],"MaterialName":"微信图片_20250227194036.png","AuditResult":""},{"MaterialId":"mt_1895077041827643392","MaterialStatus":21,"CreateTime":"2025-02-27 19:42:30","UpdateTime":"2025-02-27 19:42:30","MaterialFaceList":[{"FaceId":"mt_1895077041827643392_1","FaceInfo":{"X":242,"Y":401,"Width":57,"Height":70}}],"MaterialName":"微信图片_20250227194038.png","AuditResult":""}],"Count":3,"RequestId":"3585e437-6a27-4dc9-b59b-11f66ca4382f"}