package org.security.desk.feign;

import org.security.common.constant.CommonConstant;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.IOException;

/**
 * @author ：wzf
 * @apiNote ：影像平台feign接口
 * @since ：Created in 2022/9/9 17:09
 */

@FeignClient(
	value = CommonConstant.APPLICATION_DESK_NAME,
	fallback = ImagesClientFallback.class
)
public interface IImagesClient {
	String API_PREFIX = "/client";
	String IMAGES_DATA = API_PREFIX + "/detail";
	String REMOVE_IMAGES = API_PREFIX + "/remove";
	String FILE_SAVE_PATH = API_PREFIX + "/file-save-path";


	/**
	 * 获取影像平台附件详情
	 * @param busiBeginDate 业务开始日期
	 * @param contentId 附件标识id
	 * @return
	 */
	@GetMapping(IMAGES_DATA)
	R<String> getFileData(@RequestParam String busiBeginDate, @RequestParam String contentId, @RequestParam String fileName);


	/**
	 * 删除影像平台附件
	 * @param busiBeginDate 业务开始日期
	 * @param contentId 附件标识id
	 * @return
	 */
	@GetMapping(REMOVE_IMAGES)
	R removeFileData(@RequestParam String busiBeginDate, @RequestParam String contentId);


	/**
	 * 获取文件存储位置
	 */
	@GetMapping(FILE_SAVE_PATH)
	R<String> getFileSavePath();
}
