|
|
@@ -62,6 +62,9 @@ public class PhotoAssetService {
|
|
|
if (asset.getPic() != null) {
|
|
|
record.setDestroyAssetPicture(asset.getPic().get(0));
|
|
|
}
|
|
|
+ if (record.getPrice().compareTo(BigDecimal.ZERO) == 0) {
|
|
|
+ record.setOrderStatus(OrderStatus.FINISH);
|
|
|
+ }
|
|
|
} else {
|
|
|
record.setOrderStatus(OrderStatus.NOT_PAID);
|
|
|
}
|
|
|
@@ -71,7 +74,8 @@ public class PhotoAssetService {
|
|
|
public void pass(PhotoAsset photoAsset) {
|
|
|
//销毁原来的藏品
|
|
|
if (photoAsset.isDestroyed()) {
|
|
|
- assetService.destroyWithoutTradeCode(photoAsset.getDestroyAssetId(), photoAsset.getUserId(), OperationSource.RAEX, null);
|
|
|
+ assetService.destroyWithoutTradeCode(photoAsset.getDestroyAssetId(), photoAsset
|
|
|
+ .getUserId(), OperationSource.RAEX, null);
|
|
|
}
|
|
|
//生成新的藏品
|
|
|
if (photoAsset.getOrderStatus().equals(OrderStatus.FINISH)) {
|
|
|
@@ -91,7 +95,9 @@ 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);;
|
|
|
+ assetService.destroyWithoutTradeCode(photoAsset.getDestroyAssetId(), photoAsset
|
|
|
+ .getUserId(), OperationSource.RAEX, null);
|
|
|
+ ;
|
|
|
photoAssetRepo.save(photoAsset);
|
|
|
}
|
|
|
|