-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from 0702Yoon/main
멤버 상세 조회, 멤버 이름 변경 등 기능 구현
- Loading branch information
Showing
13 changed files
with
112 additions
and
39 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
7 changes: 7 additions & 0 deletions
7
...main/java/com/example/bigbrotherbe/domain/member/dto/request/MemberInfoChangeRequest.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,7 @@ | ||
package com.example.bigbrotherbe.domain.member.dto.request; | ||
|
||
|
||
|
||
public record MemberInfoChangeRequest(String userName) { | ||
|
||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,13 +20,15 @@ public class InitialDataLoader { | |
public CommandLineRunner loadData(MemberRepository memberRepository, AffiliationRepository affiliationRepository, | ||
AffiliationMemberRepository affiliationMemberRepository, PasswordEncoder passwordEncoder) { | ||
return args -> { | ||
if (affiliationRepository.findByAffiliationName("응용소프트웨어전공").isEmpty()) { | ||
affiliationRepository.save(Affiliation.builder().affiliation_id(1L).affiliationName("응용소프트웨어전공").councilType("단과대").build()); | ||
if (affiliationRepository.findByName("응용소프트웨어전공").isEmpty()) { | ||
affiliationRepository.save(Affiliation.builder().affiliation_id(1L).name("응용소프트웨어전공").councilType("학과").build()); | ||
} | ||
|
||
if (affiliationRepository.findByAffiliationName("디지털콘텐츠디자인학과").isEmpty()) { | ||
affiliationRepository.save(Affiliation.builder().affiliation_id(2L).affiliationName("디지털콘텐츠디자인학과").councilType("학과").build()); | ||
|
||
if (affiliationRepository.findByName("디지털콘텐츠디자인학과").isEmpty()) { | ||
affiliationRepository.save(Affiliation.builder().affiliation_id(2L).name("디지털콘텐츠디자인학과").councilType("학과").build()); | ||
} | ||
if (affiliationRepository.findByName("ICT융합대학").isEmpty()) { | ||
affiliationRepository.save(Affiliation.builder().affiliation_id(3L).name("ICT융합대학").councilType("단과대").build()); | ||
} | ||
// Check if an admin user already exists | ||
if (memberRepository.findByUsername("admin").isEmpty()) { | ||
|
@@ -36,7 +38,7 @@ public CommandLineRunner loadData(MemberRepository memberRepository, Affiliation | |
admin.setEmail("[email protected]"); | ||
admin.setUsername("admin"); | ||
memberRepository.save(admin); | ||
Affiliation affiliation = affiliationRepository.findByAffiliationName("응용소프트웨어전공") | ||
Affiliation affiliation = affiliationRepository.findByName("응용소프트웨어전공") | ||
.orElseThrow(() -> new IllegalArgumentException("잘못된 소속 이름입니다.")); | ||
|
||
// AffiliationMember 엔티티 생성 | ||
|
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