|
|
@@ -127,10 +127,12 @@ public class ShowroomService {
|
|
|
showCollections.forEach(coll -> {
|
|
|
if (coll.getId() != null) {
|
|
|
ShowCollection showCollection = showCollectionMap.get(coll.getId());
|
|
|
- ObjUtils.merge(showCollection, coll);
|
|
|
- showCollectionRepo.save(showCollection);
|
|
|
- // 移除掉
|
|
|
- removeRecord.remove(coll.getId());
|
|
|
+ if (ObjectUtils.isNotEmpty(showCollection)) {
|
|
|
+ ObjUtils.merge(showCollection, coll);
|
|
|
+ showCollectionRepo.save(showCollection);
|
|
|
+ // 移除掉
|
|
|
+ removeRecord.remove(coll.getId());
|
|
|
+ }
|
|
|
} else {
|
|
|
Collection collection = collectionMap.get(coll.getCollectionId());
|
|
|
if (ObjectUtils.isNotEmpty(collection)) {
|