package com.gree.mall.manager.commonmapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gree.mall.manager.bean.coupon.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CouponDateMapper {

    /**
     * 券数据
     * @param couponId
     * @return
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    CouponDataBean data(@Param("couponId")String couponId);

    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    List<CouponTagBean> couponTagDetail(@Param("couponId")String couponId);

    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    List<CouponUserBean> couponTagUser(@Param("couponId")String couponId);

    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    List<CouponUserTypeBean> reissueCouponUser(@Param("companyWechatId")String companyWechatId, @Param("couponId")String couponId);

    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    IPage<CouponPageBean> pageCoupon(Page<CouponPageBean> objectPage, @Param("companyWechatIds")List<String> companyWechatIds,
                                     @Param("couponName")String couponName, @Param("couponType")String couponType, @Param("flag")String flag);


    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    List<CouponExportBean> exportCoupon(@Param("companyWechatIds")List<String> companyWechatIds,
                                        @Param("couponName")String couponName, @Param("couponType")String couponType, @Param("flag")String flag);

    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    List<CouponExportBean> exportSelfCoupon(@Param("companyWechatIds")List<String> companyWechatIds,
                                            @Param("couponName")String couponName, @Param("couponType")String couponType, @Param("flag")String flag);
}
