|
@@ -43,6 +43,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.validation.Valid;
|
|
|
import java.awt.*;
|
|
|
import java.io.File;
|
|
|
+import java.io.FileInputStream;
|
|
|
import java.io.IOException;
|
|
|
import java.io.InputStream;
|
|
|
import java.math.BigDecimal;
|
|
@@ -149,13 +150,13 @@ public class UserScrmController extends AppBaseController {
|
|
|
File newFileT = new File(getTuiFont);
|
|
|
try {
|
|
|
log.info("开始加载海报模板图片");
|
|
|
- InputStream stream = getClass().getClassLoader().getResourceAsStream(getTuiImg);
|
|
|
+ InputStream stream = new FileInputStream(getTuiImg);
|
|
|
FileUtils.copyInputStreamToFile(stream, newFile);
|
|
|
log.info("海报模板图片加载成功: {}", newFile.getAbsolutePath());
|
|
|
|
|
|
if(!newFileT.exists()){
|
|
|
log.info("开始加载字体文件");
|
|
|
- InputStream streamT = getClass().getClassLoader().getResourceAsStream(getTuiFont);
|
|
|
+ InputStream streamT = new FileInputStream(getTuiFont);
|
|
|
FileUtils.copyInputStreamToFile(streamT, newFileT);
|
|
|
log.info("字体文件加载成功: {}", newFileT.getAbsolutePath());
|
|
|
}
|