Skip to content

Commit

Permalink
Merge pull request #157 from Soongsil-CoffeeChat/ref/#156
Browse files Browse the repository at this point in the history
[REFACTOR] 개인정보 조회 DTO 필드명 변경 및 추가
  • Loading branch information
KimKyoHwee authored Sep 24, 2024
2 parents 9239ec1 + 8b05631 commit 469709a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public class UserGetUpdateDto {
private String role;
private PartEnum part;
private ClubEnum club;
private String image;
private String picture;
private Long mentorId;

public static UserGetUpdateDto toDto(User user) {
return UserGetUpdateDto.builder()
Expand All @@ -28,13 +29,14 @@ public static UserGetUpdateDto toDto(User user) {
}

@QueryProjection
public UserGetUpdateDto(String name, String email, String phoneNum, String role, PartEnum part, ClubEnum club, String image){
public UserGetUpdateDto(String name, String email, String phoneNum, String role, PartEnum part, ClubEnum club, String image, Long mentorId){
this.name=name;
this.email=email;
this.phoneNum=phoneNum;
this.role=role;
this.part=part;
this.club=club;
this.image=image;
this.picture=image;
this.mentorId=mentorId;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public UserGetUpdateDto findUserInfoByUsername(String username) {
roleExpression,
mentor.part.coalesce(mentee.part), // 멘토의 part가 없으면 멘티의 part 사용
mentor.club, // 멘토의 club, 멘티인 경우 null
user.picture
user.picture,
mentor.id
))
.from(user)
.leftJoin(user.mentor, mentor)
Expand Down

0 comments on commit 469709a

Please sign in to comment.