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.Collections;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 CollectionsMapper extends BaseMapper<Collections> {

    @Select("select b.* from user_collections a left join goods_spu b on a.goods_id = b.goods_id where a.uid = #{uid} and a.status = 1 order by a.update_time limit #{start},#{size}")
    List<SaleHotVo> getGoods(@Param("uid") String uid, @Param("start") int start, @Param("size") Integer size);
}
