BUGFIX:检查所有异常提示的语言是否都做了多语言
This commit is contained in:
@@ -2,6 +2,7 @@ package com.ai.da.common.utils;
|
||||
|
||||
import com.ai.da.common.config.exception.BusinessException;
|
||||
import com.ai.da.common.constant.CommonConstant;
|
||||
import com.ai.da.common.response.ResultEnum;
|
||||
import com.ai.da.mapper.primary.entity.ObjectItem;
|
||||
import io.minio.*;
|
||||
import io.minio.errors.*;
|
||||
@@ -361,7 +362,7 @@ public class MinioUtil {
|
||||
|
||||
public void deleteObject(String path) {
|
||||
if (!path.contains("/")) {
|
||||
throw new BusinessException("The path is error!");
|
||||
throw new BusinessException("the.path.is.error");
|
||||
}
|
||||
int index = path.indexOf("/");
|
||||
String bucketName = path.substring(0, index);
|
||||
@@ -420,7 +421,7 @@ public class MinioUtil {
|
||||
return LocalCacheUtils.getPresignedUrlCache(path);
|
||||
} else {
|
||||
if (!path.contains("/")) {
|
||||
throw new BusinessException("The path is error!");
|
||||
throw new BusinessException("the.path.is.error");
|
||||
}
|
||||
int index = path.indexOf("/");
|
||||
String bucketName = path.substring(0, index);
|
||||
@@ -434,7 +435,7 @@ public class MinioUtil {
|
||||
public String getPreSignedUrl(String path, int expiry, boolean resetCache) {
|
||||
if (resetCache || LocalCacheUtils.getPresignedUrlCache(path) == null) {
|
||||
if (!path.contains("/")) {
|
||||
throw new BusinessException("The path is error!");
|
||||
throw new BusinessException("the.path.is.error");
|
||||
}
|
||||
int index = path.indexOf("/");
|
||||
String bucketName = path.substring(0, index);
|
||||
@@ -675,7 +676,7 @@ public class MinioUtil {
|
||||
.build());
|
||||
} catch (MinioException | IOException | NoSuchAlgorithmException | InvalidKeyException e){
|
||||
log.error("图片上传到minio出错,{}", e.getMessage());
|
||||
throw new BusinessException("file upload exception");
|
||||
throw new BusinessException("file.upload.fail");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -713,7 +714,7 @@ public class MinioUtil {
|
||||
// return base64Image;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
throw new BusinessException("透明图添加白色背景失败");
|
||||
throw new BusinessException("white.bg.add.fail", ResultEnum.PROMPT.getCode());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ public class S3Util {
|
||||
|
||||
public void deleteObject(String path) {
|
||||
if (!path.contains("/")) {
|
||||
throw new BusinessException("The path is error!");
|
||||
throw new BusinessException("the.path.is.error");
|
||||
}
|
||||
int index = path.indexOf("/");
|
||||
String bucketName = path.substring(0, index);
|
||||
@@ -244,7 +244,7 @@ public class S3Util {
|
||||
return LocalCacheUtils.getPresignedUrlCache(path);
|
||||
} else {
|
||||
if (!path.contains("/")) {
|
||||
throw new BusinessException("The path is error!");
|
||||
throw new BusinessException("the.path.is.error");
|
||||
}
|
||||
int index = path.indexOf("/");
|
||||
String bucketName = path.substring(0, index);
|
||||
@@ -258,7 +258,7 @@ public class S3Util {
|
||||
public String getPreSignedUrl(String path, int expiry, boolean resetCache) {
|
||||
if (resetCache || LocalCacheUtils.getPresignedUrlCache(path) == null) {
|
||||
if (!path.contains("/")) {
|
||||
throw new BusinessException("The path is error!");
|
||||
throw new BusinessException("the.path.is.error");
|
||||
}
|
||||
int index = path.indexOf("/");
|
||||
String bucketName = path.substring(0, index);
|
||||
|
||||
Reference in New Issue
Block a user