|
|
@@ -372,7 +372,7 @@ public class AssetService {
|
|
|
.toUser(owner.getNickname())
|
|
|
.toUserId(owner.getId())
|
|
|
.toAvatar(owner.getAvatar())
|
|
|
- .operation("出售")
|
|
|
+ .operation("已出售")
|
|
|
.price(order.getPrice())
|
|
|
.build();
|
|
|
t.setCreatedAt(asset.getCreatedAt());
|
|
|
@@ -402,9 +402,9 @@ public class AssetService {
|
|
|
userHistory.setAssetName(asset.map(Asset::getName).orElse(null));
|
|
|
userHistory.setPic(asset.map(Asset::getPic).orElse(new ArrayList<>()));
|
|
|
switch (tokenHistory.getOperation()) {
|
|
|
- case "出售":
|
|
|
+ case "已出售":
|
|
|
case "转让":
|
|
|
- userHistory.setDescription(tokenHistory.getToUserId().equals(userId) ? "作品交易——买入" : "作品交易——售出");
|
|
|
+ userHistory.setDescription(tokenHistory.getToUserId().equals(userId) ? "作品交易——已购买" : "作品交易——售出");
|
|
|
break;
|
|
|
case "空投":
|
|
|
userHistory.setDescription("空投");
|
|
|
@@ -428,8 +428,8 @@ public class AssetService {
|
|
|
if (ObjectUtils.isNotEmpty(query.get("operation"))){
|
|
|
String operation = (String) query.get("operation");
|
|
|
switch (operation){
|
|
|
- case "买入":
|
|
|
- and.add(criteriaBuilder.or(criteriaBuilder.equal(root.get("operation"), "出售"),criteriaBuilder.equal(root.get("operation"), "转让"),criteriaBuilder.equal(root.get("operation"), "空投")));
|
|
|
+ case "已购买":
|
|
|
+ and.add(criteriaBuilder.or(criteriaBuilder.equal(root.get("operation"), "已出售"),criteriaBuilder.equal(root.get("operation"), "转让"),criteriaBuilder.equal(root.get("operation"), "空投")));
|
|
|
and.add(criteriaBuilder.and(criteriaBuilder.equal(root.get("toUserId"), userId)));
|
|
|
break;
|
|
|
case "卖出":
|
|
|
@@ -459,16 +459,16 @@ public class AssetService {
|
|
|
userHistory.setAssetName(asset.map(Asset::getName).orElse(null));
|
|
|
userHistory.setPic(asset.map(Asset::getPic).orElse(new ArrayList<>()));
|
|
|
switch (tokenHistory.getOperation()) {
|
|
|
- case "出售":
|
|
|
+ case "已出售":
|
|
|
case "转让":
|
|
|
- userHistory.setDescription(tokenHistory.getToUserId().equals(userId) ? "买入" : "卖出");
|
|
|
+ userHistory.setDescription(tokenHistory.getToUserId().equals(userId) ? "已购买" : "已出售");
|
|
|
break;
|
|
|
case "空投":
|
|
|
- userHistory.setDescription("买入");
|
|
|
+ userHistory.setDescription("已购买");
|
|
|
break;
|
|
|
case "转赠":
|
|
|
//userHistory.setDescription(tokenHistory.getToUserId().equals(userId) ? "他人赠送" : "作品赠送");
|
|
|
- userHistory.setDescription("赠送");
|
|
|
+ userHistory.setDescription("已赠送");
|
|
|
break;
|
|
|
}
|
|
|
|