package com.bailuntec.mapper;

import com.bailuntec.domain.entity.DcBaseOmsPick;
import com.bailuntec.domain.entity.DcBaseStockRecord;
import com.bailuntec.domain.entity.JobPointLog;
import com.bailuntec.domain.example.DcBaseStockRecordExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DcBaseStockRecordMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     */
    long countByExample(DcBaseStockRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     */
    int deleteByExample(DcBaseStockRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     */
    int insert(DcBaseStockRecord record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     */
    int insertSelective(DcBaseStockRecord record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     * @project https://github.com/itfsw/mybatis-generator-plugin
     */
    DcBaseStockRecord selectOneByExample(DcBaseStockRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     */
    List<DcBaseStockRecord> selectByExample(DcBaseStockRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     */
    DcBaseStockRecord selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("record") DcBaseStockRecord record, @Param("example") DcBaseStockRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     */
    int updateByExample(@Param("record") DcBaseStockRecord record, @Param("example") DcBaseStockRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(DcBaseStockRecord record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     */
    int updateByPrimaryKey(DcBaseStockRecord record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     * @project https://github.com/itfsw/mybatis-generator-plugin
     */
    int upsert(DcBaseStockRecord record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_base_stock_record
     *
     * @mbg.generated
     * @project https://github.com/itfsw/mybatis-generator-plugin
     */
    int upsertSelective(DcBaseStockRecord record);

    /**
     * 根据仓库、sku，入库时间升序查询入库sku记录
     * @param bailunSku
     * @param warehouseCode
     * @return
     */
    List<DcBaseStockRecord> selectByStockTime(@Param("bailunSku")String bailunSku, @Param("warehouseCode")String warehouseCode);

    List<DcBaseStockRecord> selectPageByGroup(JobPointLog jobPointLog);

    /**
     *  根据仓库、sku分组计算入库数量
     * @param jobPointLog
     * @return
     */
    Integer selectCountByGroup(JobPointLog jobPointLog);

    List<DcBaseOmsPick> selectListByPage(JobPointLog jobPointLog);

    Integer selectOrderPickCount(JobPointLog jobPointLog);
}