package com.huimv.admin.repo.secondary;

import com.huimv.admin.domain.secondary.DaZsda;
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 DaZsdaRepository extends JpaRepository<DaZsda, Integer>, JpaSpecificationExecutor<DaZsda> {
	
	@Query(nativeQuery = true ,value = "select * from da_zsda where mcid like %?1% and MCID = 11 and ZFBZ = 0 limit ?2 , ?3")
    List<DaZsda> findAll(String name, Integer startPage, Integer pageSize);

    @Query(nativeQuery = true ,value = "SELECT MAX(id) FROM da_zsda ")
    List<Integer> findMax();
}
