package com.goafanti.common.dao;

import com.goafanti.common.model.TOrderMid;
import com.goafanti.common.model.TOrderMidExample;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface TOrderMidMapper {
    /**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
	 */
	long countByExample(TOrderMidExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
	 */
	int deleteByExample(TOrderMidExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
	 */
	int deleteByPrimaryKey(Integer id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
	 */
	int insert(TOrderMid record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
	 */
	int insertSelective(TOrderMid record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
	 */
	List<TOrderMid> selectByExample(TOrderMidExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
	 */
	TOrderMid selectByPrimaryKey(Integer id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
	 */
	int updateByExampleSelective(@Param("record") TOrderMid record, @Param("example") TOrderMidExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
	 */
	int updateByExample(@Param("record") TOrderMid record, @Param("example") TOrderMidExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
	 */
	int updateByPrimaryKeySelective(TOrderMid record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
	 */
	int updateByPrimaryKey(TOrderMid record);

	TOrderMid selectByOrderNo(String orderNo);

	void updateSalesmanId(@Param("aid")String aid, @Param("transferId")String transferId);

	void updateFinanceId(@Param("id")String id, @Param("financeId")String financeId);

	void updatefinalReceivables(@Param("orderNo")String orderNo,@Param("amount")BigDecimal amount, @Param("receivablesTime")Date receivablesTime);

	void updateInvoice(String orderNo);

	void addOrderReceivables(@Param("orderNo")String orderNo, @Param("money")BigDecimal money);

	String selectDepNameByDepid(String orderDep);

	void updateCostAmount(@Param("tid")Integer tid, @Param("count")BigDecimal count);
}