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

feature :: 회원가입, 로그인시 계정 타입 추가 #226

Merged
merged 6 commits into from
Feb 29, 2024

Conversation

gunsight1
Copy link
Collaborator

💡 Motivation and Context

여기에 왜 이 PR이 필요했는지, PR을 통해 무엇이 바뀌는지에 대해서 설명해 주세요

  • 카카오 로그인 이후 다른 sns 로그인 추가가 발생시 적절히 로그인이 가능하도록 조치 하였습니다.

[정책]

  • 현재 sns 로그인 정책은 폼가입과 다른 각각의 계정으로 취급하고 연동 기능을 지원하지 않습니다.

[SQL]

  • 회원테이블에 account_type이 추가되어 쿼리 파일이 수정되었습니다.

  • member 테이블과 뷰를 삭제하고 플라이웨이 이력을 다시 작동해야 합니다. 개발서버 회원정보는 백업해두었습니다.
    폼로그인 카카오 로그인 네이버 로그인 전부 같은사람이 시도해도 다른 계정으로 취급합니다.

    [코드]

  • 회원 탈퇴 코드가 중복으로 작성되어 메서드 병합 처리를 진행 하였습니다.

  • 탈퇴 코드 병합을 하면서 of 절 사용의 대한 리팩터링을 예시로 하나 추가하였습니다.


🔨 Modified

여기에 무엇이 크게 바뀌었는지 설명해 주세요

  • 여기에 세부 변경사항을 설명해주세요
    image
    OF절 파라메터를 객체 통째로 보내면 코드가 더욱 간결해집니다.

image
계정 타입이 추가되었습니다.

🌟 More

  • 여기에 PR 이후 추가로 해야 할 일에 대해서 설명해 주세요
  • 아이디 찾기, 비밀번호 찾기, 아이디 중복검사, 비밀번호 중복검사시 jpa find 메서드에 accountType.PLATFORM을 추가해서
    플랫폼 회원정보에 한해서만 작동하도록 변경해야 합니다.


📋 커밋 전 체크리스트

  • 추가/변경에 대한 단위 테스트를 완료하였습니다.
  • 컨벤션에 맞게 작성하였습니다.

🤟🏻 PR로 완료된 이슈

closes #217

@gunsight1 gunsight1 added 🖥️ BackEnd 서버 관련 💡 Feature 새로운 기능 추가, 혹은 구현 🔨 Refactor 이 코드는 아주 약간 더 클린코드에 가까워졌습니다... labels Feb 29, 2024
@gunsight1 gunsight1 self-assigned this Feb 29, 2024
Copy link
Collaborator

@chan99k chan99k left a comment

Choose a reason for hiding this comment

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

고행하셨습니다

@@ -0,0 +1,5 @@
package com.kernel360.member.enumset;

public enum AccountType {
Copy link
Collaborator

Choose a reason for hiding this comment

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

계정 타입 확인하였습니다

Comment on lines +55 to +58
INSERT INTO member (member_no, id, "password", email, gender, age, created_at, created_by, modified_at, modified_by, account_type)
VALUES (nextval('member_member_no_seq'::regclass), NEW.id, pgp_sym_encrypt(NEW.password::TEXT, 'changeRequired'),
pgp_sym_encrypt(NEW.email::TEXT, 'changeRequired'), NEW.gender, NEW.age, NEW.created_at, NEW.created_by,
NEW.modified_at, NEW.modified_by);
NEW.modified_at, NEW.modified_by, NEW.account_type);
Copy link
Collaborator

Choose a reason for hiding this comment

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

}

/**
* joinMember Binding
**/
private Member(String id, String email, String password, int gender, int age) {
private Member(String id, String email, String password, int gender, int age, String accountType) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

accounType 을 이용하여 관리하도록 통합된 점 확인하였습니다.

Copy link
Collaborator

@linglong67 linglong67 left a comment

Choose a reason for hiding this comment

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

확인했습니다~!

//Fixme :: 멤버 탈퇴시, Deleted Table을 만들고, 데이터를 백업한후, 삭제하는 방식이나, MemberTable에 삭제여부를 표시하는 방식으로 리팩토링 필요
public void deleteMemberByToken(String accessToken) {
Member member = memberRepository.findOneById(JWT.ownerId(accessToken));
withdrawMemberRepository.save(WithdrawMember.of(member)); //of 받는식을 변경했습니다. 이 방식으로 리팩터를 하면 코드가 깔끔하네요.
Copy link
Collaborator

Choose a reason for hiding this comment

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

오 깔끔하네요

REVOKE INSERT, UPDATE, DELETE, TRUNCATE ON member FROM wash_admin;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@gunsight1 gunsight1 merged commit f350c16 into Kernel360:develop Feb 29, 2024
@gunsight1 gunsight1 deleted the feature_add_account_type branch February 29, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖥️ BackEnd 서버 관련 💡 Feature 새로운 기능 추가, 혹은 구현 🔨 Refactor 이 코드는 아주 약간 더 클린코드에 가까워졌습니다...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature :: 회원가입, 로그인시 계정 타입 추가
3 participants