package com.haha.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.haha.entity.StockRecordItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 上货记录明细Mapper
 */
@Mapper
public interface StockRecordItemMapper extends BaseMapper<StockRecordItem> {

    /**
     * 根据上货记录ID查询明细列表
     */
    @Select("SELECT * FROM t_stock_record_item WHERE record_id = #{recordId} ORDER BY id")
    List<StockRecordItem> selectByRecordId(@Param("recordId") Long recordId);
}
