design single preview_submit
This commit is contained in:
@@ -2599,7 +2599,8 @@ public class PythonService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public DesignPythonObjects covertDesignSingleParam(DesignSingleIncludeLayersDTO designSingleDTO, String singleOverall,
|
public DesignPythonObjects covertDesignSingleParam(DesignSingleIncludeLayersDTO designSingleDTO, String singleOverall,
|
||||||
String switchCategory, DesignLibraryModelPointVO designLibraryModelPoint) {
|
String switchCategory, DesignLibraryModelPointVO designLibraryModelPoint,
|
||||||
|
String previewOrSubmit) {
|
||||||
DesignPythonObjects designPythonObjects = new DesignPythonObjects();
|
DesignPythonObjects designPythonObjects = new DesignPythonObjects();
|
||||||
List<DesignPythonObject> objects = Lists.newArrayList();
|
List<DesignPythonObject> objects = Lists.newArrayList();
|
||||||
designPythonObjects.setObjects(objects);
|
designPythonObjects.setObjects(objects);
|
||||||
@@ -2607,7 +2608,7 @@ public class PythonService {
|
|||||||
DesignPythonObject pythonObject = new DesignPythonObject();
|
DesignPythonObject pythonObject = new DesignPythonObject();
|
||||||
designPythonObjects.setProcess_id(designSingleDTO.getProcessId());
|
designPythonObjects.setProcess_id(designSingleDTO.getProcessId());
|
||||||
pythonObject.setItems(coverToDesignSinglePythonItem(designSingleDTO, designLibraryModelPoint));
|
pythonObject.setItems(coverToDesignSinglePythonItem(designSingleDTO, designLibraryModelPoint));
|
||||||
pythonObject.setBasic(coverToSingleBasic(singleOverall, switchCategory, designLibraryModelPoint));
|
pythonObject.setBasic(coverToSingleBasic(singleOverall, switchCategory, designLibraryModelPoint, previewOrSubmit));
|
||||||
objects.add(pythonObject);
|
objects.add(pythonObject);
|
||||||
return designPythonObjects;
|
return designPythonObjects;
|
||||||
}
|
}
|
||||||
@@ -2834,7 +2835,8 @@ public class PythonService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private DesignPythonBasic coverToSingleBasic(String singleOverall, String switchCategory,
|
private DesignPythonBasic coverToSingleBasic(String singleOverall, String switchCategory,
|
||||||
DesignLibraryModelPointVO designLibraryModelPoint) {
|
DesignLibraryModelPointVO designLibraryModelPoint,
|
||||||
|
String previewOrSubmit) {
|
||||||
DesignPythonBasic basic = new DesignPythonBasic();
|
DesignPythonBasic basic = new DesignPythonBasic();
|
||||||
basic.setSingle_overall(singleOverall);
|
basic.setSingle_overall(singleOverall);
|
||||||
basic.setSwitch_category(switchCategory);
|
basic.setSwitch_category(switchCategory);
|
||||||
@@ -2846,6 +2848,7 @@ public class PythonService {
|
|||||||
basic.setScale_earrings(0.16);
|
basic.setScale_earrings(0.16);
|
||||||
basic.setBody_point_test(getMap(designLibraryModelPoint));
|
basic.setBody_point_test(getMap(designLibraryModelPoint));
|
||||||
basic.setLayer_order(Boolean.TRUE);
|
basic.setLayer_order(Boolean.TRUE);
|
||||||
|
basic.setPreview_submit(previewOrSubmit);
|
||||||
return basic;
|
return basic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ public class DesignPythonBasic {
|
|||||||
|
|
||||||
private String single_overall;
|
private String single_overall;
|
||||||
|
|
||||||
|
private String preview_submit;
|
||||||
|
|
||||||
private String switch_category;
|
private String switch_category;
|
||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
sketchBase64ToPath(designSingleIncludeLayersDTO);
|
sketchBase64ToPath(designSingleIncludeLayersDTO);
|
||||||
|
|
||||||
// 将标注后的mask上传到minio,并将minio地址传给python端
|
// 将标注后的mask上传到minio,并将minio地址传给python端
|
||||||
// todo 如何当前design使用的仍是旧的mask 则置maskUrl为null
|
// todo 如果当前design使用的仍是旧的mask 则置maskUrl为null
|
||||||
// 1、查询当前design item在不在history中
|
// 1、查询当前design item在不在history中
|
||||||
UserLike userLikeDesign = userLikeService.getByDesignItemId(designItem.getId());
|
UserLike userLikeDesign = userLikeService.getByDesignItemId(designItem.getId());
|
||||||
Boolean setNull = Boolean.FALSE;
|
Boolean setNull = Boolean.FALSE;
|
||||||
@@ -517,7 +517,9 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
|
|
||||||
// 组装入参
|
// 组装入参
|
||||||
DesignPythonObjects objects = pythonService.covertDesignSingleParam(
|
DesignPythonObjects objects = pythonService.covertDesignSingleParam(
|
||||||
designSingleIncludeLayersDTO, design.getSingleOverall(), design.getSwitchCategory(), designLibraryModelPointVO);
|
designSingleIncludeLayersDTO, design.getSingleOverall(),
|
||||||
|
design.getSwitchCategory(), designLibraryModelPointVO,
|
||||||
|
designSingleIncludeLayersDTO.getIsPreview() ? "preview" : "submit");
|
||||||
// design
|
// design
|
||||||
JSONObject jsonObject = pythonService.designNew(objects);
|
JSONObject jsonObject = pythonService.designNew(objects);
|
||||||
// preview -> 不存数据库 submit -> 存数据库
|
// preview -> 不存数据库 submit -> 存数据库
|
||||||
|
|||||||
Reference in New Issue
Block a user