Browse Source

相册bug

wangqifan 3 years ago
parent
commit
6a3c0158f8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/java/com/izouma/nineth/service/PhotoAssetService.java

+ 1 - 1
src/main/java/com/izouma/nineth/service/PhotoAssetService.java

@@ -75,7 +75,7 @@ public class PhotoAssetService {
         PhotoAsset photoAsset = photoAssetRepo.findById(id).orElseThrow(new BusinessException("无记录"));
         photoAsset.setStatus(CollectionStatus.FAIL);
 
-        Asset asset = assetRepo.findById(photoAsset.getId()).orElseThrow(new BusinessException("无藏品记录"));
+        Asset asset = assetRepo.findById(photoAsset.getDestroyAssetId()).orElseThrow(new BusinessException("无藏品记录"));
         asset.setStatus(AssetStatus.NORMAL);
         assetRepo.saveAndFlush(asset);
         photoAssetRepo.save(photoAsset);