package com.huimv.env.dao.repo;

import com.alibaba.fastjson.JSONArray;
import com.huimv.env.dao.entity.DaLqdaEntity;
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 DaLqdaEntityRepository extends JpaRepository<DaLqdaEntity, Integer>, JpaSpecificationExecutor<DaLqdaEntity> {

    @Query(nativeQuery = true , value = "SELECT * FROM da_lqda WHERE id IN(SELECT MAX(id) FROM da_lqda WHERE zsid IN(?1) GROUP BY zsid)")
    List<DaLqdaEntity> getLqid(List<Integer> zsids);
}