From 63513df053a2e49c471068b2c8079b367cd0b8f6 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Fri, 28 Mar 2025 11:05:45 +0800 Subject: [PATCH] =?UTF-8?q?TASK:=E6=A8=A1=E5=9D=97=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../primary/entity/ProductImageAttribute.java | 2 ++ .../entity/AttributeRecognitionJSON.java | 24 +++++++++++++++++++ .../da/service/impl/LibraryServiceImpl.java | 4 +++- .../impl/UserLikeGroupServiceImpl.java | 17 ++++++------- 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/ai/da/mapper/primary/entity/ProductImageAttribute.java b/src/main/java/com/ai/da/mapper/primary/entity/ProductImageAttribute.java index 129eb32b..7ea73085 100644 --- a/src/main/java/com/ai/da/mapper/primary/entity/ProductImageAttribute.java +++ b/src/main/java/com/ai/da/mapper/primary/entity/ProductImageAttribute.java @@ -32,4 +32,6 @@ public class ProductImageAttribute implements Serializable { private String subtype; private String style; + + private Long libraryId; } diff --git a/src/main/java/com/ai/da/mapper/secondary/entity/AttributeRecognitionJSON.java b/src/main/java/com/ai/da/mapper/secondary/entity/AttributeRecognitionJSON.java index a04f4e4b..2855ee80 100644 --- a/src/main/java/com/ai/da/mapper/secondary/entity/AttributeRecognitionJSON.java +++ b/src/main/java/com/ai/da/mapper/secondary/entity/AttributeRecognitionJSON.java @@ -1,5 +1,6 @@ package com.ai.da.mapper.secondary.entity; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; import java.util.List; @@ -7,16 +8,39 @@ import java.util.List; @Data public class AttributeRecognitionJSON { private Long id; + @JsonProperty("img_name") private List imgName; + + @JsonProperty("length") private List length; + + @JsonProperty("sleeve_length") private List sleeveLength; + + @JsonProperty("sleeve_shape") private List sleeveShape; + + @JsonProperty("sleeve_shoulder") private List sleeveShoulder; + + @JsonProperty("neckline") private List neckline; + + @JsonProperty("collar") private List collar; + + @JsonProperty("design") private List design; + + @JsonProperty("silhouette") private List silhouette; + + @JsonProperty("type") private List type; + + @JsonProperty("opening_type") private List openingType; + + @JsonProperty("subtype") private List subtype; } diff --git a/src/main/java/com/ai/da/service/impl/LibraryServiceImpl.java b/src/main/java/com/ai/da/service/impl/LibraryServiceImpl.java index 3fb9efb2..5a4cf88d 100644 --- a/src/main/java/com/ai/da/service/impl/LibraryServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/LibraryServiceImpl.java @@ -163,7 +163,9 @@ public class LibraryServiceImpl extends ServiceImpl impl QueryWrapper qw = new QueryWrapper<>(); qw.lambda().eq(BrandRelLibrary::getBrandId, query.getBrandId()); Set collect = brandRelLibraryMapper.selectList(qw).stream().map(BrandRelLibrary::getLibraryId).collect(Collectors.toSet()); - queryWrapper.in("id", collect); + if (!CollectionUtils.isEmpty(collect)) { + queryWrapper.in("id", collect); + } } // 新增分类过滤 diff --git a/src/main/java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java b/src/main/java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java index bf28811f..35db6a04 100644 --- a/src/main/java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java @@ -1169,14 +1169,15 @@ public class UserLikeGroupServiceImpl extends ServiceImpl