package com.cirle.scientific.dao;

import com.cirle.scientific.po.QkjMemberApp;
import com.cirle.scientific.po.QkjStudyRecordApp;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface QkjMemberAppDao extends PagingAndSortingRepository<QkjMemberApp, Long>,
        JpaSpecificationExecutor<QkjMemberApp> {


    @Query(value = "select * from qkj_member_app where mem_card = ?1 and mem_status=0",nativeQuery = true)
    QkjMemberApp findByMemCard(String memCard);

    @Query(value = "select * from qkj_member_app where mem_token = ?1 and mem_status=0",nativeQuery = true)
    QkjMemberApp findByMemToken(String memToken);

    @Query(value = "select * from qkj_member_app where mem_mobile = ?1 and mem_status=0",nativeQuery = true)
    QkjMemberApp findByPhone(String phone);


}
