package com.huimv.receiver.cloud.dao.repo;

import com.huimv.receiver.cloud.dao.entity.SysThresholdEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.Optional;

public interface SysThresholdEntityRepo extends JpaRepository<SysThresholdEntity, Integer>, JpaSpecificationExecutor<SysThresholdEntity> {

    @Query(nativeQuery = true,value ="SELECT * FROM sys_threshold where farm_id=?1")
    Optional<SysThresholdEntity> findByFarmId(String farmId);
}