Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor : 전화번호 libphonenumber 적용 #328

Merged
merged 3 commits into from
Feb 9, 2023

Conversation

ImNM
Copy link
Member

@ImNM ImNM commented Feb 8, 2023

개요

작업사항

  • 카카오톡에서 넘겨주는 전화번호 형식은 libphonenumber 패키지를 사용한 형식입니다

  • 국제전화번호횽식

  • 공식 문서에도 위 모듈 참고하라고 적혀있더라고요

  • https://github.com/google/libphonenumber

PhoneNumberVo 만들었고
해당 vo로 리턴하면 JsonValue로 010-xxxx-xxxx 형식으로 내려줍니다.

{
  "success": true,
  "status": 200,
  "data": {
    "userId": 24,
    "userName": "ddd",
    "email": "asdfasdf@naver.com",
    "phoneNumber": "010-xxxx-xxxx",
    "profileImage": "http://k.kakaocdn.net/dn/QPtC7/btqX09yP4mb/asdfasdf/img_640x640.jpg",
    "createdAt": "2023-02-09T02:42:19"
  },
  "timeStamp": "2023-02-09T02:42:37.442277"
}

변경로직

  • 내용을 적어주세요.

@ImNM ImNM added For: Utils [이슈 대상] API, 모델, 뷰를 제외한 백엔드 로직 Type: Refactor [이슈 목적] 프로덕션 코드 리팩토링 labels Feb 8, 2023
@ImNM ImNM self-assigned this Feb 8, 2023
Comment on lines +54 to +59

/** 01000000000 format */
public String getNaverSmsToNumber() throws NumberParseException {
String nationalFormat = this.getNationalFormat();
return nationalFormat.replaceAll("-", "");
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cofls6581 채린이는 vo 받아서 이걸로 얻어오면 될듯
user.getProfile().getPhoneNumberVo(). getNaverSmsToNumber();
같이 뎁스 너무 길어지면
user 엔티티에
user.getNaverSmsToNumber() 메소드 만드세용
이렇게 뎁스 쭐이는거 용어가있는데 까먹었넴

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 309 Code Smells

16.4% 16.4% Coverage
0.0% 0.0% Duplication

Copy link
Member

@cofls6581 cofls6581 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

커멘트확인완! 고생하셨음둥

@ImNM ImNM added this to the 두둥 스프린트 2차 milestone Feb 9, 2023
Copy link
Member

@sanbonai06 sanbonai06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ImNM ImNM merged commit e9a5f5f into dev Feb 9, 2023
@ImNM ImNM deleted the refactor/326-phone-libphonenumber branch February 15, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For: Utils [이슈 대상] API, 모델, 뷰를 제외한 백엔드 로직 Type: Refactor [이슈 목적] 프로덕션 코드 리팩토링
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

🔨[refactor] 회원가입시 유저 핸드폰번호 비 국제화
3 participants