package com.kmall.api.dao;

import com.kmall.api.entity.OrderVo;
import com.kmall.common.dao.BaseDao;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

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

/**
 * @author Scott
 * @email
 * @date 2017-08-11 09:16:46
 */
@Component
public interface ApiOrderMapper extends BaseDao<OrderVo> {
    void riderOrderUpdate(OrderVo orderVo);

    /**
     * 根据订单编号查询订单
     *
     * @param order_sn
     * @return
     */
    OrderVo queryObjectByOrderSn(@Param("order_sn") String order_sn);

    /**
     * 统计个人中心首页的订单数量
     *
     * @param map
     * @return
     */
    Map queryUcenterMap(Map<String, Object> map);

    List<OrderVo> queryObjectByIdList(@Param("orderIdList")List<Long> orderIdList);

    List<OrderVo> queryObjectByMerchOrderSn(@Param("merchOrderSn")String merchOrderSn);

    int queryCountByMerchOrderSn(@Param("merchOrderSn")String merchOrderSn);

    int queryCountByPayId(@Param("payId")String payId);

    int updateOrderByMerchOrderSn(OrderVo orderVo);

    List<OrderVo> queryOrderByMerchOrderSnAndRefundStatus(@Param("merchOrderSn")String merchOrderSn);

    int updateBatch(List<OrderVo> list);
}
