package com.kmall.api.dao;

import com.kmall.api.entity.GoodsVo;
import com.kmall.manager.dao.BaseDao;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author Scott
 * @email
 * @date 2017-08-11 09:16:45
 */
@Component
public interface ApiGoodsMapper extends BaseDao<GoodsVo> {

    List<GoodsVo> queryHotGoodsList(Map<String, Object> params);

    List<GoodsVo> queryCatalogProductList(Map<String, Object> params);

    GoodsVo queryObjectByStoreId(@Param("id") Long id, @Param("storeId") Long storeId);

    /**
     * 更新共享库存
     *
     * @return
     */
    void updateGoodsStock(GoodsVo goodsVo);

    Integer selectCountByCatalogProductList(Map<String, Object> params);

    void updateByGoodsShareStock(GoodsVo goodsVo);
}
