This commit is contained in:
crusader 2018-03-14 18:42:56 +09:00
parent e00cba6279
commit 3ddd594803
3 changed files with 5 additions and 5 deletions

View File

@ -16,8 +16,8 @@ import java.util.List;
@Repository @Repository
public interface DomainMemberDAO extends JpaRepository<DomainMember, Long> { public interface DomainMemberDAO extends JpaRepository<DomainMember, Long> {
@Query("SELECT dm from DomainMember dm where dm.member.id = (:id)") @Query("SELECT dm from DomainMember dm where dm.member.email = (:email)")
DomainMember findByMemberID(@Param("id") long id); DomainMember findByMemberEmail(@Param("email") String email);
@Query("SELECT dm.domain from DomainMember dm where dm.member = (:member)") @Query("SELECT dm.domain from DomainMember dm where dm.member = (:member)")
Domain findDomainByMember(@Param("member") Member member); Domain findDomainByMember(@Param("member") Member member);

View File

@ -31,8 +31,8 @@ public class DomainMemberService {
return this.domainMemberDAO.findDomainByMember(member); return this.domainMemberDAO.findDomainByMember(member);
} }
public DomainMember readByMemberID(long id) { public DomainMember readByMemberEmail(String email) {
return this.domainMemberDAO.findByMemberID(id); return this.domainMemberDAO.findByMemberEmail(email);
} }
public List<Member> readAllMemberByDomain(Domain domain) { public List<Member> readAllMemberByDomain(Domain domain) {

View File

@ -76,7 +76,7 @@ public class MemberService {
m.setSigninFailCount(0); m.setSigninFailCount(0);
this.modify(m); this.modify(m);
DomainMember dm = domainMemberService.readByMemberID(m.getId()); DomainMember dm = domainMemberService.readByMemberEmail(m.getEmail());
// Todo Signin History // Todo Signin History
return dm; return dm;