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
public interface DomainMemberDAO extends JpaRepository<DomainMember, Long> {
@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);

View File

@ -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<Member> readAllMemberByDomain(Domain domain) {

View File

@ -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;