package com.cirle.scientific.dao;


import com.cirle.scientific.po.QkjBrandProduct;
import com.cirle.scientific.po.QkjBrandProductDetail;
import com.cirle.scientific.po.QkjCatalogs;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface QkjBrandProductDetailDao extends PagingAndSortingRepository<QkjBrandProductDetail, Long>, JpaSpecificationExecutor<QkjBrandProductDetail> {

	@Query(value = "select * from qkj_brand_product_detail where product_id = ?1 order by sqn desc",nativeQuery = true)
	List<QkjBrandProductDetail> findByProductId(Long productId);
}