Files
sb-backend/src/main/java/com/sb/web/board/mapper/PostMapper.java
T
ByungCheol b4344f5270
CI / build (push) Failing after 15m11s
feat: 게시판 인기글/블라인드/자기글 추천차단 + 프로필 전역 동기화
- GET /api/auth/profile: 아바타·포인트 포함 전체 프로필(재로그인 없이 최신화)
- 자기 글/댓글 추천·비추천 차단(400)
- 인기 글: 등록 1일 이내 + 추천 50건 이상이면 목록 상단 최대 3건 노출(hot)
- 인기 댓글: 동일 조건으로 댓글 목록 상단 정렬(hot)
- PostSummary 에 downCount 추가(비추천 20+ 블라인드 판정용)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 13:21:19 +09:00

48 lines
1.6 KiB
Java

package com.sb.web.board.mapper;
import com.sb.web.board.domain.Post;
import com.sb.web.board.dto.PostSummary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface PostMapper {
List<PostSummary> findPage(@Param("offset") int offset,
@Param("size") int size,
@Param("category") String category,
@Param("tag") String tag,
@Param("keyword") String keyword,
@Param("searchType") String searchType);
long countPage(@Param("category") String category,
@Param("tag") String tag,
@Param("keyword") String keyword,
@Param("searchType") String searchType);
/** 인기 글(추천 minUp 이상 & hours 시간 이내) 상단 노출용 — 추천 많은 순 limit 건 */
List<PostSummary> findHotPosts(@Param("category") String category,
@Param("hours") int hours,
@Param("minUp") int minUp,
@Param("limit") int limit);
Post findById(@Param("id") Long id);
int insert(Post post);
int update(Post post);
int delete(@Param("id") Long id);
int increaseViewCount(@Param("id") Long id);
int updateBlocked(@Param("id") Long id,
@Param("blocked") boolean blocked,
@Param("blockReason") String blockReason);
int updateNotice(@Param("id") Long id,
@Param("notice") boolean notice);
}