From 72497c9ecf00ee896ab5dd3a13d776d0e3747f16 Mon Sep 17 00:00:00 2001 From: Qing Date: Wed, 27 Dec 2023 23:59:13 +0800 Subject: [PATCH] update --- .../java/com/lovenav/controller/AttachmentController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/lovenav/controller/AttachmentController.java b/src/main/java/com/lovenav/controller/AttachmentController.java index f12239a..b398620 100644 --- a/src/main/java/com/lovenav/controller/AttachmentController.java +++ b/src/main/java/com/lovenav/controller/AttachmentController.java @@ -70,13 +70,13 @@ public class AttachmentController { if (config1==null){ bytes1= "没有该Config!".getBytes(); headers.setContentType(MediaType.APPLICATION_JSON); - return new ResponseEntity(bytes1, headers, HttpStatus.NOT_FOUND); + return new ResponseEntity(bytes1, headers, HttpStatus.OK); } Attachment attachment =attachmentService.selectAttachment(Long.valueOf(config1.getValue())); if (attachment==null){ bytes1= "没有该Attachment!".getBytes(); headers.setContentType(MediaType.APPLICATION_JSON); - return new ResponseEntity(bytes1, headers, HttpStatus.NOT_FOUND); + return new ResponseEntity(bytes1, headers, HttpStatus.OK); } String fileUrl=attachment.getPath()+attachment.getFileName()+attachment.getSuffix(); out.println(fileUrl);