-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feat #95 회원탈퇴 API 구현
- Loading branch information
Showing
7 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/gachtaxi/domain/members/entity/enums/UserStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package com.gachtaxi.domain.members.entity.enums; | ||
|
||
public enum UserStatus { | ||
ACTIVE, INACTIVE | ||
ACTIVE, INACTIVE, DELETED | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/com/gachtaxi/domain/members/service/MemberDeleteService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.gachtaxi.domain.members.service; | ||
|
||
import com.gachtaxi.domain.members.entity.Members; | ||
import com.gachtaxi.domain.members.exception.MemberNotFoundException; | ||
import com.gachtaxi.domain.members.repository.MemberRepository; | ||
import jakarta.transaction.Transactional; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class MemberDeleteService { | ||
|
||
private final MemberRepository memberRepository; | ||
|
||
/* | ||
todo 채팅 메시지 수정 PR 머지 되면 (알수없음)으로 바꾸고 프사 삭제하기 | ||
*/ | ||
@Transactional | ||
public void softDelete(Long memberId) { | ||
Members member = memberRepository.findById(memberId) | ||
.orElseThrow(MemberNotFoundException::new); | ||
|
||
member.delete(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters