package com.czg.service.order.mapper;

import com.czg.order.dto.GbOrderQueryParam;
import com.czg.order.vo.GbOrderCountVO;
import com.czg.order.vo.GbOrderDetailVO;
import com.czg.order.vo.GbOrderUserVO;
import com.mybatisflex.core.BaseMapper;
import com.czg.order.entity.GbOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 拼团订单表 映射层。
 *
 * @author ww
 * @since 2025-12-16
 */
public interface GbOrderMapper extends BaseMapper<GbOrder> {

    GbOrderCountVO countOrder(@Param("param") GbOrderQueryParam param);

    List<GbOrderDetailVO> getGbOrderPage(@Param("param") GbOrderQueryParam param, Long shopId);

    GbOrderDetailVO getDetailByDetailId(Long shopId, Long detailId);

    GbOrderDetailVO getDetailByGroupNo(Long shopId, String groupOrderNo, Long userId);

    List<GbOrderUserVO> getGbOrderDetailUsers(Long shopId, String groupOrderNo);
}
