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


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

import java.util.List;

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

    @Query(value = "select * from accessory_discard ad where ad.return_id = ?1 order by ad.id desc", nativeQuery = true)
    List<AccessoryDiscard> findByReturnId(Integer id);
}