package com.diagbot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.diagbot.entity.OrderDetailStatus;
import com.diagbot.entity.OrderDetails;
import com.diagbot.entity.OrderDetailsIndex;
import com.diagbot.entity.wrapper.OrderDetailsWapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 订单明细表 Mapper 接口
 * </p>
 *
 * @author gaodm
 * @since 2018-09-18
 */
public interface OrderDetailsMapper extends BaseMapper<OrderDetails> {
    /**
     * @Description: 查询所有待审核产品
     * @Author: wangyu
     * @Date: 15:06 2018/9/21
     */
    public List<OrderDetailsWapper> seleAllOrderDetials(OrderDetailsIndex orderDetailsIndex);

    /**
     * 根据订单编号查询所有产品审核状态
     * @param orderNum
     * @return
     */
    public OrderDetailStatus selectAllOrderDetialsByOrderNum(String orderNum);

    /**
     * 添加订单明细
     * @param list
     * @return 添加的条数
     */
    public int saveOrderDetails(@Param("list") List<OrderDetails> list);


    /**
     * 根据用户id查询是否有在认证中的产品
     * @param userId
     * @return
     */
    public List<Long> getOrderDetailsByUser(Long userId);
}
