记得上下班打卡 | git大法好,push需谨慎

Commit ba0299d8 authored by 张国柄's avatar 张国柄

+api:我的藏品列表、详情、开启盲盒;

~goblin:nft.sql;
~goblin:nft.entity;
parent e90b75ac
...@@ -30,8 +30,8 @@ public class GoblinDigitalArtworkInfoVo implements Serializable, Cloneable { ...@@ -30,8 +30,8 @@ public class GoblinDigitalArtworkInfoVo implements Serializable, Cloneable {
@ApiModelProperty(position = 18, value = "NFT系列声明时间") @ApiModelProperty(position = 18, value = "NFT系列声明时间")
private String declareAt; private String declareAt;
@ApiModelProperty(position = 19, value = "获得方式[0-购买|1-兑换]") @ApiModelProperty(position = 19, value = "获得方式[1-购买|2-兑换|3-赠送|5-受赠]")
private Integer getway; private Integer source;
@ApiModelProperty(position = 20, value = "藏品状态,根据`unbox`区分盲盒来判断[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败]") @ApiModelProperty(position = 20, value = "藏品状态,根据`unbox`区分盲盒来判断[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败]")
private Integer state; private Integer state;
@ApiModelProperty(position = 21, value = "创作者") @ApiModelProperty(position = 21, value = "创作者")
......
...@@ -11,16 +11,16 @@ import java.time.LocalDateTime; ...@@ -11,16 +11,16 @@ import java.time.LocalDateTime;
public class GoblinDigitalArtworkVo implements Serializable, Cloneable { public class GoblinDigitalArtworkVo implements Serializable, Cloneable {
private static final long serialVersionUID = -5920952408993245963L; private static final long serialVersionUID = -5920952408993245963L;
private String artworkId; private String artworkId;
private String orderId;
private String uid;
private String skuId; private String skuId;
private String uid;
private String orderId;
private Integer editionSn; private Integer editionSn;
private String nftId; private String nftId;
private String releaseTxhash; private String releaseTxhash;
private String releaseAt; private String releaseAt;
private String tradingTxhash; private String tradingTxhash;
private String tradingAt; private String tradingAt;
private Integer getway; private Integer source;
private Integer state; private Integer state;
private String delFlg; private String delFlg;
private LocalDateTime openingAt; private LocalDateTime openingAt;
......
...@@ -30,9 +30,9 @@ public class GoblinDigitalArtwork implements Serializable { ...@@ -30,9 +30,9 @@ public class GoblinDigitalArtwork implements Serializable {
private String artworkId; private String artworkId;
/** /**
* 藏品订单号 * 单品ID
*/ */
private String orderId; private String skuId;
/** /**
* 用户UID * 用户UID
...@@ -40,9 +40,9 @@ public class GoblinDigitalArtwork implements Serializable { ...@@ -40,9 +40,9 @@ public class GoblinDigitalArtwork implements Serializable {
private String uid; private String uid;
/** /**
* 单品ID * 藏品订单号
*/ */
private String skuId; private String orderId;
/** /**
* 序列号 * 序列号
...@@ -50,7 +50,7 @@ public class GoblinDigitalArtwork implements Serializable { ...@@ -50,7 +50,7 @@ public class GoblinDigitalArtwork implements Serializable {
private Integer editionSn; private Integer editionSn;
/** /**
* 藏品ID * 藏品NFT ID
*/ */
private String nftId; private String nftId;
...@@ -80,9 +80,9 @@ public class GoblinDigitalArtwork implements Serializable { ...@@ -80,9 +80,9 @@ public class GoblinDigitalArtwork implements Serializable {
private String tradingAt; private String tradingAt;
/** /**
* 获得方式[0-购买|1-兑换] * 获得方式[1-购买|2-兑换|3-赠送|5-受赠]
*/ */
private Integer getway; private Integer source;
/** /**
* 藏品状态[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败] * 藏品状态[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败]
......
...@@ -57,17 +57,17 @@ create table goblin_digital_artwork ...@@ -57,17 +57,17 @@ create table goblin_digital_artwork
( (
mid bigint auto_increment primary key, mid bigint auto_increment primary key,
artwork_id varchar(64) not null comment '藏品ID', artwork_id varchar(64) not null comment '藏品ID',
order_id varchar(64) not null comment '藏品订单号',
uid varchar(64) not null comment '用户UID',
sku_id varchar(64) not null comment '单品ID', sku_id varchar(64) not null comment '单品ID',
uid varchar(64) not null comment '用户UID',
order_id varchar(64) not null comment '藏品订单号',
edition_sn int null comment '序列号', edition_sn int null comment '序列号',
nft_id varchar(256) null comment '藏品ID', nft_id varchar(256) null comment '藏品NFT ID',
release_txhash varchar(256) null comment '发行HASH', release_txhash varchar(256) null comment '发行HASH',
release_at varchar(25) null comment '发行时间', release_at varchar(25) null comment '发行时间',
trading_txhash varchar(256) null comment '发放HASH', trading_txhash varchar(256) null comment '发放HASH',
trading_at varchar(25) null comment '交易时间', trading_at varchar(25) null comment '交易时间',
getway tinyint null comment '获得方式[0-购买|1-兑换]', source tinyint null comment '获得方式[1-购买|2-兑换|3-赠送|5-受赠]',
state tinyint default 0 comment '藏品状态[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败]', state tinyint default 0 comment '藏品状态[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败]',
del_flg char default '0' comment '删除标记[0-未删除|1-删除]', del_flg char default '0' comment '删除标记[0-未删除|1-删除]',
......
package com.liquidnet.service.goblin.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.liquidnet.service.base.PagedResult;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinDigitalArtworkInfoVo;
import com.liquidnet.service.goblin.dto.vo.GoblinDigitalArtworkListVo;
import com.liquidnet.service.goblin.util.GoblinRedisUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@ApiSupport(order = 142000)
@Api(tags = "我的藏品管理")
@Slf4j
@Validated
@RestController
@RequestMapping("artwork")
public class GoblinDigitalArtworkController {
@Autowired
GoblinRedisUtils goblinRedisUtils;
@ApiOperationSupport(order = 1)
@ApiOperation(value = "藏品列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "pageNum", value = "索引页数"),
@ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "pageSize", value = "显示记录数"),
})
@PostMapping("list")
public ResponseDto<PagedResult<GoblinDigitalArtworkListVo>> list(@RequestParam(required = false, defaultValue = "1") Integer pageNum,
@RequestParam(required = false, defaultValue = "10") Integer pageSize) {
return null;
}
@ApiOperationSupport(order = 2)
@ApiOperation(value = "藏品详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "artworkId", value = "藏品ID"),
})
@PostMapping("info")
public ResponseDto<GoblinDigitalArtworkInfoVo> info(@RequestParam String artworkId) {
return null;
}
@ApiOperationSupport(order = 3)
@ApiOperation(value = "开启盲盒")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "artworkId", value = "藏品ID"),
})
@PostMapping("unboxing")
public ResponseDto<GoblinDigitalArtworkListVo> unboxing(@RequestParam String artworkId) {
return null;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment