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

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

import java.util.List;

/**
 * @Author chang.n
 * @ClassName PerformanceDao
 * @Date 2020/4/14 4:16 PM
 */
@Repository
public interface TmpPerformanceSelfTakeDao {

    /**
     * 插入自提订单信息
     *
     * @param selfTake
     * @return
     */
    int insert(PerformanceSelfTake selfTake);

    /**
     * 查询单个履约信息
     * 
     * @param orderNo
     * @param userId
     * @return: com.zm.order.biz.model.PerformanceSelfTake
     * @Date: 2020/5/9 9:53 AM
     */
    PerformanceSelfTake selectOne(@Param("orderNo") String orderNo, @Param("userId") Long userId);

    /**
     * 批量查询
     * @param performanceDTO
     * @return: java.util.List<com.zm.order.biz.model.PerformanceSelfTake>
     * @Date:   2020/6/8 2:32 PM
     */
    List<PerformanceSelfTake> selectList(QueryPerformanceDTO performanceDTO);

    /**
     * 批量查询
     * @param performanceDTO
     * @return: java.util.List<com.zm.order.biz.model.PerformanceSelfTake>
     * @Date:   2020/6/8 2:32 PM
     */
    List<PerformanceSelfTake> selectListByUserIdOrderNo(QueryPerformanceDTO performanceDTO);

    /**
     * 更新自提信息
     * @param selfTake
     * @return: int
     * @Date:   2020/5/18 1:55 PM
     */
    int update(PerformanceSelfTake selfTake);

    /**
     * 批量更新自提信息
     * @param orderSelfTakeList
     * @param baking
     * @param newSellerId
     * @return: int
     * @Date:   2020/5/18 1:55 PM
     */
    int updateBatch(@Param("list")List<PerformanceSelfTake> orderSelfTakeList, @Param("bizType")Integer baking, @Param("sellerId")Long newSellerId);

    /**
     * 查询单个履约信息
     * @param selfTake
     * @return: com.zm.order.biz.model.PerformanceSelfTake
     * @Date:   2020/6/8 2:32 PM
     */
    PerformanceSelfTake selectByOne(PerformanceSelfTake selfTake);

}
