package org.nl.acs.materialbase.service;

import org.nl.acs.common.base.PageInfo;
import org.nl.acs.common.base.CommonService;
import org.nl.acs.materialbase.domain.Materialbase;
import org.nl.acs.materialbase.service.dto.MaterialbaseDto;
import org.nl.acs.materialbase.service.dto.MaterialbaseQueryParam;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Set;

/**
* @author jiaolm
* @date 2023-05-09
*/
public interface MaterialbaseService extends CommonService<Materialbase>  {

    static final String CACHE_KEY = "materialbase";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<MaterialbaseDto>
    */
    PageInfo<MaterialbaseDto> queryAll(MaterialbaseQueryParam query, Pageable pageable);

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

    Materialbase getById(String id);
    MaterialbaseDto findById(String id);

    /**
     * 插入一条新数据。
     */
    int insert(MaterialbaseDto resources);
    int updateById(MaterialbaseDto resources);
    int removeById(String id);
    int removeByIds(Set<String> ids);

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