feat: 게시판 추천/비추천 + 작성자 아바타 + 추천자 + 활동 포인트
- 작성자 아바타: post/comment 조회 시 member JOIN(google_picture/profile_image),
목록·상세·댓글 응답에 노출
- 추천/비추천: post_vote/comment_vote 테이블 + 토글 API
(POST /board/posts|comments/{id}/vote), 게시글/댓글 응답에 up/down/myVote
- 추천자 목록: GET /board/posts/{id}/recommenders + PostDetail.recommenders
- 포인트: member.points + point_history. 글/댓글 작성 시 10P, 하루 3회 한도(합산).
PointService, GET /auth/points, MemberResponse.points 노출
- @MapperScan 에 point.mapper 추가, AuthController WebMvc 테스트 MockBean 보강
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
98f5f51112
commit
ef9dace1df
@@ -35,9 +35,12 @@
|
||||
|
||||
<select id="findPage" resultType="com.sb.web.board.dto.PostSummary">
|
||||
SELECT
|
||||
p.id, p.title, p.author_name, p.view_count, p.blocked, p.notice, p.created_at,
|
||||
(SELECT COUNT(*) FROM comment c WHERE c.post_id = p.id) AS comment_count
|
||||
p.id, p.title, p.author_id, p.author_name, p.view_count, p.blocked, p.notice, p.created_at,
|
||||
m.google_picture AS author_google_picture, m.profile_image AS author_profile_image,
|
||||
(SELECT COUNT(*) FROM comment c WHERE c.post_id = p.id) AS comment_count,
|
||||
(SELECT COUNT(*) FROM post_vote v WHERE v.post_id = p.id AND v.vote_type = 'UP') AS up_count
|
||||
FROM post p
|
||||
LEFT JOIN member m ON m.id = p.author_id
|
||||
<include refid="filter"/>
|
||||
ORDER BY p.notice DESC, p.id DESC
|
||||
LIMIT #{size} OFFSET #{offset}
|
||||
@@ -50,10 +53,12 @@
|
||||
</select>
|
||||
|
||||
<select id="findById" parameterType="long" resultType="com.sb.web.board.domain.Post">
|
||||
SELECT id, title, content, author_id, author_name, view_count,
|
||||
blocked, block_reason, notice, category, created_at, updated_at
|
||||
FROM post
|
||||
WHERE id = #{id}
|
||||
SELECT p.id, p.title, p.content, p.author_id, p.author_name, p.view_count,
|
||||
p.blocked, p.block_reason, p.notice, p.category, p.created_at, p.updated_at,
|
||||
m.google_picture AS author_google_picture, m.profile_image AS author_profile_image
|
||||
FROM post p
|
||||
LEFT JOIN member m ON m.id = p.author_id
|
||||
WHERE p.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.sb.web.board.domain.Post"
|
||||
|
||||
Reference in New Issue
Block a user