fix(printer): 调整二维码边距和图片旋转逻辑

- 修改二维码距离左边缘的图片宽度比例从 0.075 为 0.05
- 修正图片旋转角度判断逻辑,确保横向处理正确
- 移除下载 URL 中的域名替换操作,使用原始地址直接下载
This commit is contained in:
2025-11-18 16:06:19 +08:00
parent 8e48bd92cc
commit 6e84a5fd43
2 changed files with 3 additions and 3 deletions

View File

@@ -789,14 +789,14 @@ public class PrinterServiceImpl implements PrinterService {
boolean needRotation = false;
try {
HttpUtil.downloadFile(item.getCropUrl().replace("oss.zhentuai.com", "frametour-assets.oss-cn-shanghai-internal.aliyuncs.com"), originalFile);
HttpUtil.downloadFile(item.getCropUrl(), originalFile);
// 判断图片方向并处理旋转
boolean isLandscape = false;
try {
Integer rotate = JacksonUtil.getInt(item.getCrop(), "rotation");
if (rotate != null) {
isLandscape = rotate % 180 != 0;
isLandscape = rotate % 180 == 0;
}
} catch (Exception ignored) {
}