package com.bailuntec.mapper;

import com.bailuntec.domain.entity.DcAveragePurchase;
import com.bailuntec.domain.example.DcAveragePurchaseExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    //根据唯一键查询
    DcAveragePurchase selectByUnionKey(@Param("bailunSku") String bailunSku,
                                       @Param("warehouseCode") String warehouseCode,
                                       @Param("suppliersId") Integer suppliersId);
}
