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.coupon.*;
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CouponDateMapper {

    /**
     * 券数据
     * @param couponId
     * @return
     */
    @SqlParser(filter = true)
    CouponDataBean data(@Param("couponId")String couponId);

    @SqlParser(filter = true)
    List<CouponTagBean> couponTagDetail(@Param("couponId")String couponId);

    @SqlParser(filter = true)
    List<CouponUserBean> couponTagUser(@Param("couponId")String couponId);

    @SqlParser(filter = true)
    List<CouponUserTypeBean> reissueCouponUser(@Param("companyWechatId")String companyWechatId, @Param("couponId")String couponId);

    @SqlParser(filter = true)
    IPage<CouponPageBean> pageCoupon(Page<CouponPageBean> objectPage, @Param("companyWechatIds")List<String> companyWechatIds,
                                     @Param("couponName")String couponName, @Param("couponType")String couponType, @Param("flag")String flag);


    @SqlParser(filter = true)
    List<CouponExportBean> exportCoupon(@Param("companyWechatIds")List<String> companyWechatIds,
                                        @Param("couponName")String couponName, @Param("couponType")String couponType, @Param("flag")String flag);

    @SqlParser(filter = true)
    List<CouponExportBean> exportSelfCoupon(@Param("companyWechatIds")List<String> companyWechatIds,
                                            @Param("couponName")String couponName, @Param("couponType")String couponType, @Param("flag")String flag);

    IPage<CouponVO> couponList(Page page, @Param("ex") ZfireParamBean zfireParam);
}
