From 3ddd594803c4044504a02a996fb656de8d65f16a Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 14 Mar 2018 18:42:56 +0900 Subject: [PATCH] ing --- .../loafle/overflow/module/domain/dao/DomainMemberDAO.java | 4 ++-- .../overflow/module/domain/service/DomainMemberService.java | 4 ++-- .../loafle/overflow/module/member/service/MemberService.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/loafle/overflow/module/domain/dao/DomainMemberDAO.java b/src/main/java/com/loafle/overflow/module/domain/dao/DomainMemberDAO.java index 6a04f52..fb8e8ac 100644 --- a/src/main/java/com/loafle/overflow/module/domain/dao/DomainMemberDAO.java +++ b/src/main/java/com/loafle/overflow/module/domain/dao/DomainMemberDAO.java @@ -16,8 +16,8 @@ import java.util.List; @Repository public interface DomainMemberDAO extends JpaRepository { - @Query("SELECT dm from DomainMember dm where dm.member.id = (:id)") - DomainMember findByMemberID(@Param("id") long id); + @Query("SELECT dm from DomainMember dm where dm.member.email = (:email)") + DomainMember findByMemberEmail(@Param("email") String email); @Query("SELECT dm.domain from DomainMember dm where dm.member = (:member)") Domain findDomainByMember(@Param("member") Member member); diff --git a/src/main/java/com/loafle/overflow/module/domain/service/DomainMemberService.java b/src/main/java/com/loafle/overflow/module/domain/service/DomainMemberService.java index 589de7d..0dc26dc 100644 --- a/src/main/java/com/loafle/overflow/module/domain/service/DomainMemberService.java +++ b/src/main/java/com/loafle/overflow/module/domain/service/DomainMemberService.java @@ -31,8 +31,8 @@ public class DomainMemberService { return this.domainMemberDAO.findDomainByMember(member); } - public DomainMember readByMemberID(long id) { - return this.domainMemberDAO.findByMemberID(id); + public DomainMember readByMemberEmail(String email) { + return this.domainMemberDAO.findByMemberEmail(email); } public List readAllMemberByDomain(Domain domain) { diff --git a/src/main/java/com/loafle/overflow/module/member/service/MemberService.java b/src/main/java/com/loafle/overflow/module/member/service/MemberService.java index 0c10bf1..31dead5 100644 --- a/src/main/java/com/loafle/overflow/module/member/service/MemberService.java +++ b/src/main/java/com/loafle/overflow/module/member/service/MemberService.java @@ -76,7 +76,7 @@ public class MemberService { m.setSigninFailCount(0); this.modify(m); - DomainMember dm = domainMemberService.readByMemberID(m.getId()); + DomainMember dm = domainMemberService.readByMemberEmail(m.getEmail()); // Todo Signin History return dm;