Skip to content

Commit

Permalink
[#25] fix: /notice/save requestDto
Browse files Browse the repository at this point in the history
  • Loading branch information
raae7742 committed Jun 4, 2022
1 parent 5f8427c commit 9d364e8
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.time.LocalDate;
import java.util.List;


Expand Down Expand Up @@ -51,18 +52,22 @@ public NoticeOCRDto executeOCR (@RequestPart MultipartFile uploadfile, HttpServl
@RequestMapping(value = "/notice/save", method = RequestMethod.POST)
public NoticeTitleListDto saveNotice(
@RequestPart(value = "uploadfile") MultipartFile uploadfile,
@RequestPart(value = "noticeRequestDto") NoticeRequestDto noticeRequestDto,
@RequestPart(value = "title") String title,
@RequestPart(value = "date") String date,
@RequestPart(value = "korean") String korean,
@RequestPart(value = "fullText") String fullText,
@RequestPart(value = "cid") String cid,
HttpServletRequest request) throws IOException {
/*
LocalDate date = LocalDate.parse(stringdate);
request.setCharacterEncoding("utf-8");

NoticeRequestDto noticeRequestDto = NoticeRequestDto.builder()
.title(title)
.date(date)
.date(LocalDate.parse(date))
.korean(korean)
.fullText(fullText)
.cid(Long.parseLong(cid))
.build();

*/
NoticeTitleListDto notice_title = noticeService.saveNotice(uploadfile, noticeRequestDto, request); //notice 저장
return notice_title;
}
Expand Down

0 comments on commit 9d364e8

Please sign in to comment.