BUGFIX:色块重复
This commit is contained in:
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user