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:
ByungCheol
2026-06-28 12:27:35 +09:00
co-authored by Claude Opus 4.8
parent 98f5f51112
commit ef9dace1df
27 changed files with 489 additions and 25 deletions
@@ -29,6 +29,7 @@ public class AuthController {
private final AuthService authService;
private final com.sb.web.admin.service.AppSettingService appSettingService;
private final com.sb.web.point.PointService pointService;
/** 회원가입 허용 여부 (비보호) — 프론트가 가입 진입 전에 차단 표시용 */
@GetMapping("/signup-enabled")
@@ -79,6 +80,13 @@ public class AuthController {
return current;
}
/** 현재 사용자 활동 포인트 (최신값 — 게시판 작성으로 수시 변동) */
@GetMapping("/points")
public java.util.Map<String, Long> points(
@RequestAttribute(AuthInterceptor.CURRENT_MEMBER) SessionUser current) {
return java.util.Map.of("points", pointService.getPoints(current.getId()));
}
@PutMapping("/password")
public ResponseEntity<Void> changePassword(
@Valid @RequestBody PasswordChangeRequest req,
@@ -30,6 +30,7 @@ public class Member implements Serializable {
private String profileImage; // 사용자 지정 프로필 이미지(data URL). 우선순위: profileImage > googlePicture > 이니셜
private String role; // USER / ADMIN
private String plan; // FREE / PREMIUM (멤버십)
private Long points; // 활동 포인트 (게시판 글/댓글 작성 보상)
private String status; // ACTIVE / SUSPENDED / WITHDRAWN
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
@@ -18,6 +18,7 @@ public class MemberResponse {
private String provider;
private String role;
private String plan; // FREE / PREMIUM
private Long points; // 활동 포인트
private String googlePicture; // 구글 아바타 URL
private String profileImage; // 사용자 지정 프로필 이미지(data URL)
@@ -30,6 +31,7 @@ public class MemberResponse {
.provider(m.getProvider())
.role(m.getRole())
.plan(m.getPlan())
.points(m.getPoints())
.googlePicture(m.getGooglePicture())
.profileImage(m.getProfileImage())
.build();