|
|
@@ -96,7 +96,7 @@ public class AssetService {
|
|
|
.price(price)
|
|
|
.build());
|
|
|
rocketMQTemplate.syncSend(generalProperties.getMintTopic(), asset.getId());
|
|
|
- return publicShow(asset.getId());
|
|
|
+ return asset;
|
|
|
}
|
|
|
|
|
|
public Asset createAsset(BlindBoxItem winItem, User user, Long orderId, BigDecimal price, String type,
|
|
|
@@ -120,17 +120,17 @@ public class AssetService {
|
|
|
.price(price)
|
|
|
.build());
|
|
|
rocketMQTemplate.syncSend(generalProperties.getMintTopic(), asset.getId());
|
|
|
- return publicShow(asset.getId());
|
|
|
+ return asset;
|
|
|
}
|
|
|
|
|
|
|
|
|
- public Asset publicShow(Long id) {
|
|
|
+ public void publicShow(Long id) {
|
|
|
Asset asset = assetRepo.findById(id).orElseThrow(new BusinessException("无记录"));
|
|
|
if (!asset.getUserId().equals(SecurityUtils.getAuthenticatedUser().getId())) {
|
|
|
throw new BusinessException("此藏品不属于你");
|
|
|
}
|
|
|
if (asset.isPublicShow()) {
|
|
|
- return asset;
|
|
|
+ return;
|
|
|
}
|
|
|
if (asset.getStatus() != AssetStatus.NORMAL) {
|
|
|
throw new BusinessException("当前状态不可展示");
|
|
|
@@ -165,7 +165,6 @@ public class AssetService {
|
|
|
asset.setPublicShow(true);
|
|
|
asset.setPublicCollectionId(collection.getId());
|
|
|
assetRepo.save(asset);
|
|
|
- return asset;
|
|
|
}
|
|
|
|
|
|
public synchronized void consignment(Long id, BigDecimal price) {
|