s
This commit is contained in:
parent
2d0e4a9b5a
commit
331b5d53f5
@ -234,7 +234,7 @@ public class BoardController {
|
|||||||
@ParameterCheck
|
@ParameterCheck
|
||||||
@PostMapping("/{boardId}/password")
|
@PostMapping("/{boardId}/password")
|
||||||
public ApiResponse<Boolean> checkBoardPassword(@ReqMap MapDto map) {
|
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 rawPassword = map.getString("LOCBRDPWD");
|
||||||
|
|
||||||
String storedHashedPassword = boardService.getBoardPassword(boardId);
|
String storedHashedPassword = boardService.getBoardPassword(boardId);
|
||||||
@ -259,7 +259,7 @@ public class BoardController {
|
|||||||
@ParameterCheck
|
@ParameterCheck
|
||||||
@PostMapping("/comment/{commentId}/password")
|
@PostMapping("/comment/{commentId}/password")
|
||||||
public ApiResponse<Boolean> checkCommentPassword(@ReqMap MapDto map) {
|
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 rawPassword = map.getString("LOCCMTPWD");
|
||||||
|
|
||||||
String storedHashedPassword = boardService.getCommentPassword(commentId);
|
String storedHashedPassword = boardService.getCommentPassword(commentId);
|
||||||
|
|||||||
@ -82,9 +82,8 @@ public class localbordService {
|
|||||||
public MapDto getBoardDetail(Long boardId) {
|
public MapDto getBoardDetail(Long boardId) {
|
||||||
incrementViewCount(boardId);
|
incrementViewCount(boardId);
|
||||||
MapDto boardDetail = boardMapper.selectBoardDetail(boardId);
|
MapDto boardDetail = boardMapper.selectBoardDetail(boardId);
|
||||||
if (boardDetail != null) {
|
enrichBoardDetail(boardDetail);
|
||||||
enrichBoardDetail(boardDetail);
|
|
||||||
}
|
|
||||||
return boardDetail;
|
return boardDetail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -67,10 +67,19 @@
|
|||||||
|
|
||||||
<!-- 게시물 상세정보 조회 -->
|
<!-- 게시물 상세정보 조회 -->
|
||||||
<select id="selectBoardDetail" resultType="io.company.localhost.common.dto.MapDto">
|
<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
|
SELECT
|
||||||
FROM localbord
|
b.LOCBRDSEQ AS id,
|
||||||
WHERE LOCBRDSEQ = #{boardId}
|
b.LOCBRDTTL AS title,
|
||||||
</select>
|
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 id="selectAttachments" resultType="io.company.localhost.common.dto.MapDto">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user