|
|
@@ -1,5 +1,6 @@
|
|
|
package com.izouma.nineth.domain;
|
|
|
|
|
|
+import com.izouma.nineth.annotations.Searchable;
|
|
|
import com.izouma.nineth.converter.FileObjectListConverter;
|
|
|
import com.izouma.nineth.enums.AssetShowStatus;
|
|
|
import com.izouma.nineth.enums.AssetStatus;
|
|
|
@@ -73,12 +74,46 @@ public class AssetSuperimposition {
|
|
|
@Enumerated(EnumType.STRING)
|
|
|
private AssetShowStatus assetStatus;
|
|
|
|
|
|
+ private Long assetId;
|
|
|
+
|
|
|
+ @Column(columnDefinition = "tinyint unsigned default 1")
|
|
|
+ private boolean opened = true;
|
|
|
+
|
|
|
+ @ApiModelProperty("类型")
|
|
|
+ @Enumerated(EnumType.STRING)
|
|
|
+ private CollectionType type;
|
|
|
+
|
|
|
+ @ApiModelProperty("状态")
|
|
|
+ @Enumerated(EnumType.STRING)
|
|
|
+ private AssetStatus status;
|
|
|
+
|
|
|
+ @ApiModelProperty("编号")
|
|
|
+ private Integer number;
|
|
|
+
|
|
|
+ @ApiModelProperty("名称")
|
|
|
+ @Searchable
|
|
|
+ private String name;
|
|
|
+
|
|
|
+ @ApiModelProperty("是否公开展示")
|
|
|
+ private boolean publicShow;
|
|
|
+
|
|
|
+ @ApiModelProperty("是否寄售")
|
|
|
+ private boolean consignment;
|
|
|
+
|
|
|
public AssetSuperimposition(Asset asset) {
|
|
|
+ this.assetId = asset.getId();
|
|
|
this.userId = asset.getUserId();
|
|
|
this.minter = asset.getMinter();
|
|
|
this.pic = asset.getPic();
|
|
|
this.prefixName = asset.getPrefixName();
|
|
|
- if (CollectionType.BLIND_BOX.equals(asset.getType()) && asset.isOpened()) {
|
|
|
+ this.consignment = asset.isConsignment();
|
|
|
+ this.publicShow = asset.isPublicShow();
|
|
|
+ this.name = asset.getName();
|
|
|
+ this.number = asset.getNumber();
|
|
|
+ this.status = asset.getStatus();
|
|
|
+ this.type = asset.getType();
|
|
|
+ this.opened = asset.isOpened();
|
|
|
+ if (CollectionType.BLIND_BOX.equals(asset.getType()) && !asset.isOpened()) {
|
|
|
this.setAssetStatus(AssetShowStatus.BLIND_BOX);
|
|
|
this.num = 1;
|
|
|
if (AssetStatus.AUCTIONING.equals(asset.getStatus())) {
|