s
This commit is contained in:
parent
2d0e4a9b5a
commit
331b5d53f5
@ -234,7 +234,7 @@ public class BoardController {
|
||||
@ParameterCheck
|
||||
@PostMapping("/{boardId}/password")
|
||||
public ApiResponse<Boolean> checkBoardPassword(@ReqMap MapDto map) {
|
||||
int boardId = (int) map.get("LOCBRDSEQ");
|
||||
int boardId = Integer.parseInt(map.getString("LOCBRDSEQ"));
|
||||
String rawPassword = map.getString("LOCBRDPWD");
|
||||
|
||||
String storedHashedPassword = boardService.getBoardPassword(boardId);
|
||||
@ -259,7 +259,7 @@ public class BoardController {
|
||||
@ParameterCheck
|
||||
@PostMapping("/comment/{commentId}/password")
|
||||
public ApiResponse<Boolean> checkCommentPassword(@ReqMap MapDto map) {
|
||||
int commentId = (int) map.get("LOCCMTSEQ");
|
||||
int commentId = Integer.parseInt(map.getString("LOCCMTSEQ"));
|
||||
String rawPassword = map.getString("LOCCMTPWD");
|
||||
|
||||
String storedHashedPassword = boardService.getCommentPassword(commentId);
|
||||
|
||||
@ -82,9 +82,8 @@ public class localbordService {
|
||||
public MapDto getBoardDetail(Long boardId) {
|
||||
incrementViewCount(boardId);
|
||||
MapDto boardDetail = boardMapper.selectBoardDetail(boardId);
|
||||
if (boardDetail != null) {
|
||||
enrichBoardDetail(boardDetail);
|
||||
}
|
||||
|
||||
return boardDetail;
|
||||
}
|
||||
|
||||
|
||||
@ -67,11 +67,20 @@
|
||||
|
||||
<!-- 게시물 상세정보 조회 -->
|
||||
<select id="selectBoardDetail" resultType="io.company.localhost.common.dto.MapDto">
|
||||
SELECT LOCBRDSEQ AS id, LOCBRDTTL AS title, LOCBRDCON AS content, LOCBRDUDT AS date, LOCBRDTYP AS type, LOCBRDCNT AS cnt
|
||||
FROM localbord
|
||||
WHERE LOCBRDSEQ = #{boardId}
|
||||
SELECT
|
||||
b.LOCBRDSEQ AS id,
|
||||
b.LOCBRDTTL AS title,
|
||||
b.LOCBRDCON AS content,
|
||||
b.LOCBRDUDT AS date,
|
||||
b.LOCBRDTYP AS type,
|
||||
b.LOCBRDCNT AS cnt,
|
||||
m.MEMBERNAM AS author
|
||||
FROM localbord b
|
||||
LEFT JOIN netmember m ON b.MEMBERSEQ = m.MEMBERSEQ
|
||||
WHERE b.LOCBRDSEQ = #{boardId}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 첨부파일 목록 조회 -->
|
||||
<select id="selectAttachments" resultType="io.company.localhost.common.dto.MapDto">
|
||||
SELECT CMNFLESEQ AS id, CMNFLEORG AS originalName, CMNFLENAM AS fileName, CMNFLEPAT AS path,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user