package com.hai.goods.service;

import com.hai.entity.GoodsSku;

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

/**
 * @serviceName GoodsSkuService.java
 * @author Sum1Dream
 * @version 1.0.0
 * @Description // 商品sku业务
 * @createTime 18:03 2023/4/12
 **/
public interface GoodsSkuService {

    /**
     * @Author Sum1Dream
     * @Name insertGoodsSku
     * @Description // 新增商品SKu
     * @Date 15:08 2023/4/11
     * @Param [GoodsSku]
     * @Return void
     */
    void insertGoodsSku(GoodsSku goodsSku);

    /**
     * @Author Sum1Dream
     * @Name updateGoodsSku
     * @Description // 更新商品SKu
     * @Date 15:14 2023/4/11
     * @Param [GoodsSku]
     * @Return void
     */
    void updateGoodsSku(GoodsSku goodsSku);

    /**
     * @Author Sum1Dream
     * @Name getGoodsSkuList
     * @Description // 查询商品SKu列表
     * @Date 15:17 2023/4/11
     * @Param [map]
     * @Return java.util.List<com.hai.entity.GoodsSku>
     */
    List<GoodsSku> getGoodsSkuList(Map<String , Object> map);

    List<GoodsSku> getGoodsSkuList(Long goodsId);

    /**
     * @Author Sum1Dream
     * @Name findGoodsSkuById
     * @Description // 根据id商品SKu
     * @Date 16:19 2023/4/11
     * @Param [id]
     * @Return com.hai.entity.GoodsSku
     */
    GoodsSku findGoodsSkuById(Long id);

    /**
     * @Author Sum1Dream
     * @Name decreaseStockNum
     * @Description // 减少库存
     * @Date 17:34 2023/4/19
     * @Param [skuId, num]
     * @Return void
     */
    void decreaseStockNum(Long skuId , Integer num);
    
}
