package com.goafanti.common.dao;

import com.goafanti.common.model.TOrder;
import com.goafanti.common.model.TOrderDetail;
import com.goafanti.common.model.TOrderExample;
import com.goafanti.order.bo.CommodityDetailBo;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface TOrderMapper {

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	long countByExample(TOrderExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	int deleteByExample(TOrderExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	int deleteByPrimaryKey(String orderNo);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	int insert(TOrder record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	int insertSelective(TOrder record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	List<TOrder> selectByExampleWithBLOBs(TOrderExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	List<TOrder> selectByExample(TOrderExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	TOrder selectByPrimaryKey(String orderNo);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	int updateByExampleSelective(@Param("record") TOrder record, @Param("example") TOrderExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	int updateByExampleWithBLOBs(@Param("record") TOrder record, @Param("example") TOrderExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	int updateByExample(@Param("record") TOrder record, @Param("example") TOrderExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	int updateByPrimaryKeySelective(TOrder record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	int updateByPrimaryKeyWithBLOBs(TOrder record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
	 * @mbg.generated  Wed Apr 11 14:30:55 CST 2018
	 */
	int updateByPrimaryKey(TOrder record);

	/**
	 *  查看商品详情
	 * @param commodityId
	 * @param orderType
	 * @return
	 */
	CommodityDetailBo selectCommodityDetail(@Param("commodityId")String commodityId, @Param("commodityType")Integer commodityType);
	
	/**
	 * 查询订单详情商品
	 * @param orderId
	 * @return
	 */
	List<TOrderDetail> selectOrderCommodity(@Param("orderNo")String orderNo);

}