package com.fuint.repository.mapper;

import com.fuint.repository.bean.GoodsBean;
import com.fuint.repository.bean.GoodsTopBean;
import com.fuint.repository.model.MtGoods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 *  商品 Mapper 接口
 *
 * Created by FSQ
 * CopyRight https://www.fuint.cn
 */
public interface MtGoodsMapper extends BaseMapper<MtGoods> {

    List<MtGoods> getStoreGoodsList(@Param("merchantId") Long merchantId, @Param("storeId") Long storeId, @Param("cateId") Long cateId);

    List<MtGoods> searchStoreGoodsList(@Param("merchantId") Long merchantId, @Param("storeId") Long storeId, @Param("keyword") String keyword);

    MtGoods getByGoodsNo(@Param("merchantId") Long merchantId, @Param("goodsNo") String goodsNo);

    Boolean updateInitSale(@Param("goodsId") Long goodsId);

    List<GoodsBean> selectGoodsList(@Param("merchantId") Long merchantId, @Param("storeId") Long storeId, @Param("cateId") Long cateId, @Param("keyword") String keyword);

    List<GoodsTopBean> getGoodsSaleTopList(@Param("merchantId") Long merchantId, @Param("storeId") Long storeId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    void removeMerchantGoods(@Param("merchantId") Long merchantId);

}
