package com.gree.mall.miniapp.commonmapper;

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

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

@Mapper
public interface GoodsSpecDetailMapper {

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

    /**
     * 商品评价列表
     */
    @SqlParser(filter = true)
    public IPage<GoodsComment> goodsCommentList(IPage page,@Param("companyWechatId")String companyWechatId,
                                                @Param("goodsId") String goodsId,@Param("tag") String tag);

    /**
     * 商品评价汇总
     */
    @SqlParser(filter = true)
    public List<CommentTagCount> goodsCommentCount(@Param("companyWechatId")String companyWechatId,@Param("goodsId") String goodsId);


    /**
     * 套购商品列表
     */
    @SqlParser(filter = true)
    public List<GoodsPackageBean> queryGoodsPackage(@Param("userId") String userId,
                                                    @Param("userType") String userType,
                                                    @Param("goodsId") String goodsId,
                                                    @Param("companyWechatId") String companyWechatId);


    /**
     * 商品列表
     */
    @SqlParser(filter = true)
    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);


}
