package com.gree.mall.manager.commonmapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gree.mall.manager.bean.activity.PromotionGroupDetail;
import com.gree.mall.manager.plus.entity.PromotionGroup;
import com.gree.mall.manager.plus.entity.PromotionGroupSpecUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

@Mapper
public interface PromotionMapper {

    /**
     * 查询团购活动订单总金额
     */
    public BigDecimal queryOrderTotalAmount(@Param("promotionGroupId") String promotionGroupId);
    /**
     * 查询团购活动的分佣总金额
     */
    public BigDecimal queryTotalShareAmount(@Param("status") String status,@Param("promotionGroupId") String promotionGroupId,@Param("userId") String userId);
    /**
     * 订单台数
     */
    public Integer queryTotalGoodsNum(@Param("promotionGroupId") String promotionGroupId,@Param("userId") String userId);
    /**
     * 查询参与了该活动的团长列表
     */
    public IPage<PromotionGroupSpecUser> queryGroupSpecUser(IPage page,@Param("promotionGroupId") String promotionGroupId);
    /**
     * 团购活动统计
     */
    public PromotionGroupDetail queryPtDetail(@Param("promotionGroupId") String promotionGroupId,@Param("userId") String userId);



}
