package com.jsh.erp.datasource.mappers;

import com.jsh.erp.datasource.entities.DepotHead;
import com.jsh.erp.datasource.entities.DepotHeadExample;
import java.util.List;

import com.jsh.erp.datasource.pda.dto.PDADepotHeadDTO;
import com.jsh.erp.datasource.pda.vo.PDADepotHeadVO;
import org.apache.ibatis.annotations.Param;

public interface DepotHeadMapper extends BaseMapperX<DepotHead> {

    /**
     * PDA查询订单
     * @param pdaDepotHeadDTO 筛选条件
     * @return
     */
    List<PDADepotHeadVO> pdaList(PDADepotHeadDTO pdaDepotHeadDTO);

    /**
     * PDA查询订单详情
     * @param id 订单id
     * @return
     */
    PDADepotHeadVO pdaDetail(@Param("id")Long id);

    long countByExample(DepotHeadExample example);

    int deleteByExample(DepotHeadExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DepotHead record);

    int insertSelective(DepotHead record);

    List<DepotHead> selectByExample(DepotHeadExample example);

    DepotHead selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DepotHead record, @Param("example") DepotHeadExample example);

    int updateByExample(@Param("record") DepotHead record, @Param("example") DepotHeadExample example);

    int updateByPrimaryKeySelective(DepotHead record);

    int updateByPrimaryKey(DepotHead record);

    /**
     * 根据商品id获取最后一条销售订单
     * @param id 商品id
     * @return
     */
    DepotHead getDepotLastByMaterialId(long id);

}