Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
shahaibo
2023-11-23 14:05:20 +08:00

View File

@@ -194,7 +194,7 @@ public class ChatRobotServiceImpl implements ChatRobotService {
}
ChatRobotLibraryVO chatRobotLibraryVO = new ChatRobotLibraryVO();
String bucketName = sysImage;
String prefix = getPrefix(array.getString(i));
String prefix = getPrefix(array.getString(i),chatSendDTO.getGender());
String path = prefix;
// String path = prefix + array.getString(i);
QueryWrapper<Library> qw = new QueryWrapper<>();
@@ -314,22 +314,24 @@ public class ChatRobotServiceImpl implements ChatRobotService {
}
}
private String getPrefix(String minioPath){
String substring = minioPath.substring(minioPath.lastIndexOf("/") + 1, minioPath.lastIndexOf("_"));
String folder = minioPath.substring(0,minioPath.lastIndexOf("/"));
if ("mens_test".equals(substring)){
switch (folder){
case "bottom":
minioPath = minioPath.replace("bottom","bottoms");
break;
case "top":
minioPath = minioPath.replace("top","tops");
break;
case "outer":
minioPath = minioPath.replace("outer","outwear");
break;
private String getPrefix(String minioPath,String gender){
if (gender.equals("Male")){
String substring = minioPath.substring(minioPath.lastIndexOf("/") + 1, minioPath.lastIndexOf("_"));
String folder = minioPath.substring(0,minioPath.lastIndexOf("/"));
if ("mens_test".equals(substring)){
switch (folder){
case "bottom":
minioPath = minioPath.replace("bottom","bottoms");
break;
case "top":
minioPath = minioPath.replace("top","tops");
break;
case "outer":
minioPath = minioPath.replace("outer","outwear");
break;
}
return "images/male/" + minioPath;
}
return "images/male/" + minioPath;
}
return "images/female/" + minioPath;
}