package com.ff.weijinxiao.repository;


import com.ff.weijinxiao.domain.SmsJour;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Date;

public interface SmsJourRepository extends JpaRepository<SmsJour, Integer>, JpaSpecificationExecutor<SmsJour> {


    Integer countAllByPhoneAndCreateTimeGreaterThanEqual(String phone, Date createTime);

    SmsJour findFirstByPhoneOrderByCreateTimeDesc(String phone);

    SmsJour findByPhoneAndSmsCode(String phone, String smsCode);
}
