Skip to content

Commit

Permalink
이메일 보내기 파일 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
wpdbsx committed Sep 25, 2023
1 parent c4876a3 commit 23157ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/bside/BSIDE/user/web/EmailController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 23157ee

Please sign in to comment.