Browse Source

支付图片

wangqifan 3 years ago
parent
commit
471154b58a
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/main/java/com/izouma/nineth/service/PhotoAssetService.java

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

@@ -110,8 +110,10 @@ public class PhotoAssetService {
 //        Asset asset = assetRepo.findById(photoAsset.getDestroyAssetId()).orElseThrow(new BusinessException("无藏品记录"));
 //        asset.setStatus(AssetStatus.NORMAL);
 //        assetRepo.saveAndFlush(asset);
-        assetService.destroyWithoutTradeCode(photoAsset.getDestroyAssetId(), photoAsset
-                .getUserId(), OperationSource.RAEX, null);
+        if (photoAsset.getDestroyAssetId() != null) {
+            assetService.destroyWithoutTradeCode(photoAsset.getDestroyAssetId(), photoAsset
+                    .getUserId(), OperationSource.RAEX, null);
+        }
         ;
         photoAssetRepo.save(photoAsset);
     }