package com.jwipc.shopping.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.shopping.entity.ShoppingAfterSales;
import com.jwipc.shopping.entity.ShoppingCart;
import com.jwipc.shopping.model.po.ShoppingAfterSalesPO;
import com.jwipc.shopping.model.query.MyAfterSalesQuery;
import com.jwipc.shopping.model.query.OnlineMallCartQuery;
import com.jwipc.shopping.model.vo.OnlineMallCart;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商城购物车商品信息 Mapper 接口
 * </p>
 *
 * @author zx
 * @since 2024-03-14
 */
public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> {

    /**
     * 列表数据查询
     *
     * @param toPage 分页条件
     * @param query 查询条件
     * @return 结果
     */
    List<OnlineMallCart> selectDataByQuery(@Param("toPage") Page<OnlineMallCart> toPage, @Param("query") OnlineMallCartQuery query);


    /**
     * 查询购物订单信息
     *
     * @param query 查询信息
     * @return 结果
     */
    OnlineMallCart selectByQuery(@Param("query") OnlineMallCartQuery query);

    OnlineMallCart findHeadById(@Param("cartId") Long cartId);


    List<OnlineMallCart> bidFindByPage(@Param("query") OnlineMallCartQuery query);

    List<OnlineMallCart> bidFindByPage( Page<OnlineMallCart> dbPage, @Param("query") OnlineMallCartQuery query);

    List<ShoppingAfterSalesPO> asFindByPage(@Param("query") MyAfterSalesQuery query);

    List<ShoppingAfterSalesPO> asFindByPage( Page<ShoppingAfterSales> page, @Param("query") MyAfterSalesQuery query);

    ShoppingCart getByOrderCode(@Param("cartId") String cartId);

    List<OnlineMallCart> selectDataExport(@Param("thirdOrder") String thirdOrder);

    List<OnlineMallCart> selectDataExport1(@Param("query") OnlineMallCartQuery query);

    List<OnlineMallCart> selectInfoDataByQuery(@Param("toPage") Page<OnlineMallCart> page, @Param("query") OnlineMallCartQuery query);
}
