You've already forked FrameTour-BE
图片可指定格式,可推荐格式,压缩
This commit is contained in:
@ -505,7 +505,7 @@ public class GoodsServiceImpl implements GoodsService {
|
||||
} else {
|
||||
// 生成
|
||||
File dstFile = new File(item.getGoodsId() + ".jpg");
|
||||
File watermarkedFile = new File(item.getGoodsId() + "_" + ImageWatermarkOperatorEnum.WATERMARK.getType() + ".png");
|
||||
File watermarkedFile = new File(item.getGoodsId() + "_" + ImageWatermarkOperatorEnum.WATERMARK.getType() + "." + ImageWatermarkOperatorEnum.WATERMARK.getPreferFileType());
|
||||
try {
|
||||
HttpUtil.downloadFile(item.getUrl().replace("oss.zhentuai.com", "frametour-assets.oss-cn-shanghai-internal.aliyuncs.com"), dstFile);
|
||||
} catch (Exception e) {
|
||||
@ -613,7 +613,7 @@ public class GoodsServiceImpl implements GoodsService {
|
||||
} else {
|
||||
// 生成
|
||||
File dstFile = new File(item.getGoodsId() + ".jpg");
|
||||
File watermarkedFile = new File(item.getGoodsId() + "_" + type.getType() + ".png");
|
||||
File watermarkedFile = new File(item.getGoodsId() + "_" + type.getType() + "." + type.getPreferFileType());
|
||||
try {
|
||||
HttpUtil.downloadFile(item.getUrl().replace("oss.zhentuai.com", "frametour-assets.oss-cn-shanghai-internal.aliyuncs.com"), dstFile);
|
||||
} catch (Exception e) {
|
||||
|
Reference in New Issue
Block a user