package com.fzm.mall.server.admin.order.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fzm.mall.server.admin.order.entity.dto.OrderDTO;
import com.fzm.mall.server.admin.order.model.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fzm.mall.server.admin.order.model.PayRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户购物订单表 Mapper 接口
 * </p>
 *
 * @author wulixian
 * @since 2021-03-19
 */
@Mapper
public interface OrderMapper extends BaseMapper<Order> {

    IPage<OrderDTO> page(Page<OrderDTO> page,
                         @Param("uid") String uid,
                         @Param("oid") String oid,
                         @Param("orderState") Integer orderState,
                         @Param("merchantId") String merchantId);

    Order read(@Param("oid") String oid);

    List<PayRecord> listPayRecord(@Param("oid") String oid);
}
