package com.huimv.admin.repo.secondary;

import com.huimv.admin.domain.secondary.DaLqda;
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 DaLqdaRepository extends JpaRepository<DaLqda, Integer>, JpaSpecificationExecutor<DaLqda> {

    @Query(nativeQuery = true ,value = "select * from da_lqda where mcid like %?1% and MCID = 11 and ZFBZ = 0 limit ?2 , ?3")
    List<DaLqda> findAll(String name, Integer startPage, Integer pageSize);



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

}