package me.zhengjie.modules.dm.order.service;

import me.zhengjie.modules.dm.order.domain.DmOrderPayment;
import me.zhengjie.modules.dm.order.service.dto.DmOrderPaymentDto;
import me.zhengjie.modules.dm.order.service.dto.DmOrderPaymentQueryCriteria;
import org.springframework.data.domain.Pageable;

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

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

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

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

    /**
     * 创建
     * @param resources /
     * @return DmOrderItemDto
     */
    DmOrderPaymentDto create(DmOrderPayment resources);

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

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

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