package com.kmall.admin.dao;

import com.kmall.admin.entity.ProductStoreRelaEntity;
import org.apache.ibatis.annotations.Param;
import com.kmall.manager.dao.BaseDao;

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

/**
 * Dao
 *
 * @author Scott
 * @email
 * @date 2017-12-27 19:12:46
 */
public interface ProductStoreRelaDao extends BaseDao<ProductStoreRelaEntity> {

    int deleteByGoodsId(Integer goodsId);

    ProductStoreRelaEntity queryObjectByStoreAndGoodsId(Map<String, Object> params);

    ProductStoreRelaEntity queryByStoreIdProductId(@Param("storeId") Long storeId, @Param("productId") Long productId);

    ProductStoreRelaEntity queryByGoodsIdAndStoreId(@Param("storeId") Long storeId, @Param("goodsId") Long goodsId);

    List<ProductStoreRelaEntity> queryByGoodsId(Long id);

    List<ProductStoreRelaEntity> querySameList(Map<String, Object> map);

    void updateStockNum(ProductStoreRelaEntity productStoreRelaEntity);

    void updateSellVolumeNum(ProductStoreRelaEntity productStoreRelaEntity);
}
