package com.huimv.video.repo;

import com.huimv.video.domain.SjHkAq;
import com.huimv.video.domain.SjHkWd;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface SjHkWdRepository extends JpaRepository<SjHkWd, Integer>, JpaSpecificationExecutor<SjHkWd> {
	
	@Query(nativeQuery = true ,value = "select * from sj_hk_wd where lqid like %?1% limit ?2 , ?3")
    List<SjHkWd> findAll(String name, Integer startPage, Integer pageSize);

    @Query(nativeQuery = true ,value = "select * from sj_hk_wd where lqid = ?1 order by id DESC limit 0 , 1")
    List<SjHkWd> findByLqidOrderById(Integer LQID);
}
