package com.fzm.mall.server.front.user.mapper;

import com.fzm.mall.server.front.goods.model.vo.SaleHotVo;
import com.fzm.mall.server.front.user.model.Foot;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fzm.mall.server.front.user.model.vo.FootGoodsVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户浏览记录表 Mapper 接口
 * </p>
 *
 * @author fzm
 * @since 2021-05-24
 */
public interface FootMapper extends BaseMapper<Foot> {

    @Select("select b.merchant_id,b.goods_id,b.type,b.name,b.thumb,b.default_price,a.update_time from user_foot a left join goods_spu b on a.goods_id = b.goods_id where a.uid = #{uid} and a.is_delete = 0 order by a.update_time desc limit #{start},#{size}")
    List<FootGoodsVo> getGoods(@Param("uid") String uid, @Param("start") int start, @Param("size") Integer size);
}
