메인 게시판 로직 수정
This commit is contained in:
parent
dd31e08c4f
commit
dcb996f50b
@ -74,6 +74,19 @@ public class BoardController {
|
||||
@ParameterCheck
|
||||
@GetMapping("/notices")
|
||||
public ApiResponse<List<MapDto>> getNotices(@ReqMap MapDto map) {
|
||||
|
||||
// size를 안전하게 Integer로 변환하여 MapDto에 다시 넣기
|
||||
Object sizeObj = map.get("size");
|
||||
Integer size = null;
|
||||
|
||||
if (sizeObj instanceof String) {
|
||||
size = Integer.parseInt((String) sizeObj);
|
||||
}else {
|
||||
size = null;
|
||||
}
|
||||
|
||||
map.put("size", size);
|
||||
|
||||
return ApiResponse.ok(boardService.selectNotices(map));
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,10 @@
|
||||
FROM localbord b
|
||||
LEFT JOIN netmember m ON b.MEMBERSEQ = m.MEMBERSEQ
|
||||
WHERE LOCBRDTYP = '300103'
|
||||
ORDER BY LOCBRDUDT DESC
|
||||
ORDER BY LOCBRDUDT DESC
|
||||
<if test="size != null">
|
||||
LIMIT #{size}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 자유/익명 게시판 조회 (작성자 이름 포함) -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user