package com.kidgrow.filecenter.feign.fallback;
import com.kidgrow.common.model.ResultBody;
import com.kidgrow.filecenter.feign.FileService;
import com.kidgrow.filecenter.model.FileInfo;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
import java.util.Map;
/**
* 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020
*
* @Description:
* @Project:
* @CreateDate: Created in 2020/2/22 14:33
* @Author: liuke
*/
@Slf4j
@Component
public class FileServiceFallbackFactory implements FallbackFactory {
@Override
public FileService create(Throwable throwable) {
return new FileService() {
@Override
public FileInfo upload(@RequestParam("file") MultipartFile file) {
return null;
}
@Override
public FileInfo feignUpload(@RequestPart("file") MultipartFile file,@RequestParam String imgType) {
return null;
}
@Override
public FileInfo baseUplaod(String file, String imgType, String hospitalId, String departmentId) {
return null;
}
@Override
public ResultBody baseDownLoad(Map map) throws Exception {
return null;
}
@Override
public FileInfo byteUplaod(String fileName, byte[] bytes) {
return null;
}
};
}
}