You've already forked FrameTour-BE
feat(printer): 添加sourceId字段并优化打印逻辑
- 在MemberPrintResp中新增sourceId字段 - 优化PrinterServiceImpl中的水印处理逻辑 - 添加sourceId为空时的返回判断,避免空指针异常
This commit is contained in:
@@ -8,6 +8,7 @@ import java.util.Date;
|
|||||||
public class MemberPrintResp {
|
public class MemberPrintResp {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private Long scenicId;
|
private Long scenicId;
|
||||||
|
private Long sourceId;
|
||||||
private String scenicName;
|
private String scenicName;
|
||||||
private Long faceId;
|
private Long faceId;
|
||||||
private Long memberId;
|
private Long memberId;
|
||||||
|
|||||||
@@ -624,7 +624,9 @@ public class PrinterServiceImpl implements PrinterService {
|
|||||||
}
|
}
|
||||||
userPhotoListByOrderId.forEach(item -> {
|
userPhotoListByOrderId.forEach(item -> {
|
||||||
PrinterEntity printer = printerMapper.getById(item.getPrinterId());
|
PrinterEntity printer = printerMapper.getById(item.getPrinterId());
|
||||||
|
if (item.getSourceId() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 水印处理逻辑
|
// 水印处理逻辑
|
||||||
String printUrl = item.getCropUrl();
|
String printUrl = item.getCropUrl();
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user