EmailAuth method added

This commit is contained in:
geek 2017-06-26 16:00:20 +09:00
parent fc97953724
commit 62a72a531d

View File

@ -1,18 +1,23 @@
package com.loafle.overflow.module.email.dao;
import com.loafle.overflow.module.email.model.EmailAuth;
import com.loafle.overflow.module.member.model.Member;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Created by geek@loafle.com on 17. 6. 6.
*/
@Repository
public interface EmailAuthDAO extends JpaRepository<EmailAuth, Long> {
// public EmailAuth findByAuthToken(EmailAuth emailAuth);
@Query("select e from EmailAuth e where e.emailAuthKey = :authKey")
EmailAuth findByEmailAuthKey(@Param("authKey") String emailAuthKey);
// public List<EmailAuth> findByMemberId(EmailAuth emailAuth);
List<EmailAuth> findByMember(Member member);
// public EmailAuth updateEmailAuth(EmailAuth emailAuth);
}