feat: 회원 탈퇴(자기 계정 삭제) — Play 정책 대응

- DELETE /api/auth/me: 본인 계정과 모든 데이터 영구 삭제
- 게시판(글/댓글/추천/이미지)·가계부 전체·포인트·결제기록·세션 → 회원 순 삭제
- WithdrawMapper(게시판/포인트/결제/세션) + BackupMapper(가계부) 재사용
- AuthServiceTest 생성자 보강

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-28 16:56:23 +09:00
co-authored by Claude Opus 4.8
parent be15f5b85d
commit 8142b8b518
5 changed files with 159 additions and 1 deletions
@@ -0,0 +1,34 @@
package com.sb.web.auth.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 회원 탈퇴 시 가계부(BackupMapper) 외의 사용자 데이터 정리 — 게시판/포인트/결제/세션.
*/
@Mapper
public interface WithdrawMapper {
// 게시판 — 내가 누른 표
int deletePostVotesByMember(@Param("memberId") Long memberId);
int deleteCommentVotesByMember(@Param("memberId") Long memberId);
// 게시판 — 내 글에 달린 것들 (남이 단 댓글/표 포함)
int deleteCommentVotesOnMyPosts(@Param("memberId") Long memberId);
int deletePostVotesOnMyPosts(@Param("memberId") Long memberId);
int deletePostTagsOnMyPosts(@Param("memberId") Long memberId);
int deleteCommentsOnMyPosts(@Param("memberId") Long memberId);
// 게시판 — 내 댓글(남의 글에 단 것)과 그 표
int deleteCommentVotesOnMyComments(@Param("memberId") Long memberId);
int deleteCommentsByAuthor(@Param("memberId") Long memberId);
// 게시판 — 내 글
int deletePostsByAuthor(@Param("memberId") Long memberId);
int deleteBoardImagesByMember(@Param("memberId") Long memberId);
// 포인트 / 결제 / 세션
int deletePointHistory(@Param("memberId") Long memberId);
int deleteIapPurchases(@Param("memberId") Long memberId);
int deleteAuthSessions(@Param("memberId") Long memberId);
}