Pārlūkot izejas kodu

fix:合并1.0

liaoyitao 1 mēnesi atpakaļ
vecāks
revīzija
882e7326c9

+ 1 - 0
src/main/java/com/lqkj/link/config/ThreadPoolConfig.java

@@ -5,6 +5,7 @@ import org.springframework.context.annotation.Configuration;
5 5
 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
6 6
 
7 7
 import java.util.concurrent.Executor;
8
+import java.util.concurrent.ThreadPoolExecutor;
8 9
 
9 10
 @Configuration
10 11
 public class ThreadPoolConfig {

+ 3 - 0
src/main/java/com/lqkj/link/module/authority/service/UserInfoService.java

@@ -1,6 +1,9 @@
1 1
 package com.lqkj.link.module.authority.service;
2 2
 
3
+import cn.hutool.core.util.RandomUtil;
4
+import com.lqkj.link.module.authority.domain.Captcha;
3 5
 import com.lqkj.link.module.authority.domain.UserInfo;
6
+import com.lqkj.link.module.authority.repository.CaptchaRepository;
4 7
 import com.lqkj.link.module.authority.repository.RoleInfoRepository;
5 8
 import com.lqkj.link.module.authority.repository.UserInfoRepository;
6 9
 import com.lqkj.link.util.FileUtils;

+ 0 - 16
src/main/java/com/lqkj/link/util/AliOSSUtils.java

@@ -122,22 +122,6 @@ public class AliOSSUtils {
122 122
             }
123 123
         } while (result.isTruncated());
124 124
         return size;
125
-        try {
126
-            InputStream inputStream = file.getInputStream();
127
-            // 避免文件覆盖
128
-            String originalFilename = file.getOriginalFilename();
129
-            String fileName = "file/" + LocalDate.now() + "/" + UUID.randomUUID() + originalFilename.substring(originalFilename.lastIndexOf("."));
130
-            //上传文件到 OSS
131
-            OSS ossClient = new OSSClientBuilder().build(aliProperties.getEndpoint(), aliProperties.getAccessKeyId(), aliProperties.getAccessKeySecret());
132
-            threadPoolUtil.getTaskExecutor().execute(() -> {
133
-                ossClient.putObject(aliProperties.getBucketName(), fileName, inputStream);
134
-                ossClient.shutdown();
135
-            });
136
-            //文件访问路径
137
-            return aliProperties.getOsspath().split("//")[0] + "//" + aliProperties.getBucketName() + "." + aliProperties.getOsspath().split("//")[1] + "/" + fileName;
138
-        } catch (IOException e) {
139
-            throw new RuntimeException(e);
140
-        }
141 125
     }
142 126
 
143 127
     public void deleteModel(String path) {