Merge branch 'develop' into dev/dev
This commit is contained in:
@@ -146,7 +146,7 @@ public class MinioUtil {
|
|||||||
String fileName = file.getOriginalFilename();
|
String fileName = file.getOriginalFilename();
|
||||||
String[] split = fileName.split("\\.");
|
String[] split = fileName.split("\\.");
|
||||||
if (split.length > 1) {
|
if (split.length > 1) {
|
||||||
fileName = path + "/" + UUID.randomUUID() + "." + split[1];
|
fileName = path + "/" + UUID.randomUUID() + "." + split[split.length - 1];
|
||||||
} else {
|
} else {
|
||||||
fileName = path + "/" + UUID.randomUUID();
|
fileName = path + "/" + UUID.randomUUID();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,10 +190,11 @@ public class ChatRobotServiceImpl implements ChatRobotService {
|
|||||||
} else {
|
} else {
|
||||||
chatRobot.setSuccessful(1);
|
chatRobot.setSuccessful(1);
|
||||||
chatRobotMapper.insert(chatRobot);
|
chatRobotMapper.insert(chatRobot);
|
||||||
for (int i = 0; i < array.size(); i++) {
|
int size = Math.min(array.size(), 4);
|
||||||
if (i >= 3) {
|
for (int i = 0; i < size; i++) {
|
||||||
continue;
|
// if (i >= 3) {
|
||||||
}
|
// continue;
|
||||||
|
// }
|
||||||
ChatRobotLibraryVO chatRobotLibraryVO = new ChatRobotLibraryVO();
|
ChatRobotLibraryVO chatRobotLibraryVO = new ChatRobotLibraryVO();
|
||||||
String bucketName = sysImage;
|
String bucketName = sysImage;
|
||||||
String prefix = getPrefix(array.getString(i),chatSendDTO.getGender());
|
String prefix = getPrefix(array.getString(i),chatSendDTO.getGender());
|
||||||
@@ -323,9 +324,9 @@ public class ChatRobotServiceImpl implements ChatRobotService {
|
|||||||
String folder = minioPath.substring(0,minioPath.lastIndexOf("/"));
|
String folder = minioPath.substring(0,minioPath.lastIndexOf("/"));
|
||||||
if ("mens_test".equals(substring)){
|
if ("mens_test".equals(substring)){
|
||||||
switch (folder){
|
switch (folder){
|
||||||
case "bottom":
|
// case "bottom":
|
||||||
minioPath = minioPath.replace("bottom","bottoms");
|
// minioPath = minioPath.replace("bottom","bottoms");
|
||||||
break;
|
// break;
|
||||||
case "top":
|
case "top":
|
||||||
minioPath = minioPath.replace("top","tops");
|
minioPath = minioPath.replace("top","tops");
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -144,7 +144,15 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
|||||||
// String suffix = pictureCollectonName.substring(pictureCollectonName.lastIndexOf("."));
|
// String suffix = pictureCollectonName.substring(pictureCollectonName.lastIndexOf("."));
|
||||||
// //获取图片前缀
|
// //获取图片前缀
|
||||||
// String prefix = pictureCollectonName.substring(0,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.setUrl(path);
|
||||||
//按时区计算
|
//按时区计算
|
||||||
element.setCreateDate(DateUtil.getByTimeZone(uploadDTO.getTimeZone()));
|
element.setCreateDate(DateUtil.getByTimeZone(uploadDTO.getTimeZone()));
|
||||||
|
|||||||
Reference in New Issue
Block a user