package shop.alien.mapper.second;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import shop.alien.entity.second.vo.SecondCommentVo;
import shop.alien.entity.second.vo.SecondGoodsRecommendVo;
import shop.alien.entity.store.StoreComment;

import java.util.List;


/**
 * 二手商品映射器
 */
public interface SecondRecommendMapper extends BaseMapper<SecondGoodsRecommendVo> {
    /**
     * 自定义分页查询
     */
    IPage<SecondGoodsRecommendVo> getSecondRecommendByPage(IPage<SecondGoodsRecommendVo> page, @Param("userId") Integer userId, @Param("position") String position, @Param("typeId") Integer typeId, @Param("phoneId") String phoneId, @Param("radiusKm") String radiusKm);

    IPage<SecondGoodsRecommendVo> querySecondConcernByPage(IPage<SecondGoodsRecommendVo> page, @Param("userId") Integer userId, @Param("phoneId") String phoneId, @Param("position") String position, @Param("collectUserType") Integer collectUserType, @Param("collectRefId") Integer collectRefId, @Param("fansUserType") Integer fansUserType, @Param("fansRefId") Integer fansRefId);

    IPage<SecondGoodsRecommendVo> querySecondNewGoodsByPage(IPage<SecondGoodsRecommendVo> page,@Param("userId") String userId, @Param("phoneId") String phoneId, @Param("position") String position, @Param("radiusKm") String radiusKm, @Param("timeRange") Integer timeRange, @Param("collectUserType") Integer collectUserType, @Param("collectRefId") Integer collectRefId);

    List<SecondCommentVo> querySecondCommentInfo(@Param("ids") List<Integer> ids);

    SecondGoodsRecommendVo querySecondGoodsDetail(@Param("goodsId") Integer goodsId, @Param("phoneId") String phoneId, @Param("position") String position, @Param("collectUserType") Integer collectUserType, @Param("collectRefId") Integer collectRefId);

    SecondGoodsRecommendVo querySecondGoodsDetailWithoutPosition(@Param("goodsId") Integer goodsId, @Param("phoneId") String phoneId, @Param("collectUserType") Integer collectUserType, @Param("collectRefId") Integer collectRefId);
}