|
|
@@ -110,7 +110,12 @@ public class OrderService {
|
|
|
if (!collection.isSalable()) {
|
|
|
throw new BusinessException("该藏品当前不可购买");
|
|
|
}
|
|
|
-
|
|
|
+ if (collection.getAssetId() != null) {
|
|
|
+ Asset asset = assetRepo.findById(collection.getAssetId()).orElseThrow(new BusinessException("藏品不存在"));
|
|
|
+ if (asset.getStatus() != AssetStatus.NORMAL) {
|
|
|
+ throw new BusinessException("藏品已下架");
|
|
|
+ }
|
|
|
+ }
|
|
|
UserAddress userAddress = null;
|
|
|
if (addressId != null) {
|
|
|
userAddress = userAddressRepo.findById(addressId).orElseThrow(new BusinessException("地址信息不存在"));
|