package com.tykj.dev.device.train.dao;

import com.tykj.dev.device.train.entity.TrainUnit;
import com.tykj.dev.device.train.entity.TrainUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @author zjm
 * @version 1.0.0
 * @ClassName TrainUnitDao.java
 * @Description TODO
 * @createTime 2021年05月11日 18:01:00
 */
public interface TrainUnitDao extends JpaRepository<TrainUnit, Integer>, JpaSpecificationExecutor<TrainUnit> {
 List<TrainUnit> findAllByTrainId(Integer trainId);

 TrainUnit findByTrainIdAndUnitId(Integer trainId,Integer unitId);
}
