From b0dc1f47632ebdad46a878d58c9d3c31fbdd67f7 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Thu, 14 Dec 2023 10:21:30 +0800 Subject: [PATCH] =?UTF-8?q?BUGFIX:library=E7=94=B7=E6=A8=A1=E7=89=B9?= =?UTF-8?q?=E6=89=93=E7=82=B9=E9=A2=84=E8=A7=88;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ai/da/python/PythonService.java | 61 ++++++++++++------- 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/ai/da/python/PythonService.java b/src/main/java/com/ai/da/python/PythonService.java index 1b23a49e..a5bec1e7 100644 --- a/src/main/java/com/ai/da/python/PythonService.java +++ b/src/main/java/com/ai/da/python/PythonService.java @@ -9,6 +9,7 @@ import com.ai.da.common.utils.*; import com.ai.da.mapper.entity.CollectionElement; import com.ai.da.mapper.entity.DesignHistory; import com.ai.da.model.dto.*; +import com.ai.da.model.enums.MalePosition; import com.ai.da.model.enums.Sex; import com.ai.da.model.vo.*; import com.ai.da.python.vo.*; @@ -2057,29 +2058,45 @@ public class PythonService { private List coverToModelsDotPythonItem(ModelsDotDTO modelsDotDTO) { List response = Lists.newArrayList(); - DesignPythonItem dress = new DesignPythonItem(); - dress.setType(SysFileLevel2TypeEnum.DRESS.getRealName()); - dress.setColor("none"); - dress.setIcon("none"); - DesignPythonItemPrint designPythonItemPrint = new DesignPythonItemPrint(); - designPythonItemPrint.setIfSingle(false); - designPythonItemPrint.setPrint_path_list(new ArrayList<>()); -// dress.setPrint(new DesignPythonItemPrint("none", -// CollectionLevel1TypeEnum.PRINT_BOARD.getRealName(), 0.3f, Boolean.FALSE)); - dress.setPrint(designPythonItemPrint); - dress.setPath("aida-sys-image/images/female/blouse/blouse_p5_817.jpg"); - response.add(dress); + if (modelsDotDTO.getTemplateUrl().contains("female")) { + DesignPythonItem dress = new DesignPythonItem(); + dress.setType(SysFileLevel2TypeEnum.DRESS.getRealName()); + dress.setColor("none"); + dress.setIcon("none"); + DesignPythonItemPrint designPythonItemPrint = new DesignPythonItemPrint(); + designPythonItemPrint.setIfSingle(false); + designPythonItemPrint.setPrint_path_list(new ArrayList<>()); + dress.setPrint(designPythonItemPrint); + dress.setPath("aida-sys-image/images/female/blouse/blouse_p5_817.jpg"); + response.add(dress); - DesignPythonItem skirt = new DesignPythonItem(); - skirt.setType(SysFileLevel2TypeEnum.SKIRT.getRealName()); - skirt.setColor("none"); - skirt.setIcon("none"); - DesignPythonItemPrint designPythonItemPrint1 = new DesignPythonItemPrint(); - designPythonItemPrint1.setIfSingle(false); - designPythonItemPrint1.setPrint_path_list(new ArrayList<>()); - skirt.setPrint(designPythonItemPrint1); - skirt.setPath("aida-sys-image/images/female/trousers/trousers_974.jpg"); - response.add(skirt); + DesignPythonItem skirt = new DesignPythonItem(); + skirt.setType(SysFileLevel2TypeEnum.TROUSERS.getRealName()); + skirt.setColor("none"); + skirt.setIcon("none"); + skirt.setPrint(designPythonItemPrint); + skirt.setPath("aida-sys-image/images/female/trousers/trousers_974.jpg"); + response.add(skirt); + }else { + DesignPythonItem top = new DesignPythonItem(); + top.setType(MalePosition.TOPS.getValue()); + top.setColor("none"); + top.setIcon("none"); + DesignPythonItemPrint designPythonItemPrint = new DesignPythonItemPrint(); + designPythonItemPrint.setIfSingle(false); + designPythonItemPrint.setPrint_path_list(new ArrayList<>()); + top.setPrint(designPythonItemPrint); + top.setPath("aida-sys-image/images/male/tops/mens_test_10.png"); + response.add(top); + + DesignPythonItem bottom = new DesignPythonItem(); + bottom.setType(MalePosition.BOTTOMS.getValue()); + bottom.setColor("none"); + bottom.setIcon("none"); + bottom.setPrint(designPythonItemPrint); + bottom.setPath("aida-sys-image/images/male/bottoms/mens_test_10007.png"); + response.add(bottom); + } DesignPythonItem body = new DesignPythonItem(); body.setType(SysFileLevel2TypeEnum.BODY.getRealName());