文档翻译对接。

This commit is contained in:
wangzhijiang
2022-07-27 18:04:28 +08:00
parent 40198cd59c
commit 0b3508a4c3
2 changed files with 3 additions and 2 deletions
@@ -142,6 +142,7 @@ public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMap
o.eq(DocTranslationEO::getReleaseCondition,ReleaseConditionEnum.PUBLISHED.getValue()); o.eq(DocTranslationEO::getReleaseCondition,ReleaseConditionEnum.PUBLISHED.getValue());
}); });
}); });
queryWrapper.lambda().orderByDesc(DocTranslationEO::getCreateTime);
IPage<DocTranslationEO> result = this.page(page, queryWrapper); IPage<DocTranslationEO> result = this.page(page, queryWrapper);
disposeData(result.getRecords(),cut); disposeData(result.getRecords(),cut);
return result; return result;
@@ -140,11 +140,11 @@ public class TranslationDocumentUtils {
} }
try { try {
FileOutputStream out = new FileOutputStream(newFile); FileOutputStream out = new FileOutputStream(newFile);
out.write(translateAfter.getBytes("UTF-8"));
out.close();
MultipartFile multipartFile = createMfileByPath(translateAfterFilePath); MultipartFile multipartFile = createMfileByPath(translateAfterFilePath);
ossFile = iossFileService.uploadLocalOfCos(multipartFile, "", null, null); ossFile = iossFileService.uploadLocalOfCos(multipartFile, "", null, null);
out.write(translateAfter.getBytes("UTF-8"));
out.close();
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
} catch (IOException e) { } catch (IOException e) {