Skip to content

Commit

Permalink
[FIX] 부모-자식 유저 타입 조회 로직 수정 #117
Browse files Browse the repository at this point in the history
  • Loading branch information
jun02160 committed Feb 10, 2024
1 parent 7c05eee commit 02b85b7
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ public static ParentchildRelation relation(String gender, String relationInfo, b

// 아들 | 딸 | 엄마 | 아빠 구분
public static String getUserType(ParentchildRelation relation, boolean isChild) {
if (relation.childGender.equals("여자")) {
if (isChild) return "딸";
else return "엄마";
if (isChild) {
return relation.childGender.equals("남자") ? "아들" : "딸";
} else {
if (isChild) return "아들";
else return "아빠";
return relation.parentGender.equals("남자") ? "아빠" : "엄마";
}
}

Expand Down

0 comments on commit 02b85b7

Please sign in to comment.