feat : 간판다움 문의하기 파일첨부 확인 로직 추가

This commit is contained in:
hylee 2023-10-23 18:05:44 +09:00
parent ee99b060b0
commit 719fd07af9

View File

@ -47,17 +47,21 @@ public class GdServiceImpl implements GdService {
log.info("gdVO: [{}]", gdVO.toString());
log.info("gdVO: [{}]", gdVO.getFileInfo().get(0).getOriginalFilename());
// log.info("gdVO: [{}]", gdVO.getFileInfo().get(0).getOriginalFilename());
MultipartFile multipartFile = gdVO.getFileInfo().get(0);
File p_file = null;
String fileNm = "";
// File p_file = new File(multipartFile.getOriginalFilename());
// multipartFile.transferTo(p_file);
// File p_file = multipartFile.transferTo(p_file);
File p_file = getFile(gdVO, multipartFile);
if(gdVO.getFileInfo() == null)
{
p_file = null;
fileNm = null;
}else{
MultipartFile multipartFile = gdVO.getFileInfo().get(0);
p_file = getFile(gdVO, multipartFile);
fileNm = p_file.getName();
}
String returnMsg = "문의해 주셔서 감사합니다.\n빠른 시일 내에 답변해 드리겠습니다.";
HttpStatus status = HttpStatus.OK;
@ -94,7 +98,7 @@ public class GdServiceImpl implements GdService {
.title(mailTitle)
.contents(emailContent)
.fileInfo(p_file)
.atch_file_name(p_file.getName())
.atch_file_name(fileNm)
.send_to(GANPANDAUP_RECEIVER_EMAIL)
.send_from("noreply@munjaon.co.kr")
.build()