package me.zhengjie.modules.flow.service;

import java.io.IOException;
import java.util.List;

import javax.servlet.http.HttpServletResponse;

import org.springframework.data.domain.Pageable;

import me.zhengjie.modules.flow.domain.Flow;
import me.zhengjie.modules.flow.service.dto.FlowDto;
import me.zhengjie.modules.flow.service.dto.FlowQueryCriteria;
import me.zhengjie.utils.PageResult;

public interface FlowService {

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

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

    /**
     * 根据ID查询
     * 
     * @param flowId ID
     * @return FlowDto
     */
    FlowDto findById(Long flowId);

    /**
     * 创建
     * 
     * @param resources /
     */
    void create(Flow resources);

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

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

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