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


import com.zm.order.tool.server.model.OrderPayDetails;
import com.zm.order.tool.server.model.RoutingOrderPayDetails;
import com.zm.order.tool.server.query.OrderPayDetailsQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author Gwl·Q
 * @ClassName OrderPayDetailsDao
 * @Date 2020/12/1 11:36 AM
 */
@Repository
public interface RoutingOrderPayDetailsDao {

    /**
     * 删除
     * @param id
     * @param userId
     * @return:
     * @Date: 2020/12/1 11:49 AM
     */
    int delete(@Param("id") Long id, @Param("userId") Long userId);

    /**
     * 删除
     * @param orderNo
     * @param userId
     * @return:
     * @Date: 2020/12/1 11:49 AM
     */
    int deleteByOrderNo(@Param("orderNo") String orderNo, @Param("userId") Long userId);

    /**
     * 新增
     * @param record
     * @return:
     * @Date: 2020/12/1 11:49 AM
     */
    int insert(OrderPayDetails record);

    /**
     * 批量新增
     * @param list
     * @return:
     * @Date: 2020/12/1 11:49 AM
     */
    void insertList(List<OrderPayDetails> list);

    /**
     * 查询
     * @param orderNo
     * @param userId
     * @return:
     * @Date: 2020/12/1 11:49 AM
     */
    List<OrderPayDetails> selectByOrderNo(@Param("orderNo") String orderNo,
                                          @Param("userId") Long userId);

    /**
     * 查询列表
     * @param query
     * @return:
     * @Date: 2020/12/1 11:51 AM
     */
    List<OrderPayDetails> selectList(OrderPayDetailsQuery query);

    /**
     * 修改
     * @param record
     * @return:
     * @Date: 2020/12/1 11:49 AM
     */
    int update(OrderPayDetails record);

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

}
