package cn.iselab.mooctest.user.mapper;

import cn.iselab.mooctest.user.model.VerifyCode;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;

import javax.transaction.Transactional;
import java.util.List;

/**
 * @Author: xuexb
 * @Date: 2018.12.28 1:16
 */
@Transactional
public interface VerifyCodeDao extends CrudRepository<VerifyCode, Long>, JpaSpecificationExecutor<VerifyCode> {

    VerifyCode findTop1ByTypeAndReceiverOrderByCreateTimeDesc(String type, String receiver);
}
