BUGFIX:色块重复

This commit is contained in:
shahaibo
2024-05-23 16:38:40 +08:00
parent 031d71bf99
commit 02b3a407a9
5 changed files with 17 additions and 6 deletions

View File

@@ -3,10 +3,12 @@ package com.ai.da.model.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
@Data
@EqualsAndHashCode
@ApiModel("设计Collection颜色板 响应")
public class CollectionColorVO {

View File

@@ -3,10 +3,12 @@ package com.ai.da.model.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
@Data
@EqualsAndHashCode
@ApiModel("用户关联的collection-响应")
public class UserLikeCollectionVO {

View File

@@ -673,7 +673,7 @@ public class PythonService {
}
if (attributeRetrievalAttrDict.getOpeningType() != null) {
nonNullFields.add("openingType");
if (tableName.equals("male_outwear") || tableName.equals("male_top")) {
if (tableName.equals("male_outwear") || tableName.equals("male_top") || tableName.equals("male_bottom")) {
nonNullFields.remove("openingType");
attributeRetrievalAttrDict.setOpeningType(null);
}

View File

@@ -187,11 +187,11 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
if (CollectionUtils.isEmpty(ids)) {
return;
}
QueryWrapper<CollectionElement> queryWrapper = new QueryWrapper<>();
queryWrapper.in("id", ids);
CollectionElement collectionElement = new CollectionElement();
collectionElement.setCollectionId(0L);
collectionElementMapper.update(collectionElement, queryWrapper);
// QueryWrapper<CollectionElement> queryWrapper = new QueryWrapper<>();
// queryWrapper.in("id", ids);
// CollectionElement collectionElement = new CollectionElement();
// collectionElement.setCollectionId(0L);
collectionElementMapper.deleteBatchIds(ids);
}
@Override

View File

@@ -1,5 +1,6 @@
package com.ai.da.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.ai.da.common.config.exception.BusinessException;
import com.ai.da.common.enums.CollectionLevel1TypeEnum;
import com.ai.da.common.enums.DesignTypeEnum;
@@ -129,6 +130,12 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
default:
}
});
if (CollectionUtil.isNotEmpty(response.getColorBoards())) {
List<CollectionColorVO> collect = response.getColorBoards().stream()
.distinct()
.collect(Collectors.toList());
response.setColorBoards(collect);
}
return response;
}