|
|
@@ -332,6 +332,16 @@ public class AssetService {
|
|
|
.findAny();
|
|
|
userHistory.setAssetName(asset.map(Asset::getName).orElse(null));
|
|
|
userHistory.setPic(asset.map(Asset::getPic).orElse(new ArrayList<>()));
|
|
|
+ switch (tokenHistory.getOperation()) {
|
|
|
+ case "出售":
|
|
|
+ userHistory.setDescription(tokenHistory.getToUserId().equals(userId) ? "作品交易——买入" : "作品交易——售出");
|
|
|
+ case "空投":
|
|
|
+ userHistory.setDescription("空投");
|
|
|
+ case "转赠":
|
|
|
+ userHistory.setDescription(tokenHistory.getToUserId().equals(userId) ? "他人赠送" : "作品赠送");
|
|
|
+ case "转让":
|
|
|
+ userHistory.setDescription(tokenHistory.getToUserId().equals(userId) ? "作品交易——买入" : "作品交易——售出");
|
|
|
+ }
|
|
|
return userHistory;
|
|
|
});
|
|
|
}
|