package com.sw.mes.fb.accessory.dao;


import com.sw.mes.core.base.BaseDao;
import com.sw.mes.fb.accessory.entity.FbAccessoryOrder;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
* @Author
* @Description：
* @Date:
* @Modified By:
*/
public interface FbAccessoryOrderDao extends BaseDao<FbAccessoryOrder, Long> {

    @Query(value = "select * from zhxx_fb_accessory_order fao where fao.goods_code_before = ?1 order by fao.id desc", nativeQuery = true)
    List<FbAccessoryOrder> findByGoodsCodeBeforeOrderByIdDesc(String goodsCodeBefore);

    @Query(value = "select * from zhxx_fb_accessory_order fao where fao.goods_code_after = ?1 order by fao.id desc", nativeQuery = true)
    List<FbAccessoryOrder> findByGoodsCodeAfterOrderByIdDesc(String goodsCodeAfter);
}
