package com.goafanti.common.dao;

import com.goafanti.common.model.NewOrderDun;
import com.goafanti.common.model.NewOrderDunExample;
import com.goafanti.order.bo.OutNewOrderDunBo;
import com.goafanti.order.bo.OutSelectOrderDun;
import com.goafanti.order.bo.OutSelectOrderDunAll;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface NewOrderDunMapper {
    /**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
	 * @mbg.generated  Fri May 15 09:46:56 CST 2020
	 */
	long countByExample(NewOrderDunExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
	 * @mbg.generated  Fri May 15 09:46:56 CST 2020
	 */
	int deleteByExample(NewOrderDunExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
	 * @mbg.generated  Fri May 15 09:46:56 CST 2020
	 */
	int deleteByPrimaryKey(Integer id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
	 * @mbg.generated  Fri May 15 09:46:56 CST 2020
	 */
	int insert(NewOrderDun record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
	 * @mbg.generated  Fri May 15 09:46:56 CST 2020
	 */
	int insertSelective(NewOrderDun record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
	 * @mbg.generated  Fri May 15 09:46:56 CST 2020
	 */
	List<NewOrderDun> selectByExample(NewOrderDunExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
	 * @mbg.generated  Fri May 15 09:46:56 CST 2020
	 */
	NewOrderDun selectByPrimaryKey(Integer id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
	 * @mbg.generated  Fri May 15 09:46:56 CST 2020
	 */
	int updateByExampleSelective(@Param("record") NewOrderDun record, @Param("example") NewOrderDunExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
	 * @mbg.generated  Fri May 15 09:46:56 CST 2020
	 */
	int updateByExample(@Param("record") NewOrderDun record, @Param("example") NewOrderDunExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
	 * @mbg.generated  Fri May 15 09:46:56 CST 2020
	 */
	int updateByPrimaryKeySelective(NewOrderDun record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
	 * @mbg.generated  Fri May 15 09:46:56 CST 2020
	 */
	int updateByPrimaryKey(NewOrderDun record);

	List<OutNewOrderDunBo> selectListNewOrderDun(@Param("orderNo")String orderNo,@Param("status")Integer status);

	List<OutNewOrderDunBo> selectAllOrderDun();

	List<OutNewOrderDunBo> selectByTid(Integer id);

	void deleteByTid(Integer tid);

	void insertBatch(List<OutNewOrderDunBo> newtd2);

	List<OutSelectOrderDunAll> selectOrderDunAll(@Param("depId") String depId, @Param("startDate") String startDate, @Param("endDate") String endDate,@Param("sort") Integer sort);

	List<OutSelectOrderDun> selectOrderDun(@Param("depId") String depId,@Param("aid") String aid,@Param("sort") Integer sort,@Param("province") Integer province,
										   @Param("startDate") String startDate, @Param("endDate")  String endDate);


	BigDecimal selectByAidAndDate(@Param("aid") String aid, @Param("startTime") String startTime, @Param("endTime") String endTime);
}
