ke
2024-05-13 659d3e60c6fe5e5bcd8c4cbb3dd8077e29f13a38
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package cn.gistack.resource.feign;
 
import cn.gistack.resource.entity.QieTuEntity;
import org.springblade.core.launch.constant.AppConstant;
import org.springblade.core.sms.model.SmsResponse;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
 
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
/**
 * IOssClient
 *
 * @author kelu
 */
import feign.Body;
import feign.Headers;
import org.springblade.core.launch.constant.AppConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
 
import java.io.InputStream;
 
@FeignClient(
    value = AppConstant.APPLICATION_RESOURCE_NAME,
    fallback = IOssClientFallback.class
)
public interface IOssClient {
    String API_PREFIX = "/client";
    String UPLOAD_QIETU = API_PREFIX + "/upload-qietu";
 
    @PostMapping(UPLOAD_QIETU)
    R uploadQietu(@RequestBody QieTuEntity qieTuEntity) throws IOException;
 
//    @PostMapping(UPLOAD_QIETU)
//    R uploadQietu(
//        @RequestParam("qietuHashMap") HashMap<String,String> qietuHashMap
//        ,@RequestParam("resGuid")String resGuid
//        ) throws IOException;
 
 
    String UPLOAD_FILE = API_PREFIX + "uploadFile";
 
    @PostMapping(value = UPLOAD_FILE,consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String uploadFile(@RequestParam("fileName") String fileName, @RequestPart("file") MultipartFile file) throws Exception;
}