package com.gree.mall.miniapp.commonmapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gree.mall.miniapp.bean.goods.*;
import com.gree.mall.miniapp.plus.entity.CommonTemplate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface GoodsSpecDetailMapper {

    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    List<GoodsSpecSecBean> querySpecSec(@Param("goodsId") String goodsId);
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    CommonTemplate queryCommonTemplate(@Param("goodsId") String goodsId);
    /**
     * 团购商品列表
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    public IPage<PromotionGoodsBean> queryPromotionGoods(IPage page,
                                                         @Param("userId") String userId,
                                                         @Param("goodsCategoryId") String goodsCategoryId,
                                                         @Param("keyword") String keyword,
                                                         @Param("companyWechatId") String companyWechatId);

    /**
     * 商品评价列表
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    public IPage<GoodsComment> goodsCommentList(IPage page,@Param("companyWechatId")String companyWechatId,
                                                @Param("goodsId") String goodsId,@Param("tag") String tag);

    /**
     * 商品评价汇总
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    public List<CommentTagCount> goodsCommentCount(@Param("companyWechatId")String companyWechatId,@Param("goodsId") String goodsId);


    /**
     * 套购商品列表
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    public List<GoodsPackageBean> queryGoodsPackage(@Param("userId") String userId,
                                                    @Param("userType") String userType,
                                                    @Param("goodsId") String goodsId,
                                                    @Param("companyWechatId") String companyWechatId);


    /**
     * 商品列表
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    public IPage<GoodsNewBean> queryGoodsList(IPage page,
                                             @Param("brandIds") List<String> brandIds,
                                             @Param("minPrice") BigDecimal minPrice,
                                             @Param("maxPrice") BigDecimal maxPrice,
                                             @Param("tags") List<String> tags,
                                              @Param("userId") String userId,
                                             @Param("userType") String userType,
                                             @Param("keyword") String keyword,
                                             @Param("categoryId") String categoryId,
                                             @Param("sort") Integer sort,
                                             @Param("yjhx") Boolean yjhx,
                                             @Param("companyWechatId") String companyWechatId);


}
