update
This commit is contained in:
parent
7b1edd9d07
commit
72497c9ecf
@ -70,13 +70,13 @@ public class AttachmentController {
|
|||||||
if (config1==null){
|
if (config1==null){
|
||||||
bytes1= "没有该Config!".getBytes();
|
bytes1= "没有该Config!".getBytes();
|
||||||
headers.setContentType(MediaType.APPLICATION_JSON);
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||||
return new ResponseEntity<byte[]>(bytes1, headers, HttpStatus.NOT_FOUND);
|
return new ResponseEntity<byte[]>(bytes1, headers, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
Attachment attachment =attachmentService.selectAttachment(Long.valueOf(config1.getValue()));
|
Attachment attachment =attachmentService.selectAttachment(Long.valueOf(config1.getValue()));
|
||||||
if (attachment==null){
|
if (attachment==null){
|
||||||
bytes1= "没有该Attachment!".getBytes();
|
bytes1= "没有该Attachment!".getBytes();
|
||||||
headers.setContentType(MediaType.APPLICATION_JSON);
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||||
return new ResponseEntity<byte[]>(bytes1, headers, HttpStatus.NOT_FOUND);
|
return new ResponseEntity<byte[]>(bytes1, headers, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
String fileUrl=attachment.getPath()+attachment.getFileName()+attachment.getSuffix();
|
String fileUrl=attachment.getPath()+attachment.getFileName()+attachment.getSuffix();
|
||||||
out.println(fileUrl);
|
out.println(fileUrl);
|
||||||
|
Loading…
Reference in New Issue
Block a user