diff --git a/src/main/java/com/ai/da/controller/WorkspaceController.java b/src/main/java/com/ai/da/controller/WorkspaceController.java index 26ce59b6..5094fa8d 100644 --- a/src/main/java/com/ai/da/controller/WorkspaceController.java +++ b/src/main/java/com/ai/da/controller/WorkspaceController.java @@ -1,26 +1,12 @@ package com.ai.da.controller; -import com.ai.da.common.context.UserContext; -import com.ai.da.common.response.PageBaseResponse; import com.ai.da.common.response.Response; -import com.ai.da.common.utils.CopyUtil; import com.ai.da.common.utils.MinioUtil; -import com.ai.da.mapper.entity.Account; -import com.ai.da.mapper.entity.UserLikeGroup; import com.ai.da.mapper.entity.Workspace; -import com.ai.da.model.dto.QueryHistoryPageDTO; import com.ai.da.model.dto.WorkspaceDTO; import com.ai.da.model.enums.BizJson; -import com.ai.da.model.vo.AuthPrincipalVo; -import com.ai.da.model.vo.UserLikeGroupVO; -import com.ai.da.model.vo.UserLikeVO; import com.ai.da.model.vo.WorkspaceVO; import com.ai.da.service.WorkspaceService; -import com.baomidou.mybatisplus.core.conditions.query.Query; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.google.common.base.Function; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -28,21 +14,12 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import lombok.AllArgsConstructor; import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Value; -import org.springframework.util.Assert; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; - -import java.util.Date; import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; /** * 控制器 @@ -61,8 +38,10 @@ public class WorkspaceController { @Resource private MinioUtil minIoUtil; + @Value("${minio.endpoint}") private static String address; + @Value("${minio.bucketName}") private static String bucketName; diff --git a/src/main/java/com/ai/da/mapper/entity/TDesignPythonOutfitDetail.java b/src/main/java/com/ai/da/mapper/entity/TDesignPythonOutfitDetail.java index 8b8ee496..d2ca85b4 100644 --- a/src/main/java/com/ai/da/mapper/entity/TDesignPythonOutfitDetail.java +++ b/src/main/java/com/ai/da/mapper/entity/TDesignPythonOutfitDetail.java @@ -50,6 +50,11 @@ public class TDesignPythonOutfitDetail implements Serializable { */ @ApiModelProperty(value = "图层") private String imageCategory; + /** + * imageSize + */ + @ApiModelProperty(value = "imageSize") + private String imageSize; /** * 对应的图片的绝对路径 */ diff --git a/src/main/java/com/ai/da/python/PythonService.java b/src/main/java/com/ai/da/python/PythonService.java index 260d5df0..5f0cd3f6 100644 --- a/src/main/java/com/ai/da/python/PythonService.java +++ b/src/main/java/com/ai/da/python/PythonService.java @@ -1426,11 +1426,12 @@ public class PythonService { MediaType mediaType = MediaType.parse("application/json"); //关闭FastJson的引用检测 防止出现$ref 现象 // String param = JSON.toJSONString(designPythonObjects, SerializerFeature.DisableCircularReferenceDetect); - String param = "{\"objects\":[{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"50 187 147\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/202308/userFile/collection/Sketchboard/42/048419db-38c4-4aee-85a7-33f0666b18d2.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202304/pythonFile/generatePrint/generatePrint-d7a67a96-83f9-429f-9028-3e1697501088.jpg\"},\"type\":\"Outwear\",\"image_id\":53547},{\"color\":\"137 50 50\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0628001153.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Skirt\",\"image_id\":53548},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_242.jpg\",\"type\":\"Hairstyle\",\"image_id\":411},{\"color\":\"31 76 171\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_11.jpg\",\"type\":\"Shoes\",\"image_id\":167},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_12.png\",\"type\":\"Earring\",\"image_id\":93},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"103 74 74\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/dress/0902005000.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202304/userFile/library/Printboard/42/4ba535c2-a08b-4114-826b-a87885fd3623Fabric-03.png\"},\"type\":\"Dress\",\"image_id\":53549},{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0825000582.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202304/userFile/library/Printboard/42/4ba535c2-a08b-4114-826b-a87885fd3623Fabric-03.png\"},\"type\":\"Skirt\",\"image_id\":53550},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2529.jpg\",\"type\":\"Hairstyle\",\"image_id\":898},{\"color\":\"137 50 50\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_15.png\",\"type\":\"Shoes\",\"image_id\":171},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_15.png\",\"type\":\"Earring\",\"image_id\":96},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"49 127 162\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/outwear/0628001185.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202308/pythonFile/generatePrint/generatePrint-487e93e6-1e21-46b8-b821-3188251dbdbc.jpg\"},\"type\":\"Outwear\",\"image_id\":53551},{\"color\":\"103 74 74\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/trousers/0628000635.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202308/pythonFile/generatePrint/generatePrint-487e93e6-1e21-46b8-b821-3188251dbdbc.jpg\"},\"type\":\"Trousers\",\"image_id\":53552},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2102.jpg\",\"type\":\"Hairstyle\",\"image_id\":471},{\"color\":\"137 50 50\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_41.jpg\",\"type\":\"Shoes\",\"image_id\":344},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_5.png\",\"type\":\"Earring\",\"image_id\":87},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"31 76 171\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/outwear/0902002198.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Outwear\",\"image_id\":53553},{\"color\":\"50 187 147\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0916000791.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Skirt\",\"image_id\":53554},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2518.jpg\",\"type\":\"Hairstyle\",\"image_id\":887},{\"color\":\"137 50 50\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_15.png\",\"type\":\"Shoes\",\"image_id\":171},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_11.png\",\"type\":\"Earring\",\"image_id\":92},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/outwear/0902000892.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Outwear\",\"image_id\":53555},{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/trousers/0916000460.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Trousers\",\"image_id\":53556},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_204.jpg\",\"type\":\"Hairstyle\",\"image_id\":294},{\"color\":\"49 127 162\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_15.png\",\"type\":\"Shoes\",\"image_id\":171},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_5.png\",\"type\":\"Earring\",\"image_id\":87},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/blouse/0902002193.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Blouse\",\"image_id\":53557},{\"color\":\"50 187 147\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0902002112.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Skirt\",\"image_id\":53558},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2186.jpg\",\"type\":\"Hairstyle\",\"image_id\":555},{\"color\":\"204 182 182\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_11.jpg\",\"type\":\"Shoes\",\"image_id\":167},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_12.png\",\"type\":\"Earring\",\"image_id\":93},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/blouse/0902002193.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Blouse\",\"image_id\":53557},{\"color\":\"137 50 50\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0902002861.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Skirt\",\"image_id\":53560},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2128.jpg\",\"type\":\"Hairstyle\",\"image_id\":497},{\"color\":\"49 127 162\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_39.jpg\",\"type\":\"Shoes\",\"image_id\":192},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_4.png\",\"type\":\"Earring\",\"image_id\":86},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/blouse/0902002193.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Blouse\",\"image_id\":53557},{\"color\":\"49 127 162\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0902000567.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Skirt\",\"image_id\":53562},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2357.jpg\",\"type\":\"Hairstyle\",\"image_id\":726},{\"color\":\"137 50 50\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_6.jpg\",\"type\":\"Shoes\",\"image_id\":163},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_15.png\",\"type\":\"Earring\",\"image_id\":96},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]}]}"; +// String param = "{\"objects\":[{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"50 187 147\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/202308/userFile/collection/Sketchboard/42/048419db-38c4-4aee-85a7-33f0666b18d2.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202304/pythonFile/generatePrint/generatePrint-d7a67a96-83f9-429f-9028-3e1697501088.jpg\"},\"type\":\"Outwear\",\"image_id\":53547},{\"color\":\"137 50 50\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0628001153.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Skirt\",\"image_id\":53548},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_242.jpg\",\"type\":\"Hairstyle\",\"image_id\":411},{\"color\":\"31 76 171\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_11.jpg\",\"type\":\"Shoes\",\"image_id\":167},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_12.png\",\"type\":\"Earring\",\"image_id\":93},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"103 74 74\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/dress/0902005000.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202304/userFile/library/Printboard/42/4ba535c2-a08b-4114-826b-a87885fd3623Fabric-03.png\"},\"type\":\"Dress\",\"image_id\":53549},{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0825000582.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202304/userFile/library/Printboard/42/4ba535c2-a08b-4114-826b-a87885fd3623Fabric-03.png\"},\"type\":\"Skirt\",\"image_id\":53550},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2529.jpg\",\"type\":\"Hairstyle\",\"image_id\":898},{\"color\":\"137 50 50\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_15.png\",\"type\":\"Shoes\",\"image_id\":171},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_15.png\",\"type\":\"Earring\",\"image_id\":96},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"49 127 162\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/outwear/0628001185.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202308/pythonFile/generatePrint/generatePrint-487e93e6-1e21-46b8-b821-3188251dbdbc.jpg\"},\"type\":\"Outwear\",\"image_id\":53551},{\"color\":\"103 74 74\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/trousers/0628000635.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202308/pythonFile/generatePrint/generatePrint-487e93e6-1e21-46b8-b821-3188251dbdbc.jpg\"},\"type\":\"Trousers\",\"image_id\":53552},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2102.jpg\",\"type\":\"Hairstyle\",\"image_id\":471},{\"color\":\"137 50 50\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_41.jpg\",\"type\":\"Shoes\",\"image_id\":344},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_5.png\",\"type\":\"Earring\",\"image_id\":87},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"31 76 171\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/outwear/0902002198.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Outwear\",\"image_id\":53553},{\"color\":\"50 187 147\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0916000791.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Skirt\",\"image_id\":53554},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2518.jpg\",\"type\":\"Hairstyle\",\"image_id\":887},{\"color\":\"137 50 50\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_15.png\",\"type\":\"Shoes\",\"image_id\":171},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_11.png\",\"type\":\"Earring\",\"image_id\":92},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/outwear/0902000892.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Outwear\",\"image_id\":53555},{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/trousers/0916000460.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Trousers\",\"image_id\":53556},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_204.jpg\",\"type\":\"Hairstyle\",\"image_id\":294},{\"color\":\"49 127 162\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_15.png\",\"type\":\"Shoes\",\"image_id\":171},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_5.png\",\"type\":\"Earring\",\"image_id\":87},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/blouse/0902002193.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Blouse\",\"image_id\":53557},{\"color\":\"50 187 147\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0902002112.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Skirt\",\"image_id\":53558},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2186.jpg\",\"type\":\"Hairstyle\",\"image_id\":555},{\"color\":\"204 182 182\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_11.jpg\",\"type\":\"Shoes\",\"image_id\":167},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_12.png\",\"type\":\"Earring\",\"image_id\":93},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/blouse/0902002193.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Blouse\",\"image_id\":53557},{\"color\":\"137 50 50\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0902002861.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Skirt\",\"image_id\":53560},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2128.jpg\",\"type\":\"Hairstyle\",\"image_id\":497},{\"color\":\"49 127 162\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_39.jpg\",\"type\":\"Shoes\",\"image_id\":192},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_4.png\",\"type\":\"Earring\",\"image_id\":86},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/blouse/0902002193.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Blouse\",\"image_id\":53557},{\"color\":\"49 127 162\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0902000567.jpg\",\"print\":{\"path\":\"none\"},\"type\":\"Skirt\",\"image_id\":53562},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2357.jpg\",\"type\":\"Hairstyle\",\"image_id\":726},{\"color\":\"137 50 50\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_6.jpg\",\"type\":\"Shoes\",\"image_id\":163},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_15.png\",\"type\":\"Earring\",\"image_id\":96},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]}]}"; + String param = "{\"objects\":[{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"50 187 147\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/202308/userFile/collection/Sketchboard/42/048419db-38c4-4aee-85a7-33f0666b18d2.jpg\",\"print\":{\"IfSingle\":false,\"level1Type\":\"Printboard\",\"location\":[],\"path\":\"https://www.aida.com.hk/download/202308/pythonFile/generatePrint/generatePrint-14459173-d338-4425-8fcb-8755ceb254bc.jpg\",\"scale\":0.1},\"type\":\"Outwear\",\"image_id\":53547},{\"color\":\"137 50 50\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0628001153.jpg\",\"print\":{\"path\":\"none\",\"IfSingle\":false},\"type\":\"Skirt\",\"image_id\":53548},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_242.jpg\",\"type\":\"Hairstyle\",\"image_id\":411},{\"color\":\"31 76 171\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_11.jpg\",\"type\":\"Shoes\",\"image_id\":167},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_12.png\",\"type\":\"Earring\",\"image_id\":93},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"103 74 74\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/dress/0902005000.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202304/userFile/library/Printboard/42/4ba535c2-a08b-4114-826b-a87885fd3623Fabric-03.png\",\"IfSingle\":false},\"type\":\"Dress\",\"image_id\":53549},{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0825000582.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202304/userFile/library/Printboard/42/4ba535c2-a08b-4114-826b-a87885fd3623Fabric-03.png\",\"IfSingle\":false},\"type\":\"Skirt\",\"image_id\":53550},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2529.jpg\",\"type\":\"Hairstyle\",\"image_id\":898},{\"color\":\"137 50 50\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_15.png\",\"type\":\"Shoes\",\"image_id\":171},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_15.png\",\"type\":\"Earring\",\"image_id\":96},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"49 127 162\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/outwear/0628001185.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202308/pythonFile/generatePrint/generatePrint-487e93e6-1e21-46b8-b821-3188251dbdbc.jpg\"},\"type\":\"Outwear\",\"image_id\":53551},{\"color\":\"103 74 74\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/trousers/0628000635.jpg\",\"print\":{\"path\":\"https://www.aida.com.hk/download/202308/pythonFile/generatePrint/generatePrint-487e93e6-1e21-46b8-b821-3188251dbdbc.jpg\"},\"type\":\"Trousers\",\"image_id\":53552},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2102.jpg\",\"type\":\"Hairstyle\",\"image_id\":471},{\"color\":\"137 50 50\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_41.jpg\",\"type\":\"Shoes\",\"image_id\":344},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_5.png\",\"type\":\"Earring\",\"image_id\":87},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"31 76 171\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/outwear/0902002198.jpg\",\"print\":{\"path\":\"none\",\"IfSingle\":false},\"type\":\"Outwear\",\"image_id\":53553},{\"color\":\"50 187 147\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0916000791.jpg\",\"print\":{\"path\":\"none\",\"IfSingle\":false},\"type\":\"Skirt\",\"image_id\":53554},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2518.jpg\",\"type\":\"Hairstyle\",\"image_id\":887},{\"color\":\"137 50 50\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_15.png\",\"type\":\"Shoes\",\"image_id\":171},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_11.png\",\"type\":\"Earring\",\"image_id\":92},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/outwear/0902000892.jpg\",\"print\":{\"path\":\"none\",\"IfSingle\":false},\"type\":\"Outwear\",\"image_id\":53555},{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/trousers/0916000460.jpg\",\"print\":{\"path\":\"none\",\"IfSingle\":false},\"type\":\"Trousers\",\"image_id\":53556},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_204.jpg\",\"type\":\"Hairstyle\",\"image_id\":294},{\"color\":\"49 127 162\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_15.png\",\"type\":\"Shoes\",\"image_id\":171},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_5.png\",\"type\":\"Earring\",\"image_id\":87},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/blouse/0902002193.jpg\",\"print\":{\"path\":\"none\",\"IfSingle\":false},\"type\":\"Blouse\",\"image_id\":53557},{\"color\":\"50 187 147\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0902002112.jpg\",\"print\":{\"path\":\"none\",\"IfSingle\":false},\"type\":\"Skirt\",\"image_id\":53558},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2186.jpg\",\"type\":\"Hairstyle\",\"image_id\":555},{\"color\":\"204 182 182\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_11.jpg\",\"type\":\"Shoes\",\"image_id\":167},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_12.png\",\"type\":\"Earring\",\"image_id\":93},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/blouse/0902002193.jpg\",\"print\":{\"path\":\"none\",\"IfSingle\":false},\"type\":\"Blouse\",\"image_id\":53557},{\"color\":\"137 50 50\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0902002861.jpg\",\"print\":{\"path\":\"none\",\"IfSingle\":false},\"type\":\"Skirt\",\"image_id\":53560},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2128.jpg\",\"type\":\"Hairstyle\",\"image_id\":497},{\"color\":\"49 127 162\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_39.jpg\",\"type\":\"Shoes\",\"image_id\":192},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_4.png\",\"type\":\"Earring\",\"image_id\":86},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]},{\"basic\":{\"body_point_test\":{\"shoulder_left\":[755,519],\"toe_right\":[850,1355],\"ear_point_left\":[802,439],\"shoulder_right\":[912,519],\"waistband_right\":[891,725],\"hand_point_right\":[915,886],\"waistband_left\":[777,725],\"hand_point_left\":[754,886],\"head_point_left\":[804,424],\"head_point_right\":[864,424],\"ear_point_right\":[865,438],\"toe_left\":[817,1355],\"foot_length\":[784,1336,825,1336],\"head_point_up\":[834,390]},\"scale_bag\":0.7,\"scale_earrings\":0.16,\"self_template\":false,\"single_overall\":\"overall\",\"switch_category\":\"\"},\"items\":[{\"color\":\"204 182 182\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/blouse/0902002193.jpg\",\"print\":{\"path\":\"none\",\"IfSingle\":false},\"type\":\"Blouse\",\"image_id\":53557},{\"color\":\"49 127 162\",\"icon\":\"none\",\"path\":\"https://www.aida.com.hk/download/sys/images/skirt/0902000567.jpg\",\"print\":{\"path\":\"none\",\"IfSingle\":false},\"type\":\"Skirt\",\"image_id\":53562},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/hairstyle/hairstyle_p2357.jpg\",\"type\":\"Hairstyle\",\"image_id\":726},{\"color\":\"137 50 50\",\"path\":\"https://www.aida.com.hk/download/sys/accessories/shoes/shoes_6.jpg\",\"type\":\"Shoes\",\"image_id\":163},{\"path\":\"https://www.aida.com.hk/download/sys/accessories/earring/earrings_15.png\",\"type\":\"Earring\",\"image_id\":96},{\"body_path\":\"model_1693218345.2714431.png\",\"type\":\"Body\",\"image_id\":0}]}]}"; log.info("design请求python 参数:####{}", param); RequestBody body = RequestBody.create(mediaType, param); Request request = new Request.Builder() - .url("http://18.167.251.121:9991") + .url("http://18.167.251.121:9991/api/design") // .url(accessPythonIp + ":10200/aifda/api/v1.0/generate") .method("POST", body) .addHeader("Authorization", "Basic YWlkbGFiOjEyMw==") diff --git a/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java b/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java index ea438064..9a504213 100644 --- a/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java @@ -240,7 +240,7 @@ public class DesignServiceImpl extends ServiceImpl impleme // pythonObjects增加image_id关联 relationImageId(pythonObjects); //design - JSONObject responseJSONObject= pythonService.designNew(pythonObjects); + JSONObject responseJSONObject = pythonService.designNew(pythonObjects); //生成library generateLibrary(elementVO,designDTO.getTimeZone()); //处理关联关系,修复element覆盖得情况 @@ -262,7 +262,9 @@ public class DesignServiceImpl extends ServiceImpl impleme for (DesignPythonItem item : o.getItems()) { String path = item.getPath(); if (StringUtils.isEmpty(path)) { - item.setImageId(null); + String bodyPath = item.getBody_path(); + Long imageId = pythonTAllInfoService.getImageIdByPath(bodyPath); + item.setImageId(imageId); }else { Long imageId = pythonTAllInfoService.getImageIdByPath(path); item.setImageId(imageId); @@ -364,6 +366,9 @@ public class DesignServiceImpl extends ServiceImpl impleme Long designItemId = designItemService.saveOne(designItem); // python design返回入库及封装 JSONObject outfit = data.getJSONObject(i + ""); + if (null == outfit) { + continue; + } TDesignPythonOutfit designPythonOutfit = new TDesignPythonOutfit(); designPythonOutfit.setDesignItemId(designItemId); designPythonOutfit.setUserId(userInfo.getId()); @@ -378,7 +383,30 @@ public class DesignServiceImpl extends ServiceImpl impleme TDesignPythonOutfitDetail designPythonOutfitDetail = new TDesignPythonOutfitDetail(); designPythonOutfitDetail.setDesignId(designId); designPythonOutfitDetail.setDesignPythonOutfitId(designPythonOutfit.getId()); - designPythonOutfitDetail.setPosition(jsonObject.getString("position")); + JSONArray position = jsonObject.getJSONArray("position"); + if (position != null && !CollectionUtils.isEmpty(position)) { + StringBuilder builder = null; + for (int i2 = 0; i2 < position.size(); i2++) { + if (i2 != position.size() - 1) { + builder.append(position.getInteger(i2)).append(","); + }else { + builder.append(position.getInteger(i2)); + } + } + designPythonOutfitDetail.setPosition(builder.toString()); + } + JSONArray imageSize = jsonObject.getJSONArray("image_size"); + if (imageSize != null && !CollectionUtils.isEmpty(position)) { + StringBuilder builder = null; + for (int i2 = 0; i2 < imageSize.size(); i2++) { + if (i2 != imageSize.size() - 1) { + builder.append(imageSize.getInteger(i2)).append(","); + }else { + builder.append(imageSize.getInteger(i2)); + } + } + designPythonOutfitDetail.setImageSize(builder.toString()); + } designPythonOutfitDetail.setImageUrl(jsonObject.getString("image_url")); designPythonOutfitDetail.setImageCategory(jsonObject.getString("image_category")); designPythonOutfitDetail.setMaskUrl(jsonObject.getString("mask_url")); @@ -470,6 +498,7 @@ public class DesignServiceImpl extends ServiceImpl impleme } private List getElementId(ValidateElementVO elementVO){ List elementIds = Lists.newArrayList(); + // collection type if(CollectionUtil.isNotEmpty(elementVO.getSketchBoardElements())){ elementIds.addAll(elementVO.getSketchBoardElements().stream().map(CollectionElement::getId).collect(Collectors.toList())); } @@ -479,9 +508,9 @@ public class DesignServiceImpl extends ServiceImpl impleme if(CollectionUtil.isNotEmpty(elementVO.getPrintBoardElements())){ elementIds.addAll(elementVO.getPrintBoardElements().stream().map(CollectionElement::getId).collect(Collectors.toList())); } - if(CollectionUtil.isNotEmpty(elementVO.getMarketingSketchElements())){ - elementIds.addAll(elementVO.getMarketingSketchElements().stream().map(CollectionElement::getId).collect(Collectors.toList())); - } +// if(CollectionUtil.isNotEmpty(elementVO.getMarketingSketchElements())){ +// elementIds.addAll(elementVO.getMarketingSketchElements().stream().map(CollectionElement::getId).collect(Collectors.toList())); +// } return elementIds; } diff --git a/src/main/java/com/ai/da/service/impl/PanToneServiceImpl.java b/src/main/java/com/ai/da/service/impl/PanToneServiceImpl.java index 41148a13..b3af8521 100644 --- a/src/main/java/com/ai/da/service/impl/PanToneServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/PanToneServiceImpl.java @@ -122,8 +122,8 @@ public class PanToneServiceImpl extends ServiceImpl impl @Override public List getRgbByHsvBatch(List hsvBatch) { - if(hsvBatch.size() >15){ - throw new BusinessException("hsv value cannot exceed the maximum of 15"); + if(hsvBatch.size() >8){ + throw new BusinessException("hsv value cannot exceed the maximum of 8"); } List colorValues = Lists.newArrayList(); Map valueToHsv = Maps.newHashMap(); diff --git a/src/main/resources/mapper/TDesignPythonOutfitDetailMapper.xml b/src/main/resources/mapper/TDesignPythonOutfitDetailMapper.xml index 79ac4aa1..c7fa5b93 100644 --- a/src/main/resources/mapper/TDesignPythonOutfitDetailMapper.xml +++ b/src/main/resources/mapper/TDesignPythonOutfitDetailMapper.xml @@ -12,6 +12,7 @@ +