package com.hc.business.mapper;

import com.hc.business.dto.OrderUserLogDto;
import com.hc.business.dto.OrdersAllUserDto;
import com.hc.business.model.OrderUserLog;
import com.hc.core.utils.mapper.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (OrderUserLog)表数据库访问层
 *
 * @author java
 * @since 2020-12-03 09:25:08
 */

@Repository
public interface OrderUserLogMapper extends Mapper<OrderUserLog> {

    /**
     * 依据订单id查询用户
     *
     * @param ordersId 订单id
     * @return 实例对象数组
     */
    List<OrderUserLog> queryByOrderId(Integer ordersId);


    /**
     * 依据订单id查询用户
     *
     * @param ordersId 订单id
     * @return 实例对象数组
     */
    List<OrderUserLogDto> queryUserLogByOrderId(Integer ordersId);

    /**
     * 依据用户id和订单id查询
     *
     * @param ordersId 订单id
     * @param userId   用户id
     * @return 实例对象数组
     */
    List<OrderUserLog> queryByUserIdAndOrderId(@Param("ordersId") Integer ordersId,
                                               @Param("userId") Integer userId);

    List<OrdersAllUserDto> queryAllOrdersUser(Integer orderId, String orderNo, Integer status, Integer payType, Integer classId, Long begin, Long end);
}