|
|
@@ -75,6 +75,7 @@ public class AssetService {
|
|
|
|
|
|
public Asset createAsset(Order order) {
|
|
|
User user = userRepo.findById(order.getUserId()).orElseThrow(new BusinessException("用户不存在"));
|
|
|
+ Collection collection = collectionRepo.findById(order.getCollectionId()).orElseThrow(new BusinessException("藏品不存在"));
|
|
|
Asset asset = Asset.builder()
|
|
|
.userId(user.getId())
|
|
|
.orderId(order.getId())
|
|
|
@@ -86,6 +87,7 @@ public class AssetService {
|
|
|
.detail(order.getDetail())
|
|
|
.pic(order.getPic())
|
|
|
.properties(order.getProperties())
|
|
|
+ .privileges(collection.getPrivileges())
|
|
|
.category(order.getCategory())
|
|
|
.canResale(order.isCanResale())
|
|
|
.royalties(order.getRoyalties())
|
|
|
@@ -124,6 +126,7 @@ public class AssetService {
|
|
|
.detail(winItem.getDetail())
|
|
|
.pic(winItem.getPic())
|
|
|
.properties(winItem.getProperties())
|
|
|
+ .privileges(winItem.getPrivileges())
|
|
|
.canResale(winItem.isCanResale())
|
|
|
.royalties(winItem.getRoyalties())
|
|
|
.serviceCharge(winItem.getServiceCharge())
|