|
|
|
@ -34,10 +34,10 @@ public class VideoUpdateTest {
|
|
|
|
|
@Autowired
|
|
|
|
|
private AskPatientAnswerService askPatientAnswerService;
|
|
|
|
|
|
|
|
|
|
private String filePath = "/Users/flevance/Desktop/虚拟病人/语料库/video_texts/";
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void saveDefaultAnswerVideo() throws Exception {
|
|
|
|
|
String filePath = "/Users/flevance/Desktop/虚拟病人/语料库/video_texts/";
|
|
|
|
|
List<AskTemplateQuestionLibrary> list = askTemplateQuestionLibraryService.list();
|
|
|
|
|
for (AskTemplateQuestionLibrary library : list) {
|
|
|
|
|
String defaultAnswerCode = library.getDefaultAnswerCode();
|
|
|
|
@ -50,7 +50,7 @@ public class VideoUpdateTest {
|
|
|
|
|
|
|
|
|
|
BufferedInputStream inputStream = FileUtil.getInputStream(file);
|
|
|
|
|
fileResource.setFileSize(inputStream.available());
|
|
|
|
|
String minioId = MinioUtil.uploadFile(inputStream, defaultAnswerCode);
|
|
|
|
|
String minioId = MinioUtil.uploadFile(inputStream);
|
|
|
|
|
fileResource.setMinioId(minioId);
|
|
|
|
|
fileResource.insert();
|
|
|
|
|
askTemplateQuestionLibraryService.lambdaUpdate()
|
|
|
|
@ -66,7 +66,6 @@ public class VideoUpdateTest {
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void saveDiseaseVideo() throws Exception {
|
|
|
|
|
String filePath = "/Users/flevance/Desktop/虚拟病人/语料库/video_texts/";
|
|
|
|
|
List<AskPatientAnswer> list = askPatientAnswerService.list();
|
|
|
|
|
for (AskPatientAnswer answer : list) {
|
|
|
|
|
String code = answer.getCode();
|
|
|
|
@ -79,7 +78,7 @@ public class VideoUpdateTest {
|
|
|
|
|
|
|
|
|
|
BufferedInputStream inputStream = FileUtil.getInputStream(file);
|
|
|
|
|
fileResource.setFileSize(inputStream.available());
|
|
|
|
|
String minioId = MinioUtil.uploadFile(inputStream, code);
|
|
|
|
|
String minioId = MinioUtil.uploadFile(inputStream);
|
|
|
|
|
fileResource.setMinioId(minioId);
|
|
|
|
|
fileResource.insert();
|
|
|
|
|
askPatientAnswerService.lambdaUpdate()
|
|
|
|
|