package cn.ysk.cashier.service.shop;

import cn.ysk.cashier.dto.shop.TbShopStorageRecordDto;
import cn.ysk.cashier.dto.shop.TbShopStorageRecordQueryCriteria;
import cn.ysk.cashier.pojo.shop.TbShopStorageRecord;
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 TbShopStorageRecordService {

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

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

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

    /**
     * 创建
     * @param resources /
     * @return TbShopStorageRecordDto
     */
    TbShopStorageRecordDto create(TbShopStorageRecord resources);

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

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

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