Browse Source

회원탈퇴 Repository 조건 변경

feature/auth
qkr7828(박재우) 2 years ago
parent
commit
6b4cc01b8c
  1. 8
      src/main/java/com/palnet/biz/api/acnt/cstmr/service/AcntCstmrService.java
  2. 2
      src/main/java/com/palnet/biz/jpa/repository/pty/PtyCstmrGroupRepository.java

8
src/main/java/com/palnet/biz/api/acnt/cstmr/service/AcntCstmrService.java

@ -283,10 +283,12 @@ public class AcntCstmrService {
groupEntity.setUseYn("N"); groupEntity.setUseYn("N");
ptyGroupBasRepository.save(groupEntity); ptyGroupBasRepository.save(groupEntity);
} }
PtyCstmrGroup cstmrEntity = ptyCstmrGroupRepository.changeGroupJoinYn(group.getGroupId()); List<PtyCstmrGroup> cstmrEntity = ptyCstmrGroupRepository.changeGroupJoinYn(group.getGroupId());
if(!(cstmrEntity == null)) { if(!(cstmrEntity == null)) {
cstmrEntity.setJoinYn("N"); for(PtyCstmrGroup cstmr : cstmrEntity) {
ptyCstmrGroupRepository.save(cstmrEntity); cstmr.setJoinYn("N");
ptyCstmrGroupRepository.save(cstmr);
}
} }
} }
List<PtyCstmrGroup> AprvlEntity = ptyCstmrGroupRepository.changeGroupAprvlYn(cstmrSno); List<PtyCstmrGroup> AprvlEntity = ptyCstmrGroupRepository.changeGroupAprvlYn(cstmrSno);

2
src/main/java/com/palnet/biz/jpa/repository/pty/PtyCstmrGroupRepository.java

@ -20,7 +20,7 @@ public interface PtyCstmrGroupRepository extends JpaRepository<PtyCstmrGroup, In
@Query("select p from PtyCstmrGroup p " + @Query("select p from PtyCstmrGroup p " +
"where p.groupId = :groupId " ) "where p.groupId = :groupId " )
PtyCstmrGroup changeGroupJoinYn(@Param("groupId") String groupId); List<PtyCstmrGroup> changeGroupJoinYn(@Param("groupId") String groupId);
@Query("select p from PtyCstmrGroup p " + @Query("select p from PtyCstmrGroup p " +
"where p.cstmrSno = :cstmrSno " ) "where p.cstmrSno = :cstmrSno " )

Loading…
Cancel
Save