BUGFIX: 机器人;

This commit is contained in:
shahaibo
2023-10-12 10:27:52 +08:00
parent 1ff64e01e5
commit 95174707d8

View File

@@ -197,17 +197,17 @@ public class ChatRobotServiceImpl implements ChatRobotService {
} }
ChatRobotLibraryVO chatRobotLibraryVO = new ChatRobotLibraryVO(); ChatRobotLibraryVO chatRobotLibraryVO = new ChatRobotLibraryVO();
String bucketName = "aida-sys-image"; String bucketName = "aida-sys-image";
String path = "images/" + array.getString(i); String path = "images/female/" + array.getString(i);
QueryWrapper<Library> qw = new QueryWrapper<>(); QueryWrapper<Library> qw = new QueryWrapper<>();
qw.lambda().eq(Library::getUrl, bucketName + "/female/" + path); qw.lambda().eq(Library::getUrl, bucketName + "/" + path);
qw.lambda().eq(Library::getAccountId, chatSendDTO.getUser_id()); qw.lambda().eq(Library::getAccountId, chatSendDTO.getUser_id());
qw.lambda().last("limit 1"); qw.lambda().last("limit 1");
List<Library> libraryList = libraryMapper.selectList(qw); List<Library> libraryList = libraryMapper.selectList(qw);
if (!CollectionUtils.isEmpty(libraryList)) { if (!CollectionUtils.isEmpty(libraryList)) {
chatRobotLibraryVO.setId(libraryList.get(0).getId()); chatRobotLibraryVO.setId(libraryList.get(0).getId());
} }
String aidaSysImage = minioUtil.getPresignedUrl("aida-sys-image/images/female/" + array.getString(i), 24 * 60); String aidaSysImage = minioUtil.getPresignedUrl(bucketName + "/" + path, 24 * 60);
chatRobotLibraryVO.setUrl(bucketName + "/female/" + path); chatRobotLibraryVO.setUrl(bucketName + "/" + path);
chatRobotLibraryVO.setPresignedUrl(aidaSysImage); chatRobotLibraryVO.setPresignedUrl(aidaSysImage);
chatRobotLibraryVOList.add(chatRobotLibraryVO); chatRobotLibraryVOList.add(chatRobotLibraryVO);
} }