package cn.ysk.cashier.service.shop;

import cn.ysk.cashier.dto.shop.ShopStorageGoodDto;
import cn.ysk.cashier.dto.shop.TbShopStorageGoodDto;
import cn.ysk.cashier.dto.shop.TbShopStorageGoodQueryCriteria;
import cn.ysk.cashier.pojo.shop.TbShopStorageGood;
import org.springframework.data.domain.Pageable;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

/**
 * @author ww
 * @date 2024-05-21
 **/
public interface TbShopStorageGoodService {

    /**
     * 查询数据分页
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map<String,Object>
     */
    Map<String,Object> queryAll(TbShopStorageGoodQueryCriteria criteria, Pageable pageable);

    /**
     * 查询所有数据不分页
     * @param criteria 条件参数
     * @return List<TbShopStorageGoodDto>
     */
    List<TbShopStorageGoodDto> queryAll(TbShopStorageGoodQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param id ID
     * @return TbShopStorageGoodDto
     */
    TbShopStorageGoodDto findById(Integer id);

    /**
     * 创建
     * @param resources /
     * @return TbShopStorageGoodDto
     */
    TbShopStorageGoodDto create(TbShopStorageGood resources);
    void create(ShopStorageGoodDto resources);

    /**
     * 编辑
     * @param resources /
     */
    void update(TbShopStorageGood resources);

    /**
     * 多选删除
     * @param ids /
     */
    void deleteAll(Integer[] ids);

    /**
     * 导出数据
     * @param all 待导出的数据
     * @param response /
     * @throws IOException /
     */
    void download(List<TbShopStorageGoodDto> all, HttpServletResponse response) throws IOException;
}