package com.YuyeTech.TPlat.service;

import com.YuyeTech.TPlat.dataobject.Pictures;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

/**
 * @author:slambb
 * @date:2020/6/24
 */
public interface PicturesService {
    /**
     * 分页查询图片
     * @param pageable
     * @return
     */
    Page<Pictures> findAllByPageable(Pageable pageable);

    Pictures addPicture(Pictures pictures);

    Pictures addPictureAndFlush(Pictures pictures);

    Pictures findById(Integer id);

    void deletePictureById(Integer id);

    /**
     * 根据图片id 数组来 查找图片库对应的全部图片
     * @param ids
     * @return
     */
    List<Pictures> findAllByPictureIdList(List<Integer> ids);
}
