|
@@ -601,12 +601,14 @@ public class AuthServiceImpl implements AuthService {
|
|
|
if (j == 3 || j == 4) {
|
|
|
// productSheet.addMergedRegion(new CellRangeAddress(j + 1,j + 1,j + 1,j + 1)) ;
|
|
|
// 头像
|
|
|
- InputStream imageStream = getImageStream(productData.get(j));
|
|
|
+ String imageUrl = productData.get(j);
|
|
|
+ String fileType = imageUrl.substring(imageUrl.lastIndexOf(".") + 1);
|
|
|
+ InputStream imageStream = getImageStream(imageUrl);
|
|
|
if (null != imageStream) {
|
|
|
try {
|
|
|
BufferedImage bufferedImage = ImageIO.read(imageStream);
|
|
|
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
|
|
- ImageIO.write(bufferedImage, "jpg", byteArrayOut);
|
|
|
+ ImageIO.write(bufferedImage, fileType, byteArrayOut);
|
|
|
byte[] data = byteArrayOut.toByteArray();
|
|
|
HSSFPatriarch drawingPatriarch = productSheet.createDrawingPatriarch();
|
|
|
// 设置图片位置
|