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

import com.fzm.mall.server.front.goods.model.Shop;
import com.fzm.mall.server.front.user.model.Follow;
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-04-01
 */
public interface FollowMapper extends BaseMapper<Follow> {


    @Select("select b.* from user_follow a left join shop b on a.merchant_id = b.merchant_id where a.uid =#{uid} and a.status = 1 order by a.update_time limit #{start},#{size} ")
    List<Shop> getFollow(@Param("uid") String uid, @Param("start") int start, @Param("size") Integer size);
}
