package com.goafanti.common.dao;

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

import org.apache.ibatis.annotations.Param;

import com.goafanti.common.model.TOrderBillNew;
import com.goafanti.common.model.TOrderBillNewExample;
import com.goafanti.order.bo.BillBo;

public interface TOrderBillNewMapper {
    /**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bill_new
	 * @mbg.generated  Wed Feb 19 08:54:03 CST 2020
	 */
	long countByExample(TOrderBillNewExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bill_new
	 * @mbg.generated  Wed Feb 19 08:54:03 CST 2020
	 */
	int deleteByExample(TOrderBillNewExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bill_new
	 * @mbg.generated  Wed Feb 19 08:54:03 CST 2020
	 */
	int deleteByPrimaryKey(String billNo);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bill_new
	 * @mbg.generated  Wed Feb 19 08:54:03 CST 2020
	 */
	int insert(TOrderBillNew record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bill_new
	 * @mbg.generated  Wed Feb 19 08:54:03 CST 2020
	 */
	int insertSelective(TOrderBillNew record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bill_new
	 * @mbg.generated  Wed Feb 19 08:54:03 CST 2020
	 */
	List<TOrderBillNew> selectByExample(TOrderBillNewExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bill_new
	 * @mbg.generated  Wed Feb 19 08:54:03 CST 2020
	 */
	TOrderBillNew selectByPrimaryKey(String billNo);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bill_new
	 * @mbg.generated  Wed Feb 19 08:54:03 CST 2020
	 */
	int updateByExampleSelective(@Param("record") TOrderBillNew record, @Param("example") TOrderBillNewExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bill_new
	 * @mbg.generated  Wed Feb 19 08:54:03 CST 2020
	 */
	int updateByExample(@Param("record") TOrderBillNew record, @Param("example") TOrderBillNewExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bill_new
	 * @mbg.generated  Wed Feb 19 08:54:03 CST 2020
	 */
	int updateByPrimaryKeySelective(TOrderBillNew record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bill_new
	 * @mbg.generated  Wed Feb 19 08:54:03 CST 2020
	 */
	int updateByPrimaryKey(TOrderBillNew record);

	BigDecimal getAmountByOid(String oid);
    
    TOrderBillNew getOneRefundFlow(String BillNo);
    
    List<TOrderBillNew> getOneOrderAllRefundFlow(String oid);
    
    List<TOrderBillNew> getDeptBySome(TOrderBillNew ob);
    
    List<TOrderBillNew> getBillData(TOrderBillNew ob);

	BigDecimal conutAmountByOrderNo(String orderNo);

	List<BillBo> selectByOrderNo(String orderNo);

	void insertBatch(List<TOrderBillNew> listBull);

}