人员简历相关接口开发
This commit is contained in:
parent
207081aca2
commit
702092c5a2
|
|
@ -61,6 +61,16 @@ public class PersonnelResumePO {
|
|||
String outPutPath = GCONST.getRootPath() + "hrm" + File.separator + "import" + File.separator + "template" + File.separator
|
||||
+ manager.getImageFileName();
|
||||
File f = new File(outPutPath);
|
||||
if (!f.exists()) {
|
||||
String substring = outPutPath.substring(0, outPutPath.lastIndexOf(File.separator));
|
||||
File file = new File(substring);
|
||||
if (file.mkdirs()) {
|
||||
boolean newFile = f.createNewFile();
|
||||
if (!newFile) {
|
||||
throw new IOException(outPutPath + "文件创建失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
Thumbnails.of(inputStream).forceSize(100, 120).toFile(f);
|
||||
InputStream fileInputStream = Files.newInputStream(f.toPath());
|
||||
imageStr = "data:image/" + manager.getImageFileType() + ";base64," + Base64.getEncoder().encodeToString(IOUtils.toByteArray(fileInputStream));
|
||||
|
|
|
|||
Loading…
Reference in New Issue