package com.multictrl.modules.business.service;

import cn.hutool.json.JSONObject;
import com.multictrl.common.page.PageData;
import com.multictrl.common.service.CrudService;
import com.multictrl.modules.business.dao.MediaFileDao;
import com.multictrl.modules.business.dto.MediaFileDTO;
import com.multictrl.modules.business.entity.MediaFileEntity;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.ResponseEntity;

import java.util.List;
import java.util.Map;

/**
 * 媒体资源
 *
 * @author Sdy
 * @since 1.0.0 2026-04-29
 */
public interface MediaFileService extends CrudService<MediaFileEntity, MediaFileDTO> {

    //图库分页
    PageData<JSONObject> pageList(Map<String, Object> params);

    //获取相簿
    PageData<MediaFileDTO> getAlbum(Map<String, Object> params);

    //删除媒体文件
    void deleteMediaFile(Long[] ids);

    //下载媒体文件
    ResponseEntity<InputStreamResource> downloadMedia(Long id);

    //下载媒体zip
    ResponseEntity<InputStreamResource> downloadMediaByZip(Map<String, Object> params);

    //下载文件地址
    Map<String, List<String>> oneClickGetDownloadPath(Map<String, Object> params);

    //条件删除媒体
    void conditionDeleteMedia(Map<String, Object> params);

    //获取dao
    MediaFileDao getDao();
}