From a10d30337ab3b1430b317d3693253a03d2628f05 Mon Sep 17 00:00:00 2001 From: xupei Date: Thu, 1 Aug 2024 10:30:44 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E4=B8=BAlive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/payment.properties | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/main/resources/payment.properties b/src/main/resources/payment.properties index b42ffac7..56e5a315 100644 --- a/src/main/resources/payment.properties +++ b/src/main/resources/payment.properties @@ -1,12 +1,12 @@ ##### PayPal # developer-sandbox-xp -paypal.client-id=ATbaebYi7-GXWRWJqwRLYMzKEbwjh4BFRqD4Y13i4lZq0rplWIM_IpPrtPKpdkAt_KrPXd6IJTwsDqa5 -paypal.client-secret=EHWWJqGmmbfjLXqCUpGrvxRYBPPtWvA3hR5ZaAyHlGSVJiHoQPS8skbNaJ9h39VObnchUbgiY2pPu__s -paypal.receiver.email=sb-ukxfk29608925@business.example.com -paypal.mode=sandbox +#paypal.client-id=ATbaebYi7-GXWRWJqwRLYMzKEbwjh4BFRqD4Y13i4lZq0rplWIM_IpPrtPKpdkAt_KrPXd6IJTwsDqa5 +#paypal.client-secret=EHWWJqGmmbfjLXqCUpGrvxRYBPPtWvA3hR5ZaAyHlGSVJiHoQPS8skbNaJ9h39VObnchUbgiY2pPu__s +#paypal.receiver.email=sb-ukxfk29608925@business.example.com +#paypal.mode=sandbox # local -paypal.webhook_id=31797347YC028794L +#paypal.webhook_id=31797347YC028794L # dev #paypal.webhook_id=51V87014T6406322F @@ -18,12 +18,11 @@ paypal.webhook_id=31797347YC028794L #paypal.webhook_id=1WH327112B602422N # aida-live-kim -#paypal.client-id=ASWSIZ3MXJU5w5VOeOHeigWcSw6iinl30ZCipruziKpHclxP0ryf8-7VKG1Ba2VwZwa2DMvGEzTfCTgz -#paypal.client-secret=EHQg_K5PSqmp4FJlzEcOEH_kFkmq4aBzaI7jridw53L6cOQRULBAnfv2KakRfrsqaU1PDSkO4Co9Vyxc -#paypal.receiver.email=kimwong@code-create.com.hk -#paypal.mode=live -#paypal.webhook_id=41L14847MC833625B -#paypal.webhook_id=1D107312EX592781K +paypal.client-id=ASWSIZ3MXJU5w5VOeOHeigWcSw6iinl30ZCipruziKpHclxP0ryf8-7VKG1Ba2VwZwa2DMvGEzTfCTgz +paypal.client-secret=EHQg_K5PSqmp4FJlzEcOEH_kFkmq4aBzaI7jridw53L6cOQRULBAnfv2KakRfrsqaU1PDSkO4Co9Vyxc +paypal.receiver.email=kimwong@code-create.com.hk +paypal.mode=live +paypal.webhook_id=1D107312EX592781K ##### Stripe From fada00c7388d1400f458c2699ba7a7351a527bcd Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Fri, 2 Aug 2024 11:36:58 +0800 Subject: [PATCH 2/7] =?UTF-8?q?BUGFIX:=E8=BF=87=E6=BB=A4=E5=B7=B2=E5=BA=9F?= =?UTF-8?q?=E5=BC=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../secondary/AttributeRetrievalMapper.java | 6 ++-- .../java/com/ai/da/python/PythonService.java | 33 ++++++++++++++----- .../secondary/AttributeRetrievalMapper.xml | 12 +++++-- 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/ai/da/mapper/secondary/AttributeRetrievalMapper.java b/src/main/java/com/ai/da/mapper/secondary/AttributeRetrievalMapper.java index 1c3be31b..772d63df 100644 --- a/src/main/java/com/ai/da/mapper/secondary/AttributeRetrievalMapper.java +++ b/src/main/java/com/ai/da/mapper/secondary/AttributeRetrievalMapper.java @@ -17,11 +17,11 @@ import java.util.List; public interface AttributeRetrievalMapper { - List getSystemSketchPool(@Param("attributeRetrievalAttrDict") AttributeRetrieval attributeRetrievalAttrDict, @Param("tableName") String tableName, @Param("poolNum") int poolNum, @Param("style") String style); + List getSystemSketchPool(@Param("attributeRetrievalAttrDict") AttributeRetrieval attributeRetrievalAttrDict, @Param("tableName") String tableName, @Param("poolNum") int poolNum, @Param("style") String style, @Param("isFemaleTable") boolean isFemaleTable); - AttributeRetrieval getSystemRandom(String tableName, String style); + AttributeRetrieval getSystemRandom(String tableName, String style, boolean isFemaleTable); - List getSystemSketchPoolBySameCategory(AttributeRetrieval attributeRetrievalAttrDict, String tableName, String style); + List getSystemSketchPoolBySameCategory(AttributeRetrieval attributeRetrievalAttrDict, String tableName, String style, boolean isFemaleTable); Long getIdByFileName(String fileName, String tableName); diff --git a/src/main/java/com/ai/da/python/PythonService.java b/src/main/java/com/ai/da/python/PythonService.java index 3dd32bb3..0dd6163c 100644 --- a/src/main/java/com/ai/da/python/PythonService.java +++ b/src/main/java/com/ai/da/python/PythonService.java @@ -644,14 +644,18 @@ public class PythonService { AttributeRetrieval attributeRetrievalAttrDict = toAttrDict(attrDictJSON); String tableName; tableName = getTableName(modelSex, styleCategory); - List attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPool(attributeRetrievalAttrDict, tableName, poolNum, style); + boolean isFemaleTable = false; + if (tableName.contains("female")) { + isFemaleTable = true; + } + List attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPool(attributeRetrievalAttrDict, tableName, poolNum, style, isFemaleTable); if (CollectionUtil.isEmpty(attributeRetrievalList) || attributeRetrievalList.size() < poolNum) { attributeRetrievalAttrDict.setDesign(null); - attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPool(attributeRetrievalAttrDict, tableName, poolNum, style); + attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPool(attributeRetrievalAttrDict, tableName, poolNum, style, isFemaleTable); } if (CollectionUtil.isEmpty(attributeRetrievalList) || attributeRetrievalList.size() < poolNum) { attributeRetrievalAttrDict.setSilhouette(null); - attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPool(attributeRetrievalAttrDict, tableName, poolNum, style); + attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPool(attributeRetrievalAttrDict, tableName, poolNum, style, isFemaleTable); } return toColoectionElementList(attributeRetrievalList, styleCategory, modelSex); } @@ -670,7 +674,10 @@ public class PythonService { AttributeRetrieval attributeRetrievalAttrDict = toAttrDict(attrDictJSON); String tableName; tableName = getTableName(modelSex, styleCategory); - + boolean isFemaleTable = false; + if (tableName.contains("female")) { + isFemaleTable = true; + } // 存储非空字段的列表 List nonNullFields = new ArrayList<>(); if (attributeRetrievalAttrDict.getType() != null) { @@ -712,7 +719,7 @@ public class PythonService { } } - List attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPoolBySameCategory(attributeRetrievalAttrDict, tableName, style); + List attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPoolBySameCategory(attributeRetrievalAttrDict, tableName, style, isFemaleTable); if (CollectionUtil.isEmpty(attributeRetrievalList)) { System.out.println(attributeRetrievalAttrDict); System.out.println(tableName); @@ -720,12 +727,12 @@ public class PythonService { attributeRetrievalAttrDict.setType(null); attributeRetrievalAttrDict.setOpeningType(null); attributeRetrievalAttrDict.setSubtype(null); - attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPoolBySameCategory(attributeRetrievalAttrDict, tableName, style); + attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPoolBySameCategory(attributeRetrievalAttrDict, tableName, style, isFemaleTable); }else { attributeRetrievalAttrDict.setType(null); attributeRetrievalAttrDict.setOpeningType(null); attributeRetrievalAttrDict.setSubtype(null); - attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPoolBySameCategory(attributeRetrievalAttrDict, tableName, style); + attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPoolBySameCategory(attributeRetrievalAttrDict, tableName, style, isFemaleTable); } } return toColoectionElementList(attributeRetrievalList, styleCategory, modelSex); @@ -946,7 +953,11 @@ public class PythonService { Integer randomNum = RandomsUtil.randomSysFile(dressings.size()); String category = dressings.get(randomNum).getStyleCategory(); String tableName = getTableName(validateElementVO.getModelSex(), category); - AttributeRetrieval attributeRetrieval = attributeRetrievalMapper.getSystemRandom(tableName, validateElementVO.getStyle()); + boolean isFemaleTable = false; + if (tableName.contains("female")) { + isFemaleTable = true; + } + AttributeRetrieval attributeRetrieval = attributeRetrievalMapper.getSystemRandom(tableName, validateElementVO.getStyle(), isFemaleTable); CollectionElement collectionElement = toCollectionElement(attributeRetrieval, category, validateElementVO.getModelSex()); return coverSketchToDesignPythonItem(null, collectionElement, validateElementVO); } @@ -986,7 +997,11 @@ public class PythonService { Integer randomNum = RandomsUtil.randomSysFile(dressings.size()); String category = dressings.get(randomNum).getStyleCategory(); String tableName = getTableName(validateElementVO.getModelSex(), category); - AttributeRetrieval attributeRetrieval = attributeRetrievalMapper.getSystemRandom(tableName, validateElementVO.getStyle()); + boolean isFemaleTable = false; + if (tableName.contains("female")) { + isFemaleTable = true; + } + AttributeRetrieval attributeRetrieval = attributeRetrievalMapper.getSystemRandom(tableName, validateElementVO.getStyle(), isFemaleTable); CollectionElement collectionElement = toCollectionElement(attributeRetrieval, category, validateElementVO.getModelSex()); return coverSketchToDesignPythonItem(null, collectionElement, validateElementVO); } diff --git a/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml b/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml index bcdfa819..ed6bc6a6 100644 --- a/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml +++ b/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml @@ -32,7 +32,9 @@ AND style = #{style} - + + AND deprecated = 0 + ORDER BY RAND() @@ -48,7 +50,9 @@ AND style = #{style} - + + AND deprecated = 0 + ORDER BY RAND() @@ -73,7 +77,9 @@ AND style = #{style} - + + AND deprecated = 0 + ORDER BY RAND() From 653264151ad785572b7883a768e7cfd11c003e10 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Fri, 2 Aug 2024 11:53:50 +0800 Subject: [PATCH 3/7] =?UTF-8?q?BUGFIX:=E8=BF=87=E6=BB=A4=E5=B7=B2=E5=BA=9F?= =?UTF-8?q?=E5=BC=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ai/da/python/PythonService.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/ai/da/python/PythonService.java b/src/main/java/com/ai/da/python/PythonService.java index 0dd6163c..4285aea5 100644 --- a/src/main/java/com/ai/da/python/PythonService.java +++ b/src/main/java/com/ai/da/python/PythonService.java @@ -728,11 +728,12 @@ public class PythonService { attributeRetrievalAttrDict.setOpeningType(null); attributeRetrievalAttrDict.setSubtype(null); attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPoolBySameCategory(attributeRetrievalAttrDict, tableName, style, isFemaleTable); - }else { - attributeRetrievalAttrDict.setType(null); - attributeRetrievalAttrDict.setOpeningType(null); - attributeRetrievalAttrDict.setSubtype(null); + } + + if (CollectionUtil.isEmpty(attributeRetrievalList)) { + style = null; attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPoolBySameCategory(attributeRetrievalAttrDict, tableName, style, isFemaleTable); + } } return toColoectionElementList(attributeRetrievalList, styleCategory, modelSex); From 7aa1fc0342424c5622c8b8486ff63c967aa2082e Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Fri, 2 Aug 2024 11:56:17 +0800 Subject: [PATCH 4/7] =?UTF-8?q?BUGFIX:=E8=BF=87=E6=BB=A4=E5=B7=B2=E5=BA=9F?= =?UTF-8?q?=E5=BC=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ai/da/python/PythonService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/ai/da/python/PythonService.java b/src/main/java/com/ai/da/python/PythonService.java index 4285aea5..789866e5 100644 --- a/src/main/java/com/ai/da/python/PythonService.java +++ b/src/main/java/com/ai/da/python/PythonService.java @@ -657,6 +657,10 @@ public class PythonService { attributeRetrievalAttrDict.setSilhouette(null); attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPool(attributeRetrievalAttrDict, tableName, poolNum, style, isFemaleTable); } + if (CollectionUtil.isEmpty(attributeRetrievalList) || attributeRetrievalList.size() < poolNum) { + style = null; + attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPool(attributeRetrievalAttrDict, tableName, poolNum, style, isFemaleTable); + } return toColoectionElementList(attributeRetrievalList, styleCategory, modelSex); } From 685ba09f7d319da9aa8620e5304e97c67c7ef561 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Fri, 2 Aug 2024 12:13:32 +0800 Subject: [PATCH 5/7] =?UTF-8?q?BUGFIX:=E8=BF=87=E6=BB=A4=E5=B7=B2=E5=BA=9F?= =?UTF-8?q?=E5=BC=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/secondary/AttributeRetrievalMapper.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml b/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml index ed6bc6a6..c8ac3ccf 100644 --- a/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml +++ b/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml @@ -33,7 +33,7 @@ AND style = #{style} - AND deprecated = 0 + AND deprecated != 1 ORDER BY @@ -51,7 +51,7 @@ AND style = #{style} - AND deprecated = 0 + AND deprecated != 1 ORDER BY @@ -78,7 +78,7 @@ AND style = #{style} - AND deprecated = 0 + AND deprecated != 1 ORDER BY From e0332b9ddfb5bc31c1478391070b8ba4a577e9ae Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Fri, 2 Aug 2024 12:21:30 +0800 Subject: [PATCH 6/7] =?UTF-8?q?BUGFIX:=E8=BF=87=E6=BB=A4=E5=B7=B2=E5=BA=9F?= =?UTF-8?q?=E5=BC=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/secondary/AttributeRetrievalMapper.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml b/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml index c8ac3ccf..b3ae0138 100644 --- a/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml +++ b/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml @@ -33,7 +33,7 @@ AND style = #{style} - AND deprecated != 1 + AND deprecated is null ORDER BY @@ -51,7 +51,7 @@ AND style = #{style} - AND deprecated != 1 + AND deprecated is null ORDER BY @@ -78,7 +78,7 @@ AND style = #{style} - AND deprecated != 1 + AND deprecated is null ORDER BY From 5a09d7a195b4722c42dedc31b9092eab2471d1b9 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Fri, 2 Aug 2024 12:28:58 +0800 Subject: [PATCH 7/7] =?UTF-8?q?BUGFIX:=E8=BF=87=E6=BB=A4=E5=B7=B2=E5=BA=9F?= =?UTF-8?q?=E5=BC=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/secondary/AttributeRetrievalMapper.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml b/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml index b3ae0138..ed6bc6a6 100644 --- a/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml +++ b/src/main/resources/mapper/secondary/AttributeRetrievalMapper.xml @@ -33,7 +33,7 @@ AND style = #{style} - AND deprecated is null + AND deprecated = 0 ORDER BY @@ -51,7 +51,7 @@ AND style = #{style} - AND deprecated is null + AND deprecated = 0 ORDER BY @@ -78,7 +78,7 @@ AND style = #{style} - AND deprecated is null + AND deprecated = 0 ORDER BY