package com.zm.order.tool.server.routing;

import com.zm.order.tool.server.model.OrderExtends;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * @author zhuxiaofeng
 */
@Repository
public interface RoutingOrderExtendsDao {

    /**
     * 插入
     *
     * @param record
     * @return
     */
    int insert(OrderExtends record);

    int insertList(List<OrderExtends> list);

    /**
     * 根据订单号查询
     *
     * @param orderNo
     * @param userId
     * @return
     */
    OrderExtends selectByOrderNo(@Param("orderNo") String orderNo,
                                 @Param("userId") Long userId);

    List<OrderExtends> selectByOrderNoList(List<String> list);

    /**
     * 删除数据
     *
     * @param id
     * @param userId
     * @param deleteType
     * @return
     */
    int delete(@Param("id") Long id,
               @Param("userId") Long userId,
               @Param("deleteType") Integer deleteType);
}