From 23157eec4bae3b6861bd84d4acf3aa36eddfc46f Mon Sep 17 00:00:00 2001 From: wpdbsx Date: Tue, 26 Sep 2023 07:18:04 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EB=A9=94=EC=9D=BC=20=EB=B3=B4?= =?UTF-8?q?=EB=82=B4=EA=B8=B0=20=ED=8C=8C=EC=9D=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bside/BSIDE/user/service/EmailServiceImpl.java | 4 ++-- src/main/java/com/bside/BSIDE/user/web/EmailController.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/bside/BSIDE/user/service/EmailServiceImpl.java b/src/main/java/com/bside/BSIDE/user/service/EmailServiceImpl.java index 4c6e621..66ae158 100644 --- a/src/main/java/com/bside/BSIDE/user/service/EmailServiceImpl.java +++ b/src/main/java/com/bside/BSIDE/user/service/EmailServiceImpl.java @@ -260,14 +260,14 @@ public void sendByMonthBlob(String email, String sendEmail, String date, Multipa String fileName = dateArr[0] + "년 " + Integer.parseInt(dateArr[1]) + "월 " + "월간고밍_" + userdto.getUsrNm() + ".png"; helper.addAttachment(fileName, imageData0, "image/png"); - if(!imageData1.isEmpty()) { + if(imageData1 != null) { System.out.println("imageData1 있음"); String fileName1 = dateArr[0] + "년 " + Integer.parseInt(dateArr[1]) + "월 " + "월간고밍_" + userdto.getUsrNm() + "[1].png"; helper.addAttachment(fileName1, imageData1, "image/png"); } - if(!imageData2.isEmpty()) { + if(imageData2 != null) { System.out.println("imageData2 있음"); String fileName2 = dateArr[0] + "년 " + Integer.parseInt(dateArr[1]) + "월 " + "월간고밍_" + userdto.getUsrNm() diff --git a/src/main/java/com/bside/BSIDE/user/web/EmailController.java b/src/main/java/com/bside/BSIDE/user/web/EmailController.java index 195e14b..2ebc747 100644 --- a/src/main/java/com/bside/BSIDE/user/web/EmailController.java +++ b/src/main/java/com/bside/BSIDE/user/web/EmailController.java @@ -68,11 +68,11 @@ public void sendByMonth(@RequestBody EmailDto param) throws Exception { } @PostMapping("/sendByMonthBlob") @Operation(summary = "월간 고밍이미지 이메일로 전송") - public void sendByMonth(@RequestParam String email, @RequestParam String sendEmail, @RequestParam String date ,@RequestParam MultipartFile imageData0,@RequestParam MultipartFile imageData1,@RequestParam MultipartFile imageData2) throws Exception { + public void sendByMonth(@RequestParam String email, @RequestParam String sendEmail, @RequestParam String date ,@RequestParam(required=false) MultipartFile imageData0,@RequestParam(required=false) MultipartFile imageData1 ,@RequestParam(required=false) MultipartFile imageData2 ) throws Exception { System.out.println(email+"+ @#@#@##@#@#@#!@$@$!@$email"); System.out.println(sendEmail+"+ @#@#@##@#@#@#!@$@$!@sendEmail"); System.out.println(imageData0+ "+ @#@#@##@#@#@#!@$@$!@date"); - + System.out.println(imageData1 + "뭐냐 데이터"); emailService.sendByMonthBlob(email,sendEmail,date,imageData0,imageData1,imageData2); }