package com.goafanti.common.dao;

import com.goafanti.common.model.TOrderBillNew;
import com.goafanti.common.model.TOrderNew;
import com.goafanti.common.model.TOrderNewExample;
import com.goafanti.order.bo.OrderListBo;
import com.goafanti.order.bo.OrderRefundDetailBo;
import com.goafanti.order.bo.TOrderNewBo;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import com.goafanti.common.model.TOrderNewWithBLOBs;

public interface TOrderNewMapper {
    /**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	long countByExample(TOrderNewExample example);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	int deleteByExample(TOrderNewExample example);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	int deleteByPrimaryKey(String orderNo);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	int insert(TOrderNew record);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	int insertSelective(TOrderNew record);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	List<TOrderNewWithBLOBs> selectByExampleWithBLOBs(TOrderNewExample example);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	List<TOrderNew> selectByExample(TOrderNewExample example);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	TOrderNewWithBLOBs selectByPrimaryKey(String orderNo);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	int updateByExampleSelective(@Param("record") TOrderNew record,
			@Param("example") TOrderNewExample example);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	int updateByExampleWithBLOBs(@Param("record") TOrderNew record,
			@Param("example") TOrderNewExample example);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	int updateByExample(@Param("record") TOrderNew record, @Param("example") TOrderNewExample example);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	int updateByPrimaryKeySelective(TOrderNew record);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	int updateByPrimaryKeyWithBLOBs(TOrderNew record);
	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_new
	 * @mbg.generated  Fri May 15 10:33:54 CST 2020
	 */
	int updateByPrimaryKey(TOrderNew record);
	TOrderNewBo getOrderNewDetail(String orderNo); 
    int getCountByIdAndStatus(TOrderNew orderNew);
    
    TOrderNewBo getSaleIdByOno(String ono);
    TOrderNewBo agreeEmailData(Integer fid);

    OrderRefundDetailBo orderRefundDetail(String id);

	int updateFinance(@Param("aid")String aid, @Param("orderNos")List<String> orderNos, @Param("newFinance")String newFinance);
	int checkContractNo(String sno);
	Map<String, Object> countTotalAndActually(@Param("o")OrderListBo o, @Param("fids")List<String> fids);
	TOrderBillNew getLastPayment(String orderNo);
	int updateSalesmanId(@Param("aid")String aid, @Param("transferId")String transferId);
	List<TOrderNewBo> selectUsedOrderByOrder(String orderNo);
	void updaterefund(TOrderNew o);
}