package com.kmall.admin.dao;

import com.kmall.admin.dto.GoodsDetailsDto;
import com.kmall.admin.entity.GoodsEntity;
import com.kmall.manager.dao.BaseDao;
import org.apache.ibatis.annotations.Param;

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

/**
 * Dao
 *
 * @author Scott
 * @email
 * @date 2017-08-21 21:19:49
 */
public interface GoodsDao extends BaseDao<GoodsEntity> {
    Long queryMaxId();

    GoodsEntity queryObjectBySn(String goodsSn);

    GoodsEntity queryObjectByProdBarcodeAndBizType(@Param("prodBarcode")String prodBarcode, @Param("storeId")Integer storeId);

    GoodsEntity queryObjectByProdBarcodeAndStore(@Param("prodBarcode")String prodBarcode, @Param("storeId")Integer storeId);

    GoodsDetailsDto queryGoodsDetailsByProdBarcode(@Param("prodBarcode")String prodBarcode);

    List<GoodsEntity> querySame(Map<String, Object> map);

    List<GoodsEntity> queryObjectByProdBarcode(@Param("prodBarcode") String prodBarcode, @Param("merchSn") String merchSn,@Param("goodsId")Long id);

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

    GoodsEntity queryGoodsByGoodsSnAndStoreId(@Param("goodsSn") String goodsSn, @Param("storeId") Long storeId);
}
