Merge branch 'develop' into dev/dev

This commit is contained in:
2024-01-04 17:15:03 +08:00
3 changed files with 18 additions and 9 deletions

View File

@@ -146,7 +146,7 @@ public class MinioUtil {
String fileName = file.getOriginalFilename();
String[] split = fileName.split("\\.");
if (split.length > 1) {
fileName = path + "/" + UUID.randomUUID() + "." + split[1];
fileName = path + "/" + UUID.randomUUID() + "." + split[split.length - 1];
} else {
fileName = path + "/" + UUID.randomUUID();
}

View File

@@ -190,10 +190,11 @@ public class ChatRobotServiceImpl implements ChatRobotService {
} else {
chatRobot.setSuccessful(1);
chatRobotMapper.insert(chatRobot);
for (int i = 0; i < array.size(); i++) {
if (i >= 3) {
continue;
}
int size = Math.min(array.size(), 4);
for (int i = 0; i < size; i++) {
// if (i >= 3) {
// continue;
// }
ChatRobotLibraryVO chatRobotLibraryVO = new ChatRobotLibraryVO();
String bucketName = sysImage;
String prefix = getPrefix(array.getString(i),chatSendDTO.getGender());
@@ -323,9 +324,9 @@ public class ChatRobotServiceImpl implements ChatRobotService {
String folder = minioPath.substring(0,minioPath.lastIndexOf("/"));
if ("mens_test".equals(substring)){
switch (folder){
case "bottom":
minioPath = minioPath.replace("bottom","bottoms");
break;
// case "bottom":
// minioPath = minioPath.replace("bottom","bottoms");
// break;
case "top":
minioPath = minioPath.replace("top","tops");
break;

View File

@@ -144,7 +144,15 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
// String suffix = pictureCollectonName.substring(pictureCollectonName.lastIndexOf("."));
// //获取图片前缀
// String prefix = pictureCollectonName.substring(0,pictureCollectonName.lastIndexOf("."));
element.setName(uploadDTO.getFile().getName());
String originalFilename = uploadDTO.getFile().getOriginalFilename();
if (originalFilename != null && originalFilename.contains(".")) {
// 如果文件名包含点号,则去除最后一个点及其后面的内容
int lastDotIndex = originalFilename.lastIndexOf(".");
if (lastDotIndex != -1) {
originalFilename = originalFilename.substring(0, lastDotIndex);
}
}
element.setName(originalFilename);
element.setUrl(path);
//按时区计算
element.setCreateDate(DateUtil.getByTimeZone(uploadDTO.getTimeZone()));