编辑前后片,添加日志打印
This commit is contained in:
@@ -2717,6 +2717,7 @@ public class PythonService {
|
||||
PrintToPython printToPython = resolveDesignSinglePrint(designSingleItem.getPrintObject().getPrints(),
|
||||
designSingleItem.getPartialDesign().getPartialDesignMinioPath());
|
||||
resolveDesignElement(designSingleItem.getTrims(), printToPython);
|
||||
log.info("组装参数【服装:{}的maskUrl: {}】",designSingleItem.getType(), designSingleItem.getMaskUrl());
|
||||
response.add(new DesignPythonItem(
|
||||
designSingleItem.getType(),
|
||||
designSingleItem.getPath(),
|
||||
|
||||
@@ -605,16 +605,20 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
designSingleIncludeLayersDTO.getDesignSingleItemDTOList().forEach(item -> {
|
||||
// 如果sketch截图不为空,则将该截图上传,并替换path
|
||||
if (setNull){
|
||||
log.info("服装类型为{}, set maskUrl为null", item.getType());
|
||||
item.setMaskUrl(null);
|
||||
}else {
|
||||
if (!StringUtil.isNullOrEmpty(item.getMaskUrl())){
|
||||
log.info("服装{} 的maskUrl不为null", item.getType());
|
||||
// 由于前端不好处理这块,所以,当mask没有做任何修改的时候,仍然会传原始mask的minio地址
|
||||
if (!item.getMaskUrl().startsWith("data:image") && item.getMaskUrl().startsWith("https://")){
|
||||
// 当没有修改mask时,还是用之前的mask地址
|
||||
item.setMaskUrl(item.getMaskMinioUrl());
|
||||
log.info("服装{} 的maskUrl没有被编辑", item.getType());
|
||||
}else {
|
||||
// 将原图地址作为修改后的图片地址,放在不同的桶
|
||||
String path = minioUtil.base64UploadToPath(item.getMaskUrl(), clothingBucket, "labelingMask/" + UUID.randomUUID());
|
||||
log.info("服装{} 的maskUrl已被编辑, 新的path为{}", item.getType(), path);
|
||||
if (StringUtil.isNullOrEmpty(path)){
|
||||
log.error("标注的mask图片上传失败");
|
||||
throw new BusinessException("image.modify.failed");
|
||||
@@ -622,6 +626,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
item.setMaskUrl(path);
|
||||
}
|
||||
}
|
||||
log.info("服装{} 的maskUrl为null", item.getType());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user