|
|
@@ -711,7 +711,7 @@ public class AssetService {
|
|
|
}
|
|
|
|
|
|
public void transfer(Asset asset, BigDecimal price, User toUser, TransferReason reason, Long orderId) {
|
|
|
- transfer(asset, price, toUser, reason, orderId, false);
|
|
|
+ transfer(asset, price, toUser, reason, orderId, false, asset.getTags());
|
|
|
}
|
|
|
|
|
|
private User createFakeUser() {
|
|
|
@@ -724,7 +724,7 @@ public class AssetService {
|
|
|
.build());
|
|
|
}
|
|
|
|
|
|
- public void transfer(Asset asset, BigDecimal price, User toUser, TransferReason reason, Long orderId, boolean safeFlag) {
|
|
|
+ public void transfer(Asset asset, BigDecimal price, User toUser, TransferReason reason, Long orderId, boolean safeFlag, Set<Tag> tags) {
|
|
|
Objects.requireNonNull(asset, "原藏品不能为空");
|
|
|
Objects.requireNonNull(toUser, "转让人不能为空");
|
|
|
Objects.requireNonNull(reason, "转让原因不能为空");
|
|
|
@@ -744,6 +744,7 @@ public class AssetService {
|
|
|
newAsset.setPublicShow(false);
|
|
|
newAsset.setConsignment(false);
|
|
|
newAsset.setPublicCollectionId(null);
|
|
|
+ newAsset.setTags(new HashSet<>(tags));
|
|
|
asset.setTags(new HashSet<>());
|
|
|
newAsset.setStatus(AssetStatus.NORMAL);
|
|
|
newAsset.setPrice(price);
|
|
|
@@ -757,9 +758,6 @@ public class AssetService {
|
|
|
}
|
|
|
|
|
|
newAsset.setSource(TransferReason.GIFT == reason ? AssetSource.GIFT : AssetSource.TRANSFER);
|
|
|
- if (!newAsset.getType().equals(CollectionType.DOMAIN)) {
|
|
|
- newAsset.setTags(new HashSet<>(asset.getTags()));
|
|
|
- }
|
|
|
newAsset.setSafeFlag(safeFlag);
|
|
|
newAsset.setHoldDays(asset.getOldHoldDays());
|
|
|
if (asset.getType().equals(CollectionType.PICTURE)) {
|