BUGFIX:渐变色回退;
This commit is contained in:
@@ -2619,16 +2619,16 @@ public class PythonService {
|
||||
}
|
||||
|
||||
// 判断是否是渐变色
|
||||
String minioPath = null;
|
||||
String gradientString = null;
|
||||
// String minioPath = null;
|
||||
// String gradientString = null;
|
||||
if (!Objects.isNull(designSingleItem.getGradient())){
|
||||
String colorImg = designSingleItem.getGradient().getColorImg();
|
||||
if (StringUtil.isNullOrEmpty(colorImg)){
|
||||
throw new BusinessException("The base64 data of the image is empty");
|
||||
}
|
||||
minioPath = minioUtil.base64Upload(colorImg, gradientBucketName);
|
||||
designSingleItem.getGradient().setColorImg(null);
|
||||
gradientString = JSONObject.toJSONString(designSingleItem.getGradient());
|
||||
// minioPath = minioUtil.base64Upload(colorImg, gradientBucketName);
|
||||
// designSingleItem.getGradient().setColorImg(null);
|
||||
// gradientString = JSONObject.toJSONString(designSingleItem.getGradient());
|
||||
|
||||
// todo 当渐变色不为空时,是否需要将颜色置为 0 0 0
|
||||
}
|
||||
@@ -2644,9 +2644,7 @@ public class PythonService {
|
||||
pythonTAllInfoService.getImageIdByPath(designSingleItem.getPath()),
|
||||
designSingleItem.getOffset(),
|
||||
designSingleItem.getScale(),
|
||||
designSingleItem.getPriority(),
|
||||
minioPath,
|
||||
gradientString));
|
||||
designSingleItem.getPriority()));
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ public class DesignPythonItem {
|
||||
*/
|
||||
private String color;
|
||||
|
||||
private String gradient;
|
||||
// private String gradient;
|
||||
|
||||
private String gradientString;
|
||||
// private String gradientString;
|
||||
|
||||
/**
|
||||
* 对应的print图片的绝对路径
|
||||
@@ -114,7 +114,7 @@ public class DesignPythonItem {
|
||||
}
|
||||
|
||||
public DesignPythonItem(String type, String path, String color, DesignPythonItemPrint print, Long businessId,
|
||||
Long image_id, List<Long> offset, Float[] resize_scale, Integer priority, String gradient, String gradientString) {
|
||||
Long image_id, List<Long> offset, Float[] resize_scale, Integer priority) {
|
||||
this.type = type;
|
||||
this.path = path;
|
||||
this.color = color;
|
||||
@@ -125,8 +125,8 @@ public class DesignPythonItem {
|
||||
this.offset = offset;
|
||||
this.resize_scale = resize_scale;
|
||||
this.priority = priority;
|
||||
this.gradient = gradient;
|
||||
this.gradientString = gradientString;
|
||||
// this.gradient = gradient;
|
||||
// this.gradientString = gradientString;
|
||||
}
|
||||
|
||||
public DesignPythonItem(String type, String path, String color, DesignPythonItemPrint print, String icon, Long businessId, Long image_id) {
|
||||
|
||||
@@ -417,14 +417,14 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public DesignSingleVO designSingleIncludeLayers(DesignSingleIncludeLayersDTO designSingleIncludeLayersDTO) {
|
||||
// 记录入参 base64数据太长,所以这里去掉
|
||||
DesignSingleIncludeLayersDTO clone = SerializationUtils.clone(designSingleIncludeLayersDTO);
|
||||
clone.getDesignSingleItemDTOList().forEach( i -> {
|
||||
if (!Objects.isNull(i.getGradient()) && !StringUtil.isNullOrEmpty(i.getGradient().getColorImg())){
|
||||
i.getGradient().setColorImg(null);
|
||||
}
|
||||
});
|
||||
// DesignSingleIncludeLayersDTO clone = SerializationUtils.clone(designSingleIncludeLayersDTO);
|
||||
// clone.getDesignSingleItemDTOList().forEach( i -> {
|
||||
// if (!Objects.isNull(i.getGradient()) && !StringUtil.isNullOrEmpty(i.getGradient().getColorImg())){
|
||||
// i.getGradient().setColorImg(null);
|
||||
// }
|
||||
// });
|
||||
|
||||
log.info("designSingle request入参 ==> " + JSONObject.toJSONString(clone));
|
||||
// log.info("designSingle request入参 ==> " + JSONObject.toJSONString(clone));
|
||||
|
||||
Long userId = UserContext.getUserHolder().getId();
|
||||
DesignItem designItem = selectById(designSingleIncludeLayersDTO.getDesignItemId());
|
||||
@@ -649,7 +649,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
layers -> (singleItem.getType().toLowerCase().equals(layers.getImageCategory().split("_")[0])
|
||||
&& (flag ? Boolean.TRUE : singleItem.getPriority().equals(layers.getPriority())))
|
||||
).collect(Collectors.toList()));
|
||||
designItemClothesDetailVO.setGradient(singleItem.getGradient());
|
||||
// designItemClothesDetailVO.setGradient(singleItem.getGradient());
|
||||
body.setLayersObject(layersObject.stream().filter(layers -> layers.getImageCategory().equals("body")).collect(Collectors.toList()));
|
||||
|
||||
clothes.add(designItemClothesDetailVO);
|
||||
|
||||
@@ -998,7 +998,7 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
||||
d.setPath(minioUtil.getPresignedUrl(o.getPath(), 24 * 60));
|
||||
d.setMinIOPath(o.getPath());
|
||||
d.setLevel1Type(converTypeToLevel1(o.getType()));
|
||||
d.setGradient(JSONObject.parseObject(o.getGradientString(), Gradient.class));
|
||||
// d.setGradient(JSONObject.parseObject(o.getGradientString(), Gradient.class));
|
||||
// 根据designItemDetailId获取印花
|
||||
List<DesignItemDetailPrint> prints = designItemDetailPrintService.getByDesignItemDetailId(o.getId());
|
||||
// 判断有无印花
|
||||
|
||||
Reference in New Issue
Block a user