package cn.ysk.cashier.service.product;

import cn.ysk.cashier.dto.product.StockQueryDto;
import cn.ysk.cashier.vo.StockUpdateValueVO;
import cn.ysk.cashier.vo.StockUpdateWarnLineVO;
import cn.ysk.cashier.vo.StockV2Vo;
import cn.ysk.cashier.vo.StockVo;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface StockService {

    /**
     * 查询数据分页
     * @param criteria 条件
     * @return Map<String,Object>
     */
    Page queryAll(StockQueryDto criteria, Integer page, Integer size);

    Page<StockV2Vo> queryAllV2(StockQueryDto criteria, Integer page, Integer size);

    List<StockV2Vo> queryProductSku(String productId);

    void download(StockQueryDto summaryDto, HttpServletResponse response) throws IOException;

    void downloadV2(StockQueryDto summaryDto, HttpServletResponse response) throws IOException;

    void importExcel(String shopId, MultipartFile file) throws IOException;

    void importExcelV2(String shopId, MultipartFile file) throws IOException;

    void inHouse(String shopId,List<StockVo> list);

    void updateIsStock(Integer proId, String shopId,Integer isStock);

    void updateProductStatus(StockUpdateValueVO updateValueVO);

    /**
     * 商品库存警戒线设置
     * @param stockUpdateWarnLineVO 警戒线
     */
    void updateProductWarnLine(StockUpdateWarnLineVO stockUpdateWarnLineVO);

    /**
     * 上下架商品
     *
     * @param shopId      店铺id
     * @param skuId       ski
     * @param isGrounding
     */
    void grounding(Integer shopId, Integer skuId, Boolean isGrounding);
}
