BUGFIX:色块重复
This commit is contained in:
@@ -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