Merge branch 'dev_nc2k_20251213' into dev
# Conflicts: # mhd-auth/src/main/resources/bootstrap.yml # mhd-gateway/src/main/resources/bootstrap.yml # mhd-modules/mhd-system/src/main/resources/bootstrap.yml # mhd-user-center/src/main/resources/bootstrap.yml # mhd_finance/src/main/resources/bootstrap.yml # mhd_product/src/main/resources/bootstrap.yml # mhd_thrid_party/src/main/resources/bootstrap.yml # mhd_transport/src/main/resources/bootstrap.yml
This commit is contained in:
@@ -129,6 +129,17 @@
|
||||
<groupId>com.mhd</groupId>
|
||||
<artifactId>mhd-common-log</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
<version>8.4.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.8.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
+18
@@ -43,9 +43,12 @@ import com.mhd.common.core.annotation.fieldsetvalue.NeedSetValueField;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import minio.MinIoUploadService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
@@ -95,6 +98,8 @@ public class MenuApplicationService {
|
||||
private SpecialServiceFeign logisticsServiceFeign;
|
||||
@Resource
|
||||
private MenuUtils menuUtils;
|
||||
@Autowired(required = false)
|
||||
private MinIoUploadService minIoUploadService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -272,6 +277,19 @@ public class MenuApplicationService {
|
||||
return ossService.uploadOss(file);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 上传文件到oss
|
||||
*
|
||||
* @param file 文件
|
||||
* @return 文件路径
|
||||
*/
|
||||
public String uploadMinio(MultipartFile file)
|
||||
{
|
||||
return minIoUploadService.uploadFileToMinIo(file);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据组织id查询菜单集合
|
||||
*
|
||||
|
||||
@@ -162,7 +162,8 @@ public class MenuApi extends BaseController {
|
||||
}
|
||||
|
||||
}
|
||||
return AjaxResult.success(menuApplicationService.uploadOss(fileUpload));
|
||||
//return AjaxResult.success(menuApplicationService.uploadOss(fileUpload));
|
||||
return AjaxResult.success(menuApplicationService.uploadMinio(file));
|
||||
}
|
||||
|
||||
@PostMapping("/uploadFeign")
|
||||
|
||||
@@ -18,13 +18,17 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 127.0.0.1:8848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
# server-addr: 10.33.0.129:6010
|
||||
server-addr: 10.33.0.129:6010
|
||||
#线上正式环境
|
||||
# server-addr: 10.102.192.105:6848
|
||||
config:
|
||||
server-addr: 127.0.0.1:8848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
# server-addr: 10.33.0.129:6010
|
||||
server-addr: 10.33.0.129:6010
|
||||
#线上正式环境
|
||||
# server-addr: 10.102.192.105:6848
|
||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||
file-extension: yml #默认properties
|
||||
# 共享配置
|
||||
|
||||
Reference in New Issue
Block a user