package common.repository;


import common.model.TradeType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface TradeTypeRepsitory extends JpaRepository<TradeType, Long>{


    @Query(value = "select * from trade_type where id = ?1 union all select * from trade_type where id = ?2",nativeQuery = true)
    List<TradeType> findByTwoId(int tradeType, int tradenow);
}
