|
|
@@ -25,10 +25,12 @@ import com.yy.basedevelop.common.http.config.ThreadLocalContext;
|
|
|
import com.yy.basedevelop.common.util.DictUtil;
|
|
|
import com.yy.basedevelop.common.util.ExcelUtil;
|
|
|
import com.yy.basedevelop.common.util.HttpClientUtils;
|
|
|
+import com.yy.basedevelop.common.util.OSSUtil;
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
+import org.springframework.http.codec.multipart.FilePart;
|
|
|
import org.springframework.http.server.reactive.ServerHttpResponse;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.server.ServerWebExchange;
|
|
|
@@ -37,6 +39,7 @@ import reactor.core.publisher.Mono;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.random.RandomGenerator;
|
|
|
|
|
|
@@ -57,6 +60,25 @@ public class DemoController {
|
|
|
private DemoService demoService;
|
|
|
@Autowired
|
|
|
private RedisService redisService;
|
|
|
+ @Autowired
|
|
|
+ private OSSUtil oSSUtil;
|
|
|
+
|
|
|
+ @PostMapping("listoss")
|
|
|
+ public TestDemoDto listoss(@RequestPart("file") FilePart filePart,
|
|
|
+ @RequestPart("description") String description,
|
|
|
+ @RequestPart("path") String path) {
|
|
|
+ log.info("接收的listoss=:{},path={}", description,path);
|
|
|
+
|
|
|
+
|
|
|
+ String ossstr=oSSUtil.upLoadInputStream(filePart, "esgin" + path);
|
|
|
+
|
|
|
+
|
|
|
+ TestDemoDto dto1 = new TestDemoDto();
|
|
|
+ dto1.setName("返回名字oss");
|
|
|
+ dto1.setAge(25);
|
|
|
+ dto1.setOssUrl(ossstr);
|
|
|
+ return dto1;
|
|
|
+ }
|
|
|
|
|
|
@PostMapping("listname7")
|
|
|
public Mono<TestDemoDto> list566d(@RequestBody TestDemoDto dto) {
|