TASK:design single部分cv操作前置,新增merge | default两种designType
This commit is contained in:
@@ -2789,7 +2789,7 @@ public class PythonService {
|
||||
DesignPythonObject pythonObject = new DesignPythonObject();
|
||||
designPythonObjects.setProcess_id(designSingleDTO.getProcessId());
|
||||
pythonObject.setItems(coverToDesignSinglePythonItem(designSingleDTO, designLibraryModelPoint, singleOverall));
|
||||
pythonObject.setBasic(coverToSingleBasic(singleOverall, switchCategory, designLibraryModelPoint, previewOrSubmit));
|
||||
pythonObject.setBasic(coverToSingleBasic(singleOverall, switchCategory, designLibraryModelPoint, designSingleDTO.getDesignType()));
|
||||
objects.add(pythonObject);
|
||||
return designPythonObjects;
|
||||
}
|
||||
@@ -2855,6 +2855,9 @@ public class PythonService {
|
||||
designSingleItem.getPartialDesign().getPartialDesignMinioPath());
|
||||
resolveDesignElement(designSingleItem.getTrims(), printToPython);
|
||||
log.info("组装参数【服装:{}的maskUrl: {}】",designSingleItem.getType(), designSingleItem.getMaskUrl());
|
||||
|
||||
String mergeImagePath = !StringUtil.isNullOrEmpty(printToPython.getPartial())
|
||||
? printToPython.getPartial() : designSingleItem.getPath();
|
||||
response.add(new DesignPythonItem(
|
||||
designSingleItem.getType(),
|
||||
designSingleItem.getPath(),
|
||||
@@ -2871,7 +2874,8 @@ public class PythonService {
|
||||
gradientString,
|
||||
designSingleItem.getMaskUrl(),
|
||||
designSingleItem.getTranspose(),
|
||||
designSingleItem.getRotate()
|
||||
designSingleItem.getRotate(),
|
||||
mergeImagePath
|
||||
));
|
||||
|
||||
});
|
||||
@@ -3049,7 +3053,7 @@ public class PythonService {
|
||||
*/
|
||||
private DesignPythonBasic coverToSingleBasic(String singleOverall, String switchCategory,
|
||||
DesignLibraryModelPointVO designLibraryModelPoint,
|
||||
String previewOrSubmit) {
|
||||
String designType) {
|
||||
DesignPythonBasic basic = new DesignPythonBasic();
|
||||
basic.setSingle_overall(singleOverall);
|
||||
basic.setSwitch_category(switchCategory);
|
||||
@@ -3061,7 +3065,8 @@ public class PythonService {
|
||||
basic.setScale_earrings(0.16);
|
||||
basic.setBody_point_test(getMap(designLibraryModelPoint));
|
||||
basic.setLayer_order(Boolean.TRUE);
|
||||
basic.setPreview_submit(previewOrSubmit);
|
||||
// basic.setPreview_submit(previewOrSubmit);
|
||||
basic.setDesign_type(designType);
|
||||
return basic;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public class DesignPythonBasic {
|
||||
|
||||
private String single_overall;
|
||||
|
||||
private String preview_submit;
|
||||
// private String preview_submit;
|
||||
|
||||
private String switch_category;
|
||||
/**
|
||||
@@ -40,4 +40,7 @@ public class DesignPythonBasic {
|
||||
|
||||
private Boolean layer_order = Boolean.FALSE;
|
||||
|
||||
// default | merge
|
||||
private String design_type = "default";
|
||||
|
||||
}
|
||||
|
||||
@@ -97,6 +97,12 @@ public class DesignPythonItem {
|
||||
*/
|
||||
private double rotate;
|
||||
|
||||
/**
|
||||
* 前端处理了print之后的结果图,python对该图进行分割
|
||||
* designType为merge时,该字段必须有值,否则会导致python端没有数据返回
|
||||
*/
|
||||
private String merge_image_path;
|
||||
|
||||
public static List<String> OUTWEAR_DRESS_BLOUSE = Arrays.asList(CollectionLevel2TypeEnum.OUTWEAR.getRealName(),
|
||||
CollectionLevel2TypeEnum.DRESS.getRealName(), CollectionLevel2TypeEnum.BLOUSE.getRealName());
|
||||
|
||||
@@ -153,7 +159,8 @@ public class DesignPythonItem {
|
||||
|
||||
public DesignPythonItem(String type, String path, String color, PrintToPython print, Long businessId,
|
||||
Long image_id, List<Long> offset, Float[] resize_scale, Integer priority, String gradient,
|
||||
String gradientString, String seg_mask_url, int[] transpose, double rotate) {
|
||||
String gradientString, String seg_mask_url, int[] transpose, double rotate,
|
||||
String merge_image_path) {
|
||||
this.type = type;
|
||||
this.path = path;
|
||||
this.color = color;
|
||||
@@ -169,6 +176,7 @@ public class DesignPythonItem {
|
||||
this.seg_mask_url = seg_mask_url;
|
||||
this.transpose = transpose;
|
||||
this.rotate = rotate;
|
||||
this.merge_image_path = merge_image_path;
|
||||
}
|
||||
|
||||
public DesignPythonItem(String type, String path, String color, PrintToPython print, String icon, Long businessId, Long image_id) {
|
||||
|
||||
Reference in New Issue
Block a user