jiangqs
2023-08-03 b95715d5cdc806cbb15cc7f49c538e61f5ab5dc6
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
package com.ruoyi.system.api.service;
 
import com.ruoyi.system.api.domain.dto.CodeGetDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.poji.sys.SysFile;
import com.ruoyi.system.api.factory.RemoteFileFallbackFactory;
 
/**
 * 文件服务
 * 
 * @author jqs
 */
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
public interface RemoteFileService
{
    /**
     * 上传文件
     *
     * @param file 文件信息
     * @return 结果
     */
    @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file);
 
    /**
     * @description  生成二维码
     * @author  jqs
     * @date    2023/8/3 12:57
     * @param codeGetDto
     * @return  R<String>
     */
    @PostMapping("/file/getCodeUrl")
    public R<String> getAppOrderTotal(@RequestBody CodeGetDto codeGetDto);
}