package com.gree.mall.miniapp.commonmapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gree.mall.miniapp.plus.entity.SecKillActivity;
import com.gree.mall.miniapp.plus.entity.SecKillActivitySpec;
import com.gree.mall.miniapp.plus.entity.SecKillStage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SecActivityStageMapper {

    @SqlParser(filter = true)
    Integer queryStageCount(@Param("secKillId") String secKillId);

    @SqlParser(filter = true)
    SecKillStage queryStage(@Param("secKillId") String secKillId);
    @SqlParser(filter = true)
    IPage<SecKillActivitySpec> querySecGoods(Page page,@Param("secKillId") String secKillId);

    @SqlParser(filter = true)
    public SecKillActivitySpec getSecKillSpecByGoodsSpecId(@Param("goodsSpecId") String goodsSpecId);

    /**
     * 查询改商品的秒杀活动明细
     */
    SecKillActivitySpec getSecKillActivitySpecByGoodId(@Param("companyWechatId")String companyWechatId,@Param("goodId") String goodId);

}
