package com.gree.mall.manager.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.manager.bean.activity.CustomSecSpecBean;
import com.gree.mall.manager.bean.activity.CustomSpecBean;
import com.gree.mall.manager.bean.activity.SecKillActivitySpecBean;
import com.gree.mall.manager.bean.activity.SecKillActivityStageBean;
import com.gree.mall.manager.bean.goods.GoodsSpecBean;
import io.swagger.annotations.ApiParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;

@Mapper
public interface SecKillMapper {
    @SqlParser(filter = true)
    IPage<CustomSecSpecBean> querySecSpec(IPage page,
                                          @Param("keyword")String keyword,
                                          @Param("status") Integer status,
                                          @Param("companyWechatIds") List<String> companyWechatIds);

    @SqlParser(filter = true)
    List<SecKillActivitySpecBean> querySecDetail(@Param("secKillId")String secKillId);

    @SqlParser(filter = true)
    IPage<SecKillActivityStageBean> queryActivity(
            IPage page,
            @Param("status")Integer status,
            @Param("keyword")String keyword,
            @Param("startTime")Date startTime,
            @Param("companyWechatIds") List<String> companyWechatIds);


    @SqlParser(filter = true)
    IPage<CustomSpecBean> querySpecList(
            IPage page,
            @Param("categoryId")String categoryId,
            @Param("keyword")String keyword,
            List<String> companyWechatIds);

    @SqlParser(filter = true)
    IPage<CustomSecSpecBean> querySpecListforCoupon(Page<CustomSecSpecBean> objectPage,@Param("companyWechatIds") List<String> companyWechatIds,
                                                    @Param("categoryId")String categoryId, @Param("keyword")String keyword);

}
