|
|
@@ -33,7 +33,8 @@ public class ShowroomService {
|
|
|
private SysConfigService sysConfigService;
|
|
|
|
|
|
public Page<Showroom> all(PageQuery pageQuery) {
|
|
|
- return showroomRepo.findAll(JpaUtils.toSpecification(pageQuery, Showroom.class), JpaUtils.toPageRequest(pageQuery));
|
|
|
+ return showroomRepo
|
|
|
+ .findAll(JpaUtils.toSpecification(pageQuery, Showroom.class), JpaUtils.toPageRequest(pageQuery));
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
@@ -94,6 +95,8 @@ public class ShowroomService {
|
|
|
if ("video/mp4".equals(pic.getType())) {
|
|
|
showCollection.setPic(pic.getThumb());
|
|
|
}
|
|
|
+ showCollection.setAssetStatus(assetRepo.findById(collection.getAssetId())
|
|
|
+ .orElse(Asset.builder().status(AssetStatus.NORMAL).build()).getStatus());
|
|
|
showCollection.setShowroomId(show.getId());
|
|
|
showCollection.setAssetId(collection.getAssetId());
|
|
|
showCollectionRepo.save(showCollection);
|
|
|
@@ -177,7 +180,7 @@ public class ShowroomService {
|
|
|
Set<Long> removeRecord = new HashSet<>(showCollectionMap.keySet());
|
|
|
|
|
|
if (CollUtil.isNotEmpty(showCollections)) {
|
|
|
- showCollections = showCollections.stream().distinct().collect(Collectors.toList());
|
|
|
+ showCollections = showCollections.stream().distinct().collect(Collectors.toList());
|
|
|
|
|
|
if (recordRoom.getMaxCollection() < showCollections.size()) {
|
|
|
throw new BusinessException("选择的藏品数量大于最多可放置数量");
|
|
|
@@ -221,6 +224,8 @@ public class ShowroomService {
|
|
|
coll.setPic(pic.getThumb());
|
|
|
}
|
|
|
coll.setShowroomId(recordRoom.getId());
|
|
|
+ showCollection.setAssetStatus(assetRepo.findById(collection.getAssetId())
|
|
|
+ .orElse(Asset.builder().status(AssetStatus.NORMAL).build()).getStatus());
|
|
|
// 可能没有
|
|
|
coll.setAssetId(collection.getAssetId());
|
|
|
|