Merge branch 'dev/dev' into dev/dev_xp

# Conflicts:
#	src/main/java/com/ai/da/python/vo/DesignPythonItem.java
This commit is contained in:
2024-05-13 14:30:15 +08:00
5 changed files with 14 additions and 7 deletions

View File

@@ -64,6 +64,8 @@ public class DesignItemDetail implements Serializable {
*/
private String color;
private String gradientString;
/**
* 对应的print图片的绝对路径
*/

View File

@@ -28,7 +28,7 @@ public class CollectionColorDTO {
private Gradient gradient;
// private String gradientString;
private String gradientString;
private String gradientMinioUrl;

View File

@@ -1551,6 +1551,7 @@ public class PythonService {
CollectionColorDTO randomColor = getRandomColor(elementVO.getColorBoards());
pythonItem.setColor(randomColor.getRgbValue());
pythonItem.setGradient(randomColor.getGradientMinioUrl());
pythonItem.setGradientString(randomColor.getGradientString());
}
}
}
@@ -1916,6 +1917,7 @@ public class PythonService {
CollectionColorDTO randomColor = getRandomColor(elementVO.getColorBoards());
designPythonItemBlouse.setColor(randomColor.getRgbValue());
designPythonItemBlouse.setGradient(randomColor.getGradientMinioUrl());
designPythonItemBlouse.setGradientString(randomColor.getGradientString());
if (!elementVO.getDesignPythonItemPrint().getPath().equals("none")
&& elementVO.getDesignPrintPictureTypeLayoutList().contains(type)) {
DesignPythonItemPrint designPythonItemPrint = CopyUtil.copyObject(elementVO.getDesignPythonItemPrint(), DesignPythonItemPrint.class);
@@ -1944,6 +1946,7 @@ public class PythonService {
CollectionColorDTO randomColor = getRandomColor(elementVO.getColorBoards());
designPythonItemBlouse.setColor(randomColor.getRgbValue());
designPythonItemBlouse.setGradient(randomColor.getGradientMinioUrl());
designPythonItemBlouse.setGradientString(randomColor.getGradientString());
if (!elementVO.getDesignPythonItemPrint().getPath().equals("none")
&& elementVO.getDesignPrintPictureTypeLayoutList().contains(collectionElement.getLevel2Type())) {
DesignPythonItemPrint designPythonItemPrint = CopyUtil.copyObject(elementVO.getDesignPythonItemPrint(), DesignPythonItemPrint.class);

View File

@@ -28,6 +28,10 @@ public class DesignPythonItem {
*/
private String color;
private String gradient;
private String gradientString;
/**
* 对应的print图片的绝对路径
*/
@@ -74,12 +78,9 @@ public class DesignPythonItem {
*/
private Integer priority;
/**
* 渐变图片的minio地址
*/
private String gradient;
//
// private Float gradient_angle;
// private List<List<Integer>> gradient;
private Float gradient_angle;
public static List<String> OUTWEAR_DRESS_BLOUSE = Arrays.asList(CollectionLevel2TypeEnum.OUTWEAR.getRealName(),
CollectionLevel2TypeEnum.DRESS.getRealName(), CollectionLevel2TypeEnum.BLOUSE.getRealName());

View File

@@ -360,6 +360,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
String gradientMinioUrl = minioUtil.uploadImageFromBase64(gradientBucketName, base64Data, imageType);
colorBoard.setGradientMinioUrl(gradientMinioUrl);
colorBoard.getGradient().setColorImg(null);
colorBoard.setGradientString(JSON.toJSONString(colorBoard.getGradient()));
}
elementVO.setColorBoards(colorBoards);
List<Long> usedElementIds = elementVO.getUsedElementIds();