package com.gyee.wisdom.dao.sql.topic.repository;

import com.gyee.wisdom.dao.sql.topic.entity.PointEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author:Wanghs
 * @date:2018-07-31
 */
@Repository
public interface PointRepository extends JpaRepository<PointEntity, String>, JpaSpecificationExecutor {

    List<PointEntity> findByStationIdAndPointTypeAndUniformCode(String stationId, String pointType, String uniformCode);

    List<PointEntity> findByStationIdAndPointTypeAndWindturbineId(String stationId, String pointType, String windturbineId);

    List<PointEntity> findByPointNameLike(String pointName);

    List<PointEntity> findAllByUniformCodeIn(List<String> uniformCodeList);
}
