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

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

import java.util.List;

/**
 * <p>
 * 店铺中心-店铺导航管理 Mapper 接口
 * </p>
 *
 * @author fzm
 * @since 2021-05-31
 */
public interface ShopNavigationGoodsMapper extends BaseMapper<ShopNavigationGoods> {

    @Select("select * from goods_spu a left join shop_navigation_goods b on a.goods_id = b.goods_id where b.navigation_id = #{navigationId} and b.merchant_id = #{merchantId} and a.status = 1 limit ${start},${end}")
    List<SaleHotVo>  getGoodsVo(@Param("merchantId") String paramA, @Param("navigationId") String paramB, @Param("start") int start, @Param("end") int end);
}
