feat(printer): 添加sourceId字段并优化打印逻辑

- 在MemberPrintResp中新增sourceId字段
- 优化PrinterServiceImpl中的水印处理逻辑
- 添加sourceId为空时的返回判断,避免空指针异常
This commit is contained in:
2025-11-08 17:09:10 +08:00
parent ee5cc81864
commit 72e215c552
2 changed files with 4 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ import java.util.Date;
public class MemberPrintResp {
private Integer id;
private Long scenicId;
private Long sourceId;
private String scenicName;
private Long faceId;
private Long memberId;

View File

@@ -624,7 +624,9 @@ public class PrinterServiceImpl implements PrinterService {
}
userPhotoListByOrderId.forEach(item -> {
PrinterEntity printer = printerMapper.getById(item.getPrinterId());
if (item.getSourceId() == null) {
return;
}
// 水印处理逻辑
String printUrl = item.getCropUrl();
try {