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

Commit 69907c62 authored by 张国柄's avatar 张国柄

~merge zxlnft -> nft_411;

parents a2bb494d 7b47b7ff
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>liquidnet-bus-api</artifactId>
<groupId>com.liquidnet</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>liquidnet-service-galaxy-api</artifactId>
<!-- <dependencies>-->
<!-- <dependency>-->
<!-- <groupId>com.liquidnet</groupId>-->
<!-- <artifactId>liquidnet-service-dragon-do</artifactId>-->
<!-- <version>1.0-SNAPSHOT</version>-->
<!-- <scope>compile</scope>-->
<!-- </dependency>-->
<!-- </dependencies>-->
</project>
package com.liquidnet.service.galaxy.constant;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyConstant
* @Package com.liquidnet.service.galaxy.constant
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/8 11:25
*/
public class GalaxyConstant {
public static final String REDIS_KEY_GALAXY_USER="galaxy:user:";
public static final String REDIS_KEY_GALAXY_SERIES="galaxy:series:";
public static final String REDIS_KEY_GALAXY_SERIES_NFT_UPLOAD="galaxy:series:nft:upload:";
public static final String REDIS_KEY_GALAXY_SERIES_NFT="galaxy:series:nft:";
public static final String REDIS_KEY_GALAXY_TRADE_ORDER="galaxy:trade:order:";
public static final String REDIS_KEY_GALAXY_PUBLISH_NFT="galaxy:publish:nft:";
public static final String REDIS_KEY_GALAXY_PUBLISH_ORDER="galaxy:publish:order:";
public static final String SERIES_NAME_PREFIX="NOW_ZXL_";// 系列存储目录名称和系列声明
}
package com.liquidnet.service.galaxy.constant;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyConstant
* @Package com.liquidnet.service.galaxy.constant
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/23 12:25
*/
public class GalaxyEnum {
public enum RouterTypeEnum{
ZXINCHAIN("zxinchain","至信链"),
ETH ("eth","以太坊"),
ANTCHAIN ("antchain","蚂蚁链"),
XUPER("xuper","百度超级链");
private String code;
private String message;
RouterTypeEnum(String code, String message) {
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
}
/**
* 路由业务枚举
*/
public enum SeriesClaimStatusEnum{
SERIES_INIT("init","系列声明数据初始化"),
PROCESSING("processing","系列声明中"),
SUCCESS ("success","系列声明成功"),
FAIL ("fail","系列声明失败");
private String code;
private String message;
SeriesClaimStatusEnum(String code, String message) {
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
}
/**
* 路由业务枚举
*/
public enum RouterBusinessEnum{
NFT("nft","数字藏品nft"),
DCI ("dci","数字存证dci");
private String code;
private String message;
RouterBusinessEnum(String code, String message) {
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
}
public enum DeviceFromEnum{
WEB("web",""),
WAP("wap",""),
WAPPAGE("wappage",""),
APP("app",""),
JS("js",""),
APPLET("applet","");
private String code;
private String message;
DeviceFromEnum(String code, String message) {
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
}
/**
* 注册类型
*/
public enum RegisterTypeEnum{
PERSON("1","企业"),
COMPANY("2","个人");
private String code;
private String message;
RegisterTypeEnum(String code, String message) {
this.code = code;
this.message = message;
}
public RegisterTypeEnum getEnumByCode(String code){
RegisterTypeEnum[] arry = RegisterTypeEnum.values();
for (int i = 0; i < arry.length; i++) {
if (arry[i].getCode().equals(code)) {
return arry[i];
}
}
return null;
}
public String getCode() {
return code;
}
}
public enum CardTypeEnum{
// 1-身份证 2-护照 3-港澳通行证 4-台湾通行证 5-外国人永居身份证 6-港澳台居民居住证 7-其它
ID_CARD("1","身份证"),
ID_CARD_PP("2","护照"),
ID_CARD_HM("3","港澳通行证"),
ID_CARD_TW("4","台湾通行证"),
ID_CARD_FOR("5","外国人永居身份证"),
ID_CARD_HMTW("6","港澳台居民居住证"),
ID_CARD_OTHER("7","其它");
private String code;
private String message;
CardTypeEnum(String code, String message) {
this.code = code;
this.message = message;
}
public CardTypeEnum getEnumByCode(String code){
CardTypeEnum[] arry = CardTypeEnum.values();
for (int i = 0; i < arry.length; i++) {
if (arry[i].getCode().equals(code)) {
return arry[i];
}
}
return null;
}
public String getCode() {
return code;
}
}
/**
* 标记任务状态
*/
public enum TaskStatusEnum{
INIT("-1","数据初始化"),
PROCESSING("0","任务执行中"),
TASK_SUCCESS("1","任务成功"),
TASK_FAIL("2","任务失败");
private String code;
private String message;
TaskStatusEnum(String code, String message) {
this.code = code;
this.message = message;
}
public TaskStatusEnum getEnumByCode(String code){
TaskStatusEnum[] arry = TaskStatusEnum.values();
for (int i = 0; i < arry.length; i++) {
if (arry[i].getCode().equals(code)) {
return arry[i];
}
}
return null;
}
public String getCode() {
return code;
}
public String getMessage(){
return message;
}
}
/**
* 标记任务状态
*/
public enum UserBindStatusEnum{
BIND_PROCESSING("0","绑定中"),
BIND_SUCCESS("1","已绑定"),
BIND_FAIL("2","绑定失败"),
BIND_CANNOT_QUERY("3","未发起过绑定(未查询到)");
private String code;
private String message;
UserBindStatusEnum(String code, String message) {
this.code = code;
this.message = message;
}
public UserBindStatusEnum getEnumByCode(String code){
UserBindStatusEnum[] arry = UserBindStatusEnum.values();
for (int i = 0; i < arry.length; i++) {
if (arry[i].getCode().equals(code)) {
return arry[i];
}
}
return null;
}
public String getCode() {
return code;
}
public String getMessage(){
return message;
}
}
/**
* 交易类别
*/
public enum TradeTypeEnum{
TRADE_PUBLISH("1","发行"),
TRADE_BUY("2","购买"),
TRADE_TRANSFER("3","转移"),
TRADE_SET_PRICE("4","设置价格"),
TRADE_SET_STATUS("5","设置状态");
private String code;
private String message;
TradeTypeEnum(String code, String message) {
this.code = code;
this.message = message;
}
public TradeTypeEnum getEnumByCode(String code){
TradeTypeEnum[] arry = TradeTypeEnum.values();
for (int i = 0; i < arry.length; i++) {
if (arry[i].getCode().equals(code)) {
return arry[i];
}
}
return null;
}
public String getCode() {
return code;
}
public String getMessage(){
return message;
}
}
public static void main(String[] args) {
Integer aaa = 1;
if(aaa.toString().equals(RouterTypeEnum.ZXINCHAIN.getCode())){
System.out.println("支付成功");
}
}
}
package com.liquidnet.service.galaxy.constant;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyErrorCodeEnum
* @Package com.liquidnet.service.galaxy.constant
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/8 11:25
*/
public enum GalaxyErrorEnum {
SERIES_CLAIM_ERROR("NFT0010001","NFT系列声明失败"),
SERIES_CLAIM_ERROR_FIVE_TIMES("NFT0010002","NFT系列声明失败,任务查询超过5次"),
PUBLISH_FAIL("NFT0010003","NFT发行失败,未获取nft"),
PUBLISH_BUY_FAIL("NFT0010004","NFT发行购买失败,未发起购买"),
PUBLISH_FAIL_ALREADY_EXIST("NFT0010005","NFT发行失败,该订单已经发行过指定nft!"),
ROUTER_NOT_EXIST("NFT0010006","路由类型不存在"),
SERIES_NOT_EXIST("NFT0010007","没有查询到该sku对应系列声明"),
SERIES_CLAIM_PROCESSING("NFT0010008","系列声明正在处理中,不允许重复声明!"),
SERIES_CLAIM_SUCCESSED("NFT0010009","系列已声明成功,不允许重复声明!"),
SERIES_CLAIM_NOT_EXIST("NFT0010010","系列声明初始化信息不存在,请检查是否已上传对应素材!"),
SERIES_NFT_INFO_NOT_EXIST("NFT0010015","系列NFT信息查询不存在!"),
PUBLISH_ORDER_NOT_EXIST("NFT0010011","NFT购买订单不存在!"),
NFT_BUY_TASK_NOT_EXIST("NFT0010012","NFT购买执行任务不存在"),
NFT_BUY_TASK_HAVE_EXIST("NFT0010013","NFT购买执行任务已存在,不可以重复购买!"),
NFT_BUY_FAIL("NFT0010014","NFT购买失败,nftId不存在!");
private String code;
private String message;
GalaxyErrorEnum(String code, String message) {
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
public String getMessage() {
return message;
}
}
package com.liquidnet.service.galaxy.dto.bo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftOrderBindBo
* @Package com.liquidnet.service.galaxy.dto.bo
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/31 13:36
*/
@Data
public class GalaxyNftOrderBindBo implements Serializable,Cloneable{
/**
* 接入方买入唯一标识
*/
private String nftOrderPayId;
/**
* 系列唯一编码
*/
private String seriesCode;
/**
* 系列的唯一Id
*/
private String seriesId;
/**
* nftId索引
*/
private Integer nftIdIndex;
/**
* 路由类型
*/
private String routerType;
/**
* 创建时间
*/
private String createdAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftOrderBindBo obj = new GalaxyNftOrderBindBo();
public static GalaxyNftOrderBindBo getNew() {
try {
return (GalaxyNftOrderBindBo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftOrderBindBo();
}
}
}
package com.liquidnet.service.galaxy.dto.bo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftOrderBo
* @Package com.liquidnet.service.galaxy.dto.bo
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/17 11:16
*/
@Data
public class GalaxyNftOrderBo implements Serializable,Cloneable {
private String userId;
/**
* 应用系统购买系列唯一ID
*/
private String skuId;
/**
* 本地系列唯一名称
*/
private String seriesName;
/**
* 系列的唯一Id
*/
private String seriesId;
/**
* 本地系列唯一编码
*/
private String seriesCode;
/**
* 接入方买入唯一标识
*/
private String nftOrderPayId;
/**
* nftId
*/
private String nftId;
/**
* nft价格
*/
private Long nftPrice;
/**
* nft发行任务ID
*/
private String nftPublishTaskId;
/**
* 转出方地址
*/
private String nftPublishFromAddress;
/**
* 转入方地址
*/
private String nftPublishToAddress;
/**
* nft发行时间
*/
private String nftPublishChainTimestamp;
/**
* nft发行状态
*/
private String nftPublishStatus;
/**
* nft发行交易hash
*/
private String nftPublishTradeHash;
/**
* nft购买任务id
* @return
*/
private String nftBuyTaskId;
/**
* 转出方地址
*/
private String nftBuyFromAddress;
/**
* 转入方地址
*/
private String nftBuyToAddress;
/**
* nft购买时间
*/
private String nftBuyChainTimestamp;
/**
* nft购买状态
*/
private String nftBuyStatus;
/**
* nft购买交易hash
*/
private String nftBuyTradeHash;
/**
* nft购买支付任务ID
* @return
*/
private String nftBuyPayTaskId;
/**
* 路由类型
*/
private String routerType;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftOrderBo obj = new GalaxyNftOrderBo();
public static GalaxyNftOrderBo getNew() {
try {
return (GalaxyNftOrderBo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftOrderBo();
}
}
}
package com.liquidnet.service.galaxy.dto.bo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxySeriesInfoBo
* @Package com.liquidnet.service.galaxy.dto.bo
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/15 15:03
*/
@Data
public class GalaxySeriesInfoBo implements Serializable,Cloneable {
/**
* 本地系列唯一标识id
*/
private String seriesInfoId;
/**
* 本地系列唯一名称(前缀+skuid)
*/
private String seriesName;
/**
* 本地系列唯一编码
*/
private String seriesCode;
/**
* 区块链上系列ID(系列声明后获取,NFT发行购买用到)
*/
private String seriesId;
/**
* 系列发行总量
*/
private Long totalCount;
/**
* 系列已发行个数
*/
private Long crtCount;
/**
* 系列声明任务ID
*/
private String seriesClaimTaskId;
/**
* 系列声明状态
*/
private String seriesClaimStatus;
/**
* 系列显示封面
*/
private String coverUrl;
/**
* 系列描述信息,不超过500个字符
*/
private String seriesDesc;
/**
* 系列声明时间
*/
private String chainTimestamp;
/**
* 系列链上交易hash
*/
private String tradeHash;
/**
* 系列声明中nftHash
*/
private Integer nftCount;
/**
* 路由类型
*/
private String routerType;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxySeriesInfoBo obj = new GalaxySeriesInfoBo();
public static GalaxySeriesInfoBo getNew() {
try {
return (GalaxySeriesInfoBo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxySeriesInfoBo();
}
}
}
package com.liquidnet.service.galaxy.dto.bo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxySeriesInfoBo
* @Package com.liquidnet.service.galaxy.dto.bo
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/15 15:03
*/
@Data
public class GalaxySeriesNftInfoBo implements Serializable,Cloneable {
/**
* 本地系列唯一标识id
*/
private String seriesNftInfoId;
/**
* 本地系列唯一标识id
*/
private String seriesInfoId;
/**
* 本地系列唯一标识id
*/
private String skuId;
/**
* 本地系列唯一名称(前缀+skuid)
*/
private String seriesName;
/**
* 本地系列唯一编号(前缀+skuid)
*/
private String seriesCode;
/**
* 区块链上系列ID(系列声明后获取,NFT发行购买用到)
*/
private String seriesId;
/**
* 系列发行总量
*/
private Long nftTotalCount;
/**
* 系列已发行个数
*/
private Long nftCrtCount;
/**
* 系列nft发行开始索引
*/
private String nftIdBegin;
/**
* 系列nft发行开始索引
*/
private Integer nftIdBeginIndex;
/**
* nft系列发行序号
*/
private Integer nftPublishNumber;
/**
* nft素材原始地址
*/
private String originalNftUrl;
/**
* nft显示素材原始地址
*/
private String originalDisplayUrl;
//======================================
//=============以下都为购买信息=============
//======================================
/**
* 作者名,中文+英文(数字或符号为非法输入) 不超过30个字符
*/
private String author;
/**
* nft名字(sku名称),中英文数字均可,不超过256个字符
*/
private String nftName;
/**
* nft素材地址
*/
private String nftUrl;
/**
* 预览图url,不超过1024个字符。(至信链浏览器展示预览图尺寸为290*290,请上传比例为1:1的图片)
*/
private String displayUrl;
/**
* nft简介,500个字符以内
*/
private String nftDesc;
/**
* 标签,【文创】,游戏,动漫,30个字符以内
* 非必填
*/
private String nftFlag;
/**
* 可售状态下有意义,表示售卖多少积分
*/
private BigDecimal sellCount;
/**
* 系列声明中nftHash
*/
private String nftHash;
/**
* 路由类型
*/
private String routerType;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxySeriesNftInfoBo obj = new GalaxySeriesNftInfoBo();
public static GalaxySeriesNftInfoBo getNew() {
try {
return (GalaxySeriesNftInfoBo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxySeriesNftInfoBo();
}
}
}
package com.liquidnet.service.galaxy.dto.bo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxySeriesNftUploadBo
* @Package com.liquidnet.service.galaxy.dto.bo
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/28 13:25
*/
@Data
public class GalaxySeriesNftUploadBo implements Serializable,Cloneable {
/**
* 本地系列唯一标识id
*/
private String skuId;
/**
* nft素材原始地址
*/
private String originalNftUrl;
/**
* nft显示素材原始地址
*/
private String originalDisplayUrl;
/**
* nft素材地址
*/
private String nftUrl;
/**
* 预览图url,不超过1024个字符。(至信链浏览器展示预览图尺寸为290*290,请上传比例为1:1的图片)
*/
private String displayUrl;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxySeriesNftUploadBo obj = new GalaxySeriesNftUploadBo();
public static GalaxySeriesNftUploadBo getNew() {
try {
return (GalaxySeriesNftUploadBo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxySeriesNftUploadBo();
}
}
}
package com.liquidnet.service.galaxy.dto.bo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 用户注册信息
* @class: GalaxyUserInfoBo
* @Package com.liquidnet.service.galaxy
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/15 14:34
*/
@Data
public class GalaxyUserInfoBo implements Serializable,Cloneable{
private String userId;
private String userName;
private String mobile;
private String idCardType;
private String idCard;
private String mnemonic;
private String index;
private String userIdentification;
private String userPubKey;
private String userPriKey;
private String routerType;
private String blockChainAddress;
// public String getUserPubKey() {
// String pubKey = null;
// try {
// pubKey = BASE64Util.decode(userPubKey);
// } catch (UnsupportedEncodingException e) {
// e.printStackTrace();
// }
// return pubKey;
// }
//
// public String getUserPriKey() {
// String priKey = null;
// try {
// priKey = BASE64Util.decode(userPriKey);
// } catch (UnsupportedEncodingException e) {
// e.printStackTrace();
// }
// return priKey;
// }
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyUserInfoBo obj = new GalaxyUserInfoBo();
public static GalaxyUserInfoBo getNew() {
try {
return (GalaxyUserInfoBo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyUserInfoBo();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyArtSeriesClaimReqDto
* @Package com.liquidnet.service.galaxy.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/14 11:10
*/
@ApiModel(value = "GalaxyArtSeriesClaimReqDto", description = "NFT系列声明")
@Data
public class GalaxyArtSeriesClaimReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
// @ApiModelProperty(position = 1, required = true, value = "系列名称,不超过20个字符")
// @NotBlank(message = "系列名称不能为空!")
// @Size(min = 2, max = 20, message = "skuId限制2-20位且不能包含特殊字符")
// private String seriesName;
//
// @ApiModelProperty(position = 1, required = true, value = "系列编码")
// @NotBlank(message = "系列编码不能为空!")
// @Size(min = 2, max = 200, message = "skuId限制2-200位且不能包含特殊字符")
// private String seriesCode;
@ApiModelProperty(position = 1, required = true, value = "系列唯一id标识,不超过20个字符")
@NotBlank(message = "skuId不能为空!")
@Size(min = 2, max = 20, message = "skuId限制2-20位且不能包含特殊字符")
private String skuId;
@ApiModelProperty(position = 1, required = true, value = "作者名,中文+英文(数字或符号为非法输入) 不超过20个字符")
@NotBlank(message = "author不能为空!")
@Size(max = 20, message = "中文+英文(数字或符号为非法输入) 不超过20个字符")
private String author;
@ApiModelProperty(position = 1, required = true, value = "nft名字(sku名称),中英文数字均可,不超过100个字符")
@NotBlank(message = "nft名字不能为空!")
@Size(max = 100, message = "nft名字不能超过100个字符")
private String nftName;
@ApiModelProperty(position = 1, required = true, value = "nftUrl(对应素材上传中materialAccessUrl),不超过500个字符")
@NotBlank(message = "url不能为空!")
@Size(max = 500, message = "nftUrl,不超过500个字符")
private String nftUrl;
@ApiModelProperty(position = 1, required = true, value = "预览图url,不超过500个字符(至信链浏览器展示预览图尺寸为290*290,请上传比例为1:1的图片)")
@NotBlank(message = "预览图url不能为空!")
@Size(max = 500, message = "预览图url,不超过500个字符")
private String displayUrl;
@ApiModelProperty(position = 1, required = true, value = "nft简介,300个字符以内")
@NotBlank(message = "描述不能为空!")
@Size(max = 300, message = "nft简介,300个字符以内")
private String nftDesc;
@ApiModelProperty(position = 1, required = false, value = "标签,文创,游戏,动漫,30个字符以内")
@Size(max = 20, message = "标签,文创,游戏,动漫,20个字符以内")
private String nftFlag;
@ApiModelProperty(position = 1, required = true, value = "sku价格,金额必须是数字格式,例:211.23 后续不可修改")
@NotBlank(message = "购买价格不能为空!")
@Digits(integer = 10,fraction = 2,message = "金额必须是数字格式")
private String sellCount;
@ApiModelProperty(position = 1, required = true, value = "系列nft发行总量(对应sku库存)")
@Digits(integer = 10,fraction = 0,message = "系列nft发行总量")
private Long totalCount;
@ApiModelProperty(position = 1, required = true, value = "系列封面url,不超过500个字符(至信链浏览器展示预览图尺寸为290*290,请上传比例为1:1的图片)")
@NotBlank(message = "系列封面url不能为空!")
@Size(max = 500, message = "系列封面url,不超过500个字符")
private String coverUrl;
@ApiModelProperty(position = 1, required = true, value = "系列描述信息,不超过500个字符")
@NotBlank(message = "系列描述信息不能为空!")
@Size(max = 500, message = "系列描述信息,不超过500个字符")
private String seriesDesc;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyArtSeriesClaimReqDto obj = new GalaxyArtSeriesClaimReqDto();
public static GalaxyArtSeriesClaimReqDto getNew() {
try {
return (GalaxyArtSeriesClaimReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyArtSeriesClaimReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyArtSeriesClaimRespDto
* @Package com.liquidnet.service.galaxy.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/14 11:21
*/
@ApiModel(value = "GalaxyArtSeriesClaimRespDto", description = "NFT系列声明返回结果")
@Data
public class GalaxyArtSeriesClaimRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "skuId")
private String skuId;
@ApiModelProperty(position = 2, required = true, value = "nft素材访问地址")
private String nftUrl;
@ApiModelProperty(position = 2, required = true, value = "nft显示素材访问地址")
private String displayUrl;
@ApiModelProperty(position = 3, required = true, value = "系列在区块链上唯一ID")
private String seriesId;
@ApiModelProperty(position = 3, required = true, value = "系列在区块链上的名称")
private String seriesName;
@ApiModelProperty(position = 4, required = true, value = "系列声明状态")
private String seriesClaimStatus;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyArtSeriesClaimRespDto obj = new GalaxyArtSeriesClaimRespDto();
public static GalaxyArtSeriesClaimRespDto getNew() {
try {
return (GalaxyArtSeriesClaimRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyArtSeriesClaimRespDto();
}
}
}
\ No newline at end of file
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyArtSeriesClaimResultQueryReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 10:51
*/
@ApiModel(value = "GalaxyArtSeriesClaimResultQueryReqDto", description = "NFT系列声明结果查询")
@Data
public class GalaxyArtSeriesClaimResultQueryReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "系列唯一id标识,不超过20个字符")
@NotBlank(message = "skuId不能为空!")
@Size(min = 2, max = 20, message = "skuId限制2-20位且不能包含特殊字符")
private String skuId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyArtSeriesClaimResultQueryReqDto obj = new GalaxyArtSeriesClaimResultQueryReqDto();
public static GalaxyArtSeriesClaimResultQueryReqDto getNew() {
try {
return (GalaxyArtSeriesClaimResultQueryReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyArtSeriesClaimResultQueryReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyArtSeriesClaimResultQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 10:51
*/
@ApiModel(value = "GalaxyArtSeriesClaimResultQueryRespDto", description = "NFT系列声明返回结果")
@Data
public class GalaxyArtSeriesClaimResultQueryRespDto implements Serializable,Cloneable {
/**
* 标记任务状态,0:任务执行中 1:任务成功 2:任务失败
*/
@ApiModelProperty(position = 3, required = true, value = "标记任务状态,0:任务执行中 1:任务成功 2:任务失败")
private Integer taskStatus;
/**
* 失败情况下会有提示信息
*/
@ApiModelProperty(position = 3, required = true, value = "失败情况下会有提示信息")
private String taskMsg;
/**
* 系列ID,后面用于查询系列信息
*/
@ApiModelProperty(position = 3, required = true, value = "系列ID,后面用于查询系列信息")
private String seriesId;
/**
* 交易hash
*/
@ApiModelProperty(position = 3, required = true, value = "交易hash")
private String txHash;
/**
* 链上交易时间戳
*/
@ApiModelProperty(position = 3, required = true, value = "chainTimestamp")
private String chainTimestamp;
/**
* 系列声明中nftHash
*/
@ApiModelProperty(position = 4, required = true, value = "nft素材文件Hash")
private String nftHash;
@Override
public String toString() {
return JsonUtils.toJson(this);
}
private static final GalaxyArtSeriesClaimResultQueryRespDto obj = new GalaxyArtSeriesClaimResultQueryRespDto();
public static GalaxyArtSeriesClaimResultQueryRespDto getNew() {
try {
return (GalaxyArtSeriesClaimResultQueryRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyArtSeriesClaimResultQueryRespDto();
}
}
}
\ No newline at end of file
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.galaxy.constant.GalaxyEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyBaseReqDto
* @Package com.liquidnet.service.galaxy.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/15 12:21
*/
@Data
public class GalaxyBaseReqDto implements Serializable,Cloneable{
/**
* 路由类型(至信链zxinchain、以太坊eth)
*/
@ApiModelProperty(position = 1, required = true, value = "路由类型(至信链zxinchain、以太坊eth)")
@NotBlank(message = "路由类型不能为空!")
private String routerType = GalaxyEnum.RouterTypeEnum.ZXINCHAIN.getCode();
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyBaseReqDto obj = new GalaxyBaseReqDto();
public static GalaxyBaseReqDto getNew() {
try {
return (GalaxyBaseReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyBaseReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftBuyPayResultQueryReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 11:23
*/
@ApiModel(value = "GalaxyNftBuyPayResultQueryReqDto", description = "NFT购买支付结果查询")
@Data
public class GalaxyNftBuyPayResultQueryReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
/**
* nftOrderPayId
*/
@ApiModelProperty(position = 1, required = true, value = "nft订单支付id(保证唯一),不超过30个字符")
@NotBlank(message = "nft订单支付id不能为空")
@Size(min = 2, max = 30, message = "nft订单支付id限制2-30位且不能包含特殊字符")
private String nftOrderPayId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftBuyPayResultQueryReqDto obj = new GalaxyNftBuyPayResultQueryReqDto();
public static GalaxyNftBuyPayResultQueryReqDto getNew() {
try {
return (GalaxyNftBuyPayResultQueryReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftBuyPayResultQueryReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftBuyPayResultQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 11:23
*/
@ApiModel(value = "GalaxyNftBuyPayResultQueryRespDto", description = "NFT购买支付结果查询")
@Data
public class GalaxyNftBuyPayResultQueryRespDto implements Serializable,Cloneable {
/**
* 标记任务状态,0:任务执行中 1:任务成功 2:任务失败
*/
@ApiModelProperty(position = 3, required = true, value = "标记任务状态,0:任务执行中 1:任务成功 2:任务失败")
private Integer taskStatus;
/**
* 失败情况下会有提示信息
*/
@ApiModelProperty(position = 3, required = true, value = "失败情况下会有提示信息")
private String taskMsg;
/**
* 交易hash
*/
@ApiModelProperty(position = 3, required = true, value = "交易hash")
private String txHash;
/**
* 链上交易时间戳
*/
@ApiModelProperty(position = 3, required = true, value = "chainTimestamp")
private String chainTimestamp;
@Override
public String toString() {
return JsonUtils.toJson(this);
}
private static final GalaxyNftBuyPayResultQueryRespDto obj = new GalaxyNftBuyPayResultQueryRespDto();
public static GalaxyNftBuyPayResultQueryRespDto getNew() {
try {
return (GalaxyNftBuyPayResultQueryRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftBuyPayResultQueryRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: NFT购买(涉及NFT发行、NFT购买)
* @class: GalaxyNftBuyReqDto
* @Package com.liquidnet.service.galaxy.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/14 18:13
*/
@ApiModel(value = "GalaxyNftBuyReqDto", description = "NFT购买")
@Data
public class GalaxyNftBuyReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
/**
* 以下为发行参数***********************************
*/
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
@NotBlank(message = "用户ID不能为空!")
@Size(min = 1, max = 30, message = "用户ID限制2-30位且不能包含特殊字符")
private String userId;
/**
* skuId
*/
@ApiModelProperty(position = 1, required = true, value = "系列唯一id标识,不超过20个字符")
@NotBlank(message = "skuId不能为空!")
@Size(min = 2, max = 20, message = "skuId限制2-20位且不能包含特殊字符")
private String skuId;
/**
* nftOrderPayId
*/
@ApiModelProperty(position = 1, required = true, value = "nft订单支付id(保证唯一),不超过30个字符")
@NotBlank(message = "nft订单支付id不能为空")
@Size(min = 2, max = 30, message = "nft订单支付id限制2-30位且不能包含特殊字符")
private String nftOrderPayId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftBuyReqDto obj = new GalaxyNftBuyReqDto();
public static GalaxyNftBuyReqDto getNew() {
try {
return (GalaxyNftBuyReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftBuyReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftBuyRespDto
* @Package com.liquidnet.service.galaxy.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/14 18:13
*/
@ApiModel(value = "GalaxyNftBuyRespDto", description = "NFT购买")
@Data
public class GalaxyNftBuyRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "用户Id")
private String userId;
@ApiModelProperty(position = 1, required = true, value = "用户购买的nftId")
private String nftId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftBuyRespDto obj = new GalaxyNftBuyRespDto();
public static GalaxyNftBuyRespDto getNew() {
try {
return (GalaxyNftBuyRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftBuyRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftBuyResultQueryReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 11:22
*/
@ApiModel(value = "GalaxyNftBuyResultQueryReqDto", description = "NFT购买结果查询")
@Data
public class GalaxyNftBuyResultQueryReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
/**
* nftOrderPayId
*/
@ApiModelProperty(position = 1, required = true, value = "nft订单支付id(保证唯一),不超过30个字符")
@NotBlank(message = "nft订单支付id不能为空")
@Size(min = 2, max = 30, message = "nft订单支付id限制2-30位且不能包含特殊字符")
private String nftOrderPayId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftBuyResultQueryReqDto obj = new GalaxyNftBuyResultQueryReqDto();
public static GalaxyNftBuyResultQueryReqDto getNew() {
try {
return (GalaxyNftBuyResultQueryReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftBuyResultQueryReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftBuyResultQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 11:23
*/
@ApiModel(value = "GalaxyNftBuyResultQueryRespDto", description = "NFT购买结果查询")
@Data
public class GalaxyNftBuyResultQueryRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 3, required = true, value = "标记任务状态,0:任务执行中 1:任务成功 2:任务失败")
private Integer taskStatus;
/**
* 失败情况下会有提示信息
*/
@ApiModelProperty(position = 3, required = true, value = "失败情况下会有提示信息")
private String taskMsg;
/**
* 交易hash
*/
@ApiModelProperty(position = 3, required = true, value = "交易hash")
private String txHash;
/**
* 链上交易时间戳
*/
@ApiModelProperty(position = 3, required = true, value = "chainTimestamp")
private String chainTimestamp;
@ApiModelProperty(position = 3, required = true, value = "支付任务ID")
private String payTaskId;
@Override
public String toString() {
return JsonUtils.toJson(this);
}
private static final GalaxyNftBuyResultQueryRespDto obj = new GalaxyNftBuyResultQueryRespDto();
public static GalaxyNftBuyResultQueryRespDto getNew() {
try {
return (GalaxyNftBuyResultQueryRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftBuyResultQueryRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftImageReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/15 17:56
*/
@ApiModel(value = "GalaxyNftImageReqDto", description = "NFT图片检测")
@Data
public class GalaxyNftImageReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "素材地址(全路径)不能超过500字符")
@NotBlank(message = "素材地址(全路径)不能为空!")
@Size(min = 2, max = 500, message = "素材地址(全路径)不能超过500字符")
private String nftOriginalUrl;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftImageReqDto obj = new GalaxyNftImageReqDto();
public static GalaxyNftImageReqDto getNew() {
try {
return (GalaxyNftImageReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftImageReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftImageRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/15 18:05
*/
@ApiModel(value = "GalaxyNftImageRespDto", description = "NFT图片检测")
@Data
public class GalaxyNftImageRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "Block:建议屏蔽 Review:建议复审 Pass:建议通过")
private String suggestion;
@ApiModelProperty(position = 1, required = true, value = "恶意标签,Normal:正常 Porn:色情 Abuse:谩骂 Ad:广告。以及其他令人反感、不安全或不适宜的内容类型")
private String label;
@ApiModelProperty(position = 1, required = true, value = "机器判断当前分类的置信度,取值范围:0-100。分数越高,表示越有可能属于当前分类(如:色情99,则该样本属于色情的置信度非常高。)")
private Integer score;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftImageRespDto obj = new GalaxyNftImageRespDto();
public static GalaxyNftImageRespDto getNew() {
try {
return (GalaxyNftImageRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftImageRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: NFT购买(涉及NFT发行、NFT购买)
* @class: GalaxyNftPublishAndBuyReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/17 13:51
*/
@ApiModel(value = "GalaxyNftPublishAndBuyReqDto", description = "NFT发行购买")
@Data
public class GalaxyNftPublishAndBuyReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
/**
* 以下为发行参数***********************************
*/
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
@NotBlank(message = "用户ID不能为空!")
@Size(min = 1, max = 30, message = "用户ID限制2-30位且不能包含特殊字符")
private String userId;
/**
* skuId
*/
@ApiModelProperty(position = 1, required = true, value = "系列唯一id标识,不超过20个字符")
@NotBlank(message = "skuId不能为空!")
@Size(min = 2, max = 20, message = "skuId限制2-20位且不能包含特殊字符")
private String skuId;
/**
* nftOrderPayId
*/
@ApiModelProperty(position = 1, required = true, value = "nft订单支付id(保证唯一),不超过30个字符")
@NotBlank(message = "nft订单支付id不能为空")
@Size(min = 2, max = 30, message = "nft订单支付id限制2-30位且不能包含特殊字符")
private String nftOrderPayId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftPublishAndBuyReqDto obj = new GalaxyNftPublishAndBuyReqDto();
public static GalaxyNftPublishAndBuyReqDto getNew() {
try {
return (GalaxyNftPublishAndBuyReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftPublishAndBuyReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftPublishAndBuyRespDto
* @Package com.liquidnet.service.galaxy.dto.param;
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/17 13:51
*/
@ApiModel(value = "GalaxyNftPublishAndBuyRespDto", description = "NFT购买")
@Data
public class GalaxyNftPublishAndBuyRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "用户Id")
private String userId;
@ApiModelProperty(position = 1, required = true, value = "用户购买的nftId")
private String nftId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftPublishAndBuyRespDto obj = new GalaxyNftPublishAndBuyRespDto();
public static GalaxyNftPublishAndBuyRespDto getNew() {
try {
return (GalaxyNftPublishAndBuyRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftPublishAndBuyRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 发行+购买结果查询
* @class: GalaxyNftPublishResultQueryReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/28 11:22
*/
@ApiModel(value = "GalaxyNftPublishResultQueryReqDto", description = "NFT发行结果查询")
@Data
public class GalaxyNftPublishAndBuyResultBatchQueryReqDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
@NotBlank(message = "用户ID不能为空!")
@Size(min = 1, max = 30, message = "用户ID限制2-30位且不能包含特殊字符")
private String userId;
/**
* nftOrderPayId
*/
@ApiModelProperty(position = 1, required = true, value = "nft订单支付idList不能为空")
@NotNull(message = "nft订单支付idList不能为空")
private List<RouterOrderInfo> routerOrderInfoList;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftPublishAndBuyResultBatchQueryReqDto obj = new GalaxyNftPublishAndBuyResultBatchQueryReqDto();
public static GalaxyNftPublishAndBuyResultBatchQueryReqDto getNew() {
try {
return (GalaxyNftPublishAndBuyResultBatchQueryReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftPublishAndBuyResultBatchQueryReqDto();
}
}
@Data
public static class RouterOrderInfo{
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
@NotBlank(message = "用户ID不能为空!")
@Size(min = 1, max = 30, message = "用户ID限制2-30位且不能包含特殊字符")
private String userId;
/**
* 路由类型(至信链zxinchain、以太坊eth)
*/
@ApiModelProperty(position = 1, required = true, value = "路由类型(至信链zxinchain、以太坊eth)")
@NotBlank(message = "路由类型不能为空!")
private String routerType;
@ApiModelProperty(position = 1, required = true, value = "nft订单支付id")
private List<String> nftOrderPayIdList;
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 发行+购买结果查询
* @class: GalaxyNftPublishResultQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/28 11:22
*/
@ApiModel(value = "GalaxyNftPublishResultQueryRespDto", description = "NFT发行结果查询")
@Data
public class GalaxyNftPublishAndBuyResultBatchQueryRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
private String userId;
@ApiModelProperty(position = 1, required = true, value = "用户购买信息List")
private List<GalaxyNftPublishAndBuyRouterBatchQueryRespDto> routerBuyInfoList;
@Override
public String toString() {
return JsonUtils.toJson(this);
}
private static final GalaxyNftPublishAndBuyResultBatchQueryRespDto obj = new GalaxyNftPublishAndBuyResultBatchQueryRespDto();
public static GalaxyNftPublishAndBuyResultBatchQueryRespDto getNew() {
try {
return (GalaxyNftPublishAndBuyResultBatchQueryRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftPublishAndBuyResultBatchQueryRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 发行+购买结果查询
* @class: GalaxyNftPublishResultQueryReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/28 11:22
*/
@ApiModel(value = "GalaxyNftPublishResultQueryReqDto", description = "NFT发行结果查询")
@Data
public class GalaxyNftPublishAndBuyResultQueryReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
@NotBlank(message = "用户ID不能为空!")
@Size(min = 1, max = 30, message = "用户ID限制2-30位且不能包含特殊字符")
private String userId;
/**
* nftOrderPayId
*/
@ApiModelProperty(position = 1, required = true, value = "nft订单支付id(保证唯一),不超过30个字符")
@NotBlank(message = "nft订单支付id不能为空")
@Size(min = 2, max = 30, message = "nft订单支付id限制2-30位且不能包含特殊字符")
private String nftOrderPayId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftPublishAndBuyResultQueryReqDto obj = new GalaxyNftPublishAndBuyResultQueryReqDto();
public static GalaxyNftPublishAndBuyResultQueryReqDto getNew() {
try {
return (GalaxyNftPublishAndBuyResultQueryReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftPublishAndBuyResultQueryReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 发行+购买结果查询
* @class: GalaxyNftPublishResultQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/28 11:22
*/
@ApiModel(value = "GalaxyNftPublishResultQueryRespDto", description = "NFT发行结果查询")
@Data
public class GalaxyNftPublishAndBuyResultQueryRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
private String userId;
@ApiModelProperty(position = 2, required = true, value = "nft订单唯一id")
private String nftOrderPayId;
@ApiModelProperty(position = 2, required = true, value = "nftId")
private String nftId;
@ApiModelProperty(position = 3, required = true, value = "nft发行时间")
private String nftPublishChainTimestamp;
@ApiModelProperty(position = 4, required = true, value = "nft发行状态")
private String nftPublishStatus;
@ApiModelProperty(position = 5, required = true, value = "nft发行交易hash")
private String nftPublishTxHash;
@ApiModelProperty(position = 6, required = true, value = "nft购买时间")
private String nftBuyChainTimestamp;
@ApiModelProperty(position = 7, required = true, value = "nft购买状态")
private String nftBuyStatus;
@ApiModelProperty(position = 8, required = true, value = "nft购买交易hash")
private String nftBuyTxHash;
@Override
public String toString() {
return JsonUtils.toJson(this);
}
private static final GalaxyNftPublishAndBuyResultQueryRespDto obj = new GalaxyNftPublishAndBuyResultQueryRespDto();
public static GalaxyNftPublishAndBuyResultQueryRespDto getNew() {
try {
return (GalaxyNftPublishAndBuyResultQueryRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftPublishAndBuyResultQueryRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: NFT购买(涉及NFT发行、NFT购买)
* @class: GalaxyNftPublishAndBuyReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/17 13:51
*/
@ApiModel(value = "GalaxyNftPublishAndBuyReqDto", description = "NFT发行购买")
@Data
public class GalaxyNftPublishAndBuyRouterBatchQueryReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
@NotBlank(message = "用户ID不能为空!")
@Size(min = 1, max = 30, message = "用户ID限制2-30位且不能包含特殊字符")
private String userId;
@ApiModelProperty(position = 1, required = true, value = "nft订单支付id")
private List<String> nftOrderPayIdList;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftPublishAndBuyRouterBatchQueryReqDto obj = new GalaxyNftPublishAndBuyRouterBatchQueryReqDto();
public static GalaxyNftPublishAndBuyRouterBatchQueryReqDto getNew() {
try {
return (GalaxyNftPublishAndBuyRouterBatchQueryReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftPublishAndBuyRouterBatchQueryReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 发行+购买结果查询
* @class: GalaxyNftPublishResultQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/28 11:22
*/
@ApiModel(value = "GalaxyNftPublishResultQueryRespDto", description = "NFT发行结果查询")
@Data
public class GalaxyNftPublishAndBuyRouterBatchQueryRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
private String userId;
/**
* 路由类型(至信链zxinchain、以太坊eth)
*/
@ApiModelProperty(position = 1, required = true, value = "路由类型(至信链zxinchain、以太坊eth)")
@NotBlank(message = "路由类型不能为空!")
private String routerType;
@ApiModelProperty(position = 1, required = true, value = "用户购买信息List")
private List<GalaxyNftPublishAndBuyResultQueryRespDto> buyInfoList;
@Override
public String toString() {
return JsonUtils.toJson(this);
}
private static final GalaxyNftPublishAndBuyRouterBatchQueryRespDto obj = new GalaxyNftPublishAndBuyRouterBatchQueryRespDto();
public static GalaxyNftPublishAndBuyRouterBatchQueryRespDto getNew() {
try {
return (GalaxyNftPublishAndBuyRouterBatchQueryRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftPublishAndBuyRouterBatchQueryRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: NFT购买(涉及NFT发行、NFT购买)
* @class: GalaxyNftPublishReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/17 13:51
*/
@ApiModel(value = "GalaxyNftPublishReqDto", description = "NFT发行")
@Data
public class GalaxyNftPublishReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
/**
* 以下为发行参数***********************************
*/
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
@NotBlank(message = "用户ID不能为空!")
@Size(min = 1, max = 30, message = "用户ID限制2-30位且不能包含特殊字符")
private String userId;
/**
* skuId
*/
@ApiModelProperty(position = 1, required = true, value = "系列唯一id标识,不超过20个字符")
@NotBlank(message = "skuId不能为空!")
@Size(min = 2, max = 20, message = "skuId限制2-20位且不能包含特殊字符")
private String skuId;
/**
* nftOrderPayId
*/
@ApiModelProperty(position = 1, required = true, value = "nft订单支付id(保证唯一),不超过30个字符")
@NotBlank(message = "nft订单支付id不能为空")
@Size(min = 2, max = 30, message = "nft订单支付id限制2-30位且不能包含特殊字符")
private String nftOrderPayId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftPublishReqDto obj = new GalaxyNftPublishReqDto();
public static GalaxyNftPublishReqDto getNew() {
try {
return (GalaxyNftPublishReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftPublishReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftPublishRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/17 13:51
*/
@ApiModel(value = "GalaxyNftPublishRespDto", description = "NFT发行")
@Data
public class GalaxyNftPublishRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "用户Id")
private String userId;
@ApiModelProperty(position = 1, required = true, value = "用户购买的nftId")
private String nftId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftPublishRespDto obj = new GalaxyNftPublishRespDto();
public static GalaxyNftPublishRespDto getNew() {
try {
return (GalaxyNftPublishRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftPublishRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftPublishResultQueryReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 11:22
*/
@ApiModel(value = "GalaxyNftPublishResultQueryReqDto", description = "NFT发行结果查询")
@Data
public class GalaxyNftPublishResultQueryReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
/**
* nftOrderPayId
*/
@ApiModelProperty(position = 1, required = true, value = "nft订单支付id(保证唯一),不超过30个字符")
@NotBlank(message = "nft订单支付id不能为空")
@Size(min = 2, max = 30, message = "nft订单支付id限制2-30位且不能包含特殊字符")
private String nftOrderPayId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftPublishResultQueryReqDto obj = new GalaxyNftPublishResultQueryReqDto();
public static GalaxyNftPublishResultQueryReqDto getNew() {
try {
return (GalaxyNftPublishResultQueryReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftPublishResultQueryReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftPublishResultQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 11:22
*/
@ApiModel(value = "GalaxyNftPublishResultQueryRespDto", description = "NFT发行结果查询")
@Data
public class GalaxyNftPublishResultQueryRespDto implements Serializable,Cloneable {
/**
* nftId格式,发行人公钥hash_系列_系列索引id,申请多少个,最后一段计算出来即可,
* 比如申请10个,nftIdBegin位xx_xx_1,那么就可以推导出x_xx_1到x_xx_10
*/
@ApiModelProperty(position = 3, required = true, value = "nftId格式")
private String nftIdBegin;
@ApiModelProperty(position = 3, required = true, value = "标记任务状态,0:任务执行中 1:任务成功 2:任务失败")
private Integer taskStatus;
/**
* 失败情况下会有提示信息
*/
@ApiModelProperty(position = 3, required = true, value = "失败情况下会有提示信息")
private String taskMsg;
/**
* 交易hash
*/
@ApiModelProperty(position = 3, required = true, value = "交易hash")
private String txHash;
/**
* 链上交易时间戳
*/
@ApiModelProperty(position = 3, required = true, value = "chainTimestamp")
private String chainTimestamp;
@Override
public String toString() {
return JsonUtils.toJson(this);
}
private static final GalaxyNftPublishResultQueryRespDto obj = new GalaxyNftPublishResultQueryRespDto();
public static GalaxyNftPublishResultQueryRespDto getNew() {
try {
return (GalaxyNftPublishResultQueryRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftPublishResultQueryRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftTradeDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/29 15:57
*/
@Data
public class GalaxyNftTradeDto implements Serializable,Cloneable {
/**
* 应用系统购买系列唯一ID
*/
private String nftId;
/**
* 系列的唯一Id
*/
private String seriesId;
/**
* nftId
*/
private String tradeHash;
/**
* nft价格
*/
private String chainTimestamp;
/**
* 转出方地址
*/
private String fromAddress;
/**
* 转入方地址
*/
private String toAddress;
/**
* nft发行任务ID
*/
private Long tradePrice;
/**
* nft购买任务id(交易类别 1发行 2购买 3转移 4设置价格 5设置状态)
* @return
*/
private String tradeType;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftTradeDto obj = new GalaxyNftTradeDto();
public static GalaxyNftTradeDto getNew() {
try {
return (GalaxyNftTradeDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftTradeDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNtfUploadReqDto
* @Package com.liquidnet.service.galaxy.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/12 00:09
*/
@ApiModel(value = "GalaxyNftUploadReqDto", description = "NFT素材上传")
@Data
public class GalaxyNftUploadReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "nft原始素材url")
private String originalNftUrl;
@ApiModelProperty(position = 1, required = true, value = "显示图原始素材url")
private String originalDisplayUrl;
@ApiModelProperty(position = 2, required = true, value = "商品唯一规格ID")
private String skuId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftUploadReqDto obj = new GalaxyNftUploadReqDto();
public static GalaxyNftUploadReqDto getNew() {
try {
return (GalaxyNftUploadReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftUploadReqDto();
}
}
}
\ No newline at end of file
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyUserRegisterRespDto
* @Package com.liquidnet.service.galaxy.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/10 20:46
*/
@ApiModel(value = "GalaxyUserRegisterRespDto", description = "素材上传")
@Data
public class GalaxyNftUploadRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "skuId")
private String skuId;
@ApiModelProperty(position = 1, required = true, value = "nft原始素材url")
private String originalNftUrl;
@ApiModelProperty(position = 1, required = true, value = "显示图原始素材url")
private String originalDisplayUrl;
@ApiModelProperty(position = 2, required = true, value = "nft链上访问地址")
private String nftUrl;
@ApiModelProperty(position = 3, required = true, value = "缩略图链上访问地址")
private String displayUrl;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftUploadRespDto obj = new GalaxyNftUploadRespDto();
public static GalaxyNftUploadRespDto getNew() {
try {
return (GalaxyNftUploadRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftUploadRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyUserBindStatusQueryReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 12:06
*/
@ApiModel(value = "GalaxyUserBindStatusQueryReqDto", description = "用户绑定状态查询")
@Data
public class GalaxyUserBindStatusQueryReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
/**
* nftOrderPayId
*/
@ApiModelProperty(position = 1, required = true, value = "用户区块链地址")
@NotBlank(message = "用户区块链地址不能为空!")
@Size(min = 2, max = 100, message = "用户区块链地址不能超过100个字符")
private String blockChainAddress;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyUserBindStatusQueryReqDto obj = new GalaxyUserBindStatusQueryReqDto();
public static GalaxyUserBindStatusQueryReqDto getNew() {
try {
return (GalaxyUserBindStatusQueryReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyUserBindStatusQueryReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyUserBindStatusQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 12:06
*/
@ApiModel(value = "GalaxyUserBindStatusQueryRespDto", description = "用户绑定状态查询")
@Data
public class GalaxyUserBindStatusQueryRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 3, required = true, value = "用户区块链地址")
private String blockChainAddress;
@ApiModelProperty(position = 3, required = true, value = "0:绑定中 1:已绑定 2:绑定失败 3:未发起过绑定(未查询到)")
private Integer userBindStatus;
@Override
public String toString() {
return JsonUtils.toJson(this);
}
private static final GalaxyUserBindStatusQueryRespDto obj = new GalaxyUserBindStatusQueryRespDto();
public static GalaxyUserBindStatusQueryRespDto getNew() {
try {
return (GalaxyUserBindStatusQueryRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyUserBindStatusQueryRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyUserRegisterReqDto
* @Package com.liquidnet.service.galaxy.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/10 20:46
*/
@ApiModel(value = "GalaxyUserRegisterReqDto", description = "用户实名注册")
@Data
public class GalaxyUserRegisterReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
@NotBlank(message = "用户ID不能为空!")
@Size(min = 1, max = 30, message = "用户ID限制2-30位且不能包含特殊字符")
private String userId;
@ApiModelProperty(position = 2, required = true, value = "姓名[50]", example = "张三")
@Size(min = 1, max = 30, message = "姓名长度限制1-30位")
private String userName;
@ApiModelProperty(position = 3, required = true, value = "手机号[11]", example = "13111111111")
@Pattern(regexp = "\\d{11}", message = "手机号格式有误")
@NotBlank(message = "手机号不能为空")
@Size(min = 1, max = 11, message = "手机号长度限制1-11位")
private String mobile;
@ApiModelProperty(position = 4, required = true, value = "证件类型",example = "")
@NotBlank(message = "证件类型不能为空!")
@Size(min = 1, max = 2, message = "证件类型")
private String idCardType;
@ApiModelProperty(position = 5, required = true, value = "证件号")
@NotBlank(message = "证件号不能为空!")
@Size(min = 1, max = 18, message = "证件号限制1-18位且不能包含特殊字符")
private String idCard;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyUserRegisterReqDto obj = new GalaxyUserRegisterReqDto();
public static GalaxyUserRegisterReqDto getNew() {
try {
return (GalaxyUserRegisterReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyUserRegisterReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyUserRegisterRespDto
* @Package com.liquidnet.service.galaxy.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/10 20:46
*/
@ApiModel(value = "GalaxyUserRegisterRespDto", description = "用户实名注册")
@Data
public class GalaxyUserRegisterRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
private String userId;
@ApiModelProperty(position = 1, required = true, value = "用户区块链类型")
private String blockChainType;
@ApiModelProperty(position = 1, required = true, value = "用户区块链地址")
private String blockChainAddress;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyUserRegisterRespDto obj = new GalaxyUserRegisterRespDto();
public static GalaxyUserRegisterRespDto getNew() {
try {
return (GalaxyUserRegisterRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyUserRegisterRespDto();
}
}
}
package com.liquidnet.service.galaxy.dto.vo.mongo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftOrderBindBo
* @Package com.liquidnet.service.galaxy.dto.bo
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/31 13:36
*/
@Data
public class GalaxyNftOrderBindVo implements Serializable,Cloneable{
/**
* 接入方买入唯一标识
*/
private String nftOrderPayId;
/**
* 系列唯一编码
*/
private String seriesCode;
/**
* 系列的唯一Id
*/
private String seriesId;
/**
* nftId索引
*/
private Integer nftIdIndex;
/**
* 路由类型
*/
private String routerType;
/**
* 创建时间
*/
private String createdAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftOrderBindVo obj = new GalaxyNftOrderBindVo();
public static GalaxyNftOrderBindVo getNew() {
try {
return (GalaxyNftOrderBindVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftOrderBindVo();
}
}
}
package com.liquidnet.service.galaxy.dto.vo.mongo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftOrderBo
* @Package com.liquidnet.service.galaxy.dto.bo
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/17 11:16
*/
@Data
public class GalaxyNftOrderVo implements Serializable,Cloneable {
private String userId;
/**
* 应用系统购买系列唯一ID
*/
private String skuId;
/**
* 本地系列唯一名称
*/
private String seriesName;
/**
* 系列的唯一Id
*/
private String seriesId;
/**
* 本地系列唯一编码
*/
private String seriesCode;
/**
* 接入方买入唯一标识
*/
private String nftOrderPayId;
/**
* nftId
*/
private String nftId;
/**
* nft价格
*/
private Long nftPrice;
/**
* nft发行任务ID
*/
private String nftPublishTaskId;
/**
* 转出方地址
*/
private String nftPublishFromAddress;
/**
* 转入方地址
*/
private String nftPublishToAddress;
/**
* nft发行时间
*/
private String nftPublishChainTimestamp;
/**
* nft发行状态
*/
private String nftPublishStatus;
/**
* nft发行交易hash
*/
private String nftPublishTradeHash;
/**
* nft购买任务id
* @return
*/
private String nftBuyTaskId;
/**
* 转出方地址
*/
private String nftBuyFromAddress;
/**
* 转入方地址
*/
private String nftBuyToAddress;
/**
* nft购买时间
*/
private String nftBuyChainTimestamp;
/**
* nft购买状态
*/
private String nftBuyStatus;
/**
* nft购买交易hash
*/
private String nftBuyTradeHash;
/**
* nft购买支付任务ID
* @return
*/
private String nftBuyPayTaskId;
/**
* 路由类型
*/
private String routerType;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftOrderVo obj = new GalaxyNftOrderVo();
public static GalaxyNftOrderVo getNew() {
try {
return (GalaxyNftOrderVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftOrderVo();
}
}
}
package com.liquidnet.service.galaxy.dto.vo.mongo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftOrderBo
* @Package com.liquidnet.service.galaxy.dto.bo
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/17 11:16
*/
@Data
public class GalaxyNftTradeVo implements Serializable,Cloneable {
/**
* 应用系统购买系列唯一ID
*/
private String nftId;
/**
* nft名字
*/
private String nftName;
/**
* 本地系列唯一名称
*/
private String seriesName;
/**
* 系列的唯一Id
*/
private String seriesId;
/**
* 本地系列唯一编码
*/
private String seriesCode;
/**
* nftId
*/
private String tradeHash;
/**
* nft价格
*/
private String chainTimestamp;
/**
* 转出方地址
*/
private String fromAddress;
/**
* 转入方地址
*/
private String toAddress;
/**
* nft发行任务ID
*/
private Long tradePrice;
/**
* nft购买任务id
* @return
*/
private String tradeType;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftTradeVo obj = new GalaxyNftTradeVo();
public static GalaxyNftTradeVo getNew() {
try {
return (GalaxyNftTradeVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftTradeVo();
}
}
}
package com.liquidnet.service.galaxy.dto.vo.mongo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxySeriesInfoBo
* @Package com.liquidnet.service.galaxy.dto.bo
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/15 15:03
*/
@Data
public class GalaxySeriesInfoVo implements Serializable,Cloneable {
/**
* 本地系列唯一标识id
*/
private String seriesInfoId;
/**
* 本地系列唯一名称(前缀+skuid)
*/
private String seriesName;
/**
* 本地系列唯一编码
*/
private String seriesCode;
/**
* 区块链上系列ID(系列声明后获取,NFT发行购买用到)
*/
private String seriesId;
/**
* 系列发行总量
*/
private Long totalCount;
/**
* 系列已发行个数
*/
private Long crtCount;
/**
* 系列声明任务ID
*/
private String seriesClaimTaskId;
/**
* 系列声明状态
*/
private String seriesClaimStatus;
/**
* 系列显示封面
*/
private String coverUrl;
/**
* 系列描述信息,不超过500个字符
*/
private String seriesDesc;
/**
* 系列声明时间
*/
private String chainTimestamp;
/**
* 系列链上交易hash
*/
private String tradeHash;
/**
* 系列声明中nftHash
*/
private Integer nftCount;
/**
* 路由类型
*/
private String routerType;
/**
* 创建时间
*/
private String createdAt;
/**
* 更新时间
*/
private String updatedAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxySeriesInfoVo obj = new GalaxySeriesInfoVo();
public static GalaxySeriesInfoVo getNew() {
try {
return (GalaxySeriesInfoVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxySeriesInfoVo();
}
}
}
package com.liquidnet.service.galaxy.dto.vo.mongo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxySeriesInfoBo
* @Package com.liquidnet.service.galaxy.dto.bo
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/15 15:03
*/
@Data
public class GalaxySeriesNftInfoVo implements Serializable,Cloneable {
/**
* 本地系列唯一标识id
*/
private String seriesNftInfoId;
/**
* 本地系列唯一标识id
*/
private String seriesInfoId;
/**
* 本地系列唯一标识id
*/
private String skuId;
/**
* 本地系列唯一名称(前缀+skuid)
*/
private String seriesName;
/**
* 本地系列唯一编号(前缀+skuid)
*/
private String seriesCode;
/**
* 区块链上系列ID(系列声明后获取,NFT发行购买用到)
*/
private String seriesId;
/**
* 系列发行总量
*/
private Long nftTotalCount;
/**
* 系列已发行个数
*/
private Long nftCrtCount;
/**
* 系列nft发行开始索引
*/
private String nftIdBegin;
/**
* 系列nft发行开始索引
*/
private Integer nftIdBeginIndex;
/**
* nft系列发行序号
*/
private Integer nftPublishNumber;
/**
* nft素材原始地址
*/
private String originalNftUrl;
/**
* nft显示素材原始地址
*/
private String originalDisplayUrl;
//======================================
//=============以下都为购买信息=============
//======================================
/**
* 作者名,中文+英文(数字或符号为非法输入) 不超过30个字符
*/
private String author;
/**
* nft名字(sku名称),中英文数字均可,不超过256个字符
*/
private String nftName;
/**
* nft素材地址
*/
private String nftUrl;
/**
* 预览图url,不超过1024个字符。(至信链浏览器展示预览图尺寸为290*290,请上传比例为1:1的图片)
*/
private String displayUrl;
/**
* nft简介,500个字符以内
*/
private String nftDesc;
/**
* 标签,【文创】,游戏,动漫,30个字符以内
* 非必填
*/
private String nftFlag;
/**
* 可售状态下有意义,表示售卖多少积分
*/
private BigDecimal sellCount;
/**
* 系列声明中nftHash
*/
private String nftHash;
/**
* 路由类型
*/
private String routerType;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxySeriesNftInfoVo obj = new GalaxySeriesNftInfoVo();
public static GalaxySeriesNftInfoVo getNew() {
try {
return (GalaxySeriesNftInfoVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxySeriesNftInfoVo();
}
}
}
package com.liquidnet.service.galaxy.dto.vo.mongo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxySeriesNftUploadBo
* @Package com.liquidnet.service.galaxy.dto.bo
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/28 13:25
*/
@Data
public class GalaxySeriesNftUploadVo implements Serializable,Cloneable {
/**
* 本地系列唯一标识id
*/
private String skuId;
/**
* nft素材原始地址
*/
private String originalNftUrl;
/**
* nft显示素材原始地址
*/
private String originalDisplayUrl;
/**
* nft素材地址
*/
private String nftUrl;
/**
* 预览图url,不超过1024个字符。(至信链浏览器展示预览图尺寸为290*290,请上传比例为1:1的图片)
*/
private String displayUrl;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxySeriesNftUploadVo obj = new GalaxySeriesNftUploadVo();
public static GalaxySeriesNftUploadVo getNew() {
try {
return (GalaxySeriesNftUploadVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxySeriesNftUploadVo();
}
}
}
package com.liquidnet.service.galaxy.dto.vo.mongo;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 用户注册信息
* @class: GalaxyUserInfoBo
* @Package com.liquidnet.service.galaxy
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/15 14:34
*/
@Data
public class GalaxyUserInfoVo implements Serializable,Cloneable{
private String userId;
/**
* 用户姓名
*/
private String userName;
/**
* 移动手机号
*/
private String mobile;
/**
* 证件类型
*/
private String idCardType;
/**
* 证件号码
*/
private String idCard;
/**
* 助记词
*/
private String mnemonic;
/**
* 助记词绑定索引
*/
private String index;
/**
* 用户唯一ID
*/
private String userIdentification;
/**
* 用户公钥
*/
private String userPubKey;
/**
* 用户私钥
*/
private String userPriKey;
/**
* 路由类型
*/
private String routerType;
/**
* 用户平台地址
*/
private String blockChainAddress;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyUserInfoVo obj = new GalaxyUserInfoVo();
public static GalaxyUserInfoVo getNew() {
try {
return (GalaxyUserInfoVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyUserInfoVo();
}
}
}
package com.liquidnet.service.galaxy.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.dto.param.*;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 区块链艺术品相关
* @class: IGalaxyArtworkService
* @Package com.liquidnet.service.galaxy.service
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/8 11:45
*/
public interface IGalaxyArtworkService {
ResponseDto<GalaxyNftImageRespDto> nftImageCheck(GalaxyNftImageReqDto reqDto);
ResponseDto<GalaxyNftUploadRespDto> nftUpload(GalaxyNftUploadReqDto reqDto);
ResponseDto<GalaxyArtSeriesClaimRespDto> seriesClaim(GalaxyArtSeriesClaimReqDto reqDto);
ResponseDto<GalaxyArtSeriesClaimResultQueryRespDto> seriesClaimResultQuery(GalaxyArtSeriesClaimResultQueryReqDto reqDto);
}
package com.liquidnet.service.galaxy.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishRespDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishResultQueryReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishResultQueryRespDto;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 区块链发行相关
* @class: IGalaxyPublishService
* @Package com.liquidnet.service.galaxy.service
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/8 11:45
*/
public interface IGalaxyPublishService {
ResponseDto<GalaxyNftPublishRespDto> nftPublish(GalaxyNftPublishReqDto reqDto);
ResponseDto<GalaxyNftPublishResultQueryRespDto> nftPublishResultQuery(GalaxyNftPublishResultQueryReqDto reqDto);
}
package com.liquidnet.service.galaxy.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.dto.param.*;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 区块链交易相关
* @class: IGalaxyTradeService
* @Package com.liquidnet.service.galaxy.service
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/8 11:45
*/
public interface IGalaxyTradeService {
ResponseDto<GalaxyNftBuyRespDto> nftBuy(GalaxyNftBuyReqDto reqDto);
ResponseDto<GalaxyNftPublishAndBuyRespDto> nftPublishAndBuy(GalaxyNftPublishAndBuyReqDto reqDto);
ResponseDto<GalaxyNftBuyResultQueryRespDto> nftBuyResultQuery(GalaxyNftBuyResultQueryReqDto reqDto);
ResponseDto<GalaxyNftBuyPayResultQueryRespDto> nftBuyPayResultQuery(GalaxyNftBuyPayResultQueryReqDto reqDto);
ResponseDto<GalaxyNftPublishAndBuyResultQueryRespDto> nftPublishAndBuyResultQuery(GalaxyNftPublishAndBuyResultQueryReqDto reqDto);
ResponseDto<GalaxyNftPublishAndBuyRouterBatchQueryRespDto> nftPublishAndBuyResultBatchQuery(GalaxyNftPublishAndBuyRouterBatchQueryReqDto reqDto);
}
package com.liquidnet.service.galaxy.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserBindStatusQueryReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserBindStatusQueryRespDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 区块链用户相关
* @class: IGalaxyUserService
* @Package com.liquidnet.service.galaxy.service
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/8 11:45
*/
public interface IGalaxyUserService {
ResponseDto<GalaxyUserRegisterRespDto> userRegister(GalaxyUserRegisterReqDto reqDto);
ResponseDto<GalaxyUserBindStatusQueryRespDto> userBindStatusQuery(GalaxyUserBindStatusQueryReqDto reqDto);
}
package com.liquidnet.service.galaxy.utils;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import java.util.HashMap;
import java.util.LinkedList;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: ObjectUtil
* @Package com.liquidnet.service.dragon.utils
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/15 16:00
*/
@Component
public class ObjectUtil {
private static final LinkedList<Object[]> linkedListObj = new LinkedList<Object[]>();
private static final LinkedList<String> linkedListStr = new LinkedList<String>();
private static final HashMap<String, String> hashMapStringAndString = new HashMap<>();
private static final HashMap<String, Object> hashMapStringAndObj = new HashMap<>();
private static final JSONObject jsonObjectObj = new JSONObject();
private static final LinkedMultiValueMap<String, String> linkedMultiValueMapStringAndString = new LinkedMultiValueMap<String, String>();
public static LinkedList<Object[]> cloneLinkedListObj() {
return (LinkedList<Object[]>) linkedListObj.clone();
}
public static LinkedList<String> cloneLinkedListStr() {
return (LinkedList<String>) linkedListStr.clone();
}
public static HashMap<String, String> cloneHashMapStringAndString() {
return (HashMap<String, String>) hashMapStringAndString.clone();
}
public static HashMap<String, Object> cloneHashMapStringAndObj() {
return (HashMap<String, Object>) hashMapStringAndObj.clone();
}
public static JSONObject cloneJsonObjectObj() {
return (JSONObject) jsonObjectObj.clone();
}
public static LinkedMultiValueMap<String, String> cloneLinkedMultiValueMapStringAndString() {
return linkedMultiValueMapStringAndString.clone();
}
}
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<module>liquidnet-service-stone-api</module> <module>liquidnet-service-stone-api</module>
<module>liquidnet-service-goblin-api</module> <module>liquidnet-service-goblin-api</module>
<module>liquidnet-service-smile-api</module> <module>liquidnet-service-smile-api</module>
<module>liquidnet-service-galaxy-api</module>
</modules> </modules>
<dependencies> <dependencies>
<dependency> <dependency>
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
*/ */
package com.liquidnet.commons.lang.util; package com.liquidnet.commons.lang.util;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.cglib.beans.BeanCopier; import org.springframework.cglib.beans.BeanCopier;
import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.LinkedMultiValueMap;
...@@ -16,7 +18,9 @@ import java.lang.annotation.*; ...@@ -16,7 +18,9 @@ import java.lang.annotation.*;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Supplier; import java.util.function.Supplier;
...@@ -289,4 +293,56 @@ public class BeanUtil { ...@@ -289,4 +293,56 @@ public class BeanUtil {
return convertBeanToMultiValueMap(bean,true); return convertBeanToMultiValueMap(bean,true);
} }
/**
* bean转换为jsonString
* @param bean
* @return
* @throws IntrospectionException
* @throws IllegalAccessException
* @throws InvocationTargetException
*/
public static String convertBeanToJsonString(Object bean)
{
Map<String,Object> map = null;
try {
map = BeanUtil.convertBeanToMap(bean,false);
} catch (IntrospectionException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
return JsonUtils.toJson(map);
}
/**
* bean转换为NameValuePair 键值对 只能是String,String
* @param bean
* @return
* @throws IntrospectionException
* @throws IllegalAccessException
* @throws InvocationTargetException
*/
public static List<NameValuePair> convertBeanToNameValuePairList(Object bean)
{
Map<String,Object> map = null;
try {
map = BeanUtil.convertBeanToMap(bean,false);
} catch (IntrospectionException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
List<NameValuePair> params = new ArrayList<NameValuePair>();
// Map集合循环遍历方式三 推荐,尤其是容量大时
for (Map.Entry<String, Object> m : map.entrySet()) {
params.add(new BasicNameValuePair(m.getKey(),m.getValue().toString()));
}
return params;
}
} }
...@@ -517,6 +517,25 @@ public abstract class DateUtil { ...@@ -517,6 +517,25 @@ public abstract class DateUtil {
return LocalDateTime.ofEpochSecond(epochMilli,0, ZoneOffset.ofHours(8)); return LocalDateTime.ofEpochSecond(epochMilli,0, ZoneOffset.ofHours(8));
} }
/**
* 获取10位时间戳,精确到秒
* @return
*/
public static Long getNowSeconds(){
//获取秒数
Long second = LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8"));
//获取毫秒数
// Long milliSecond = LocalDateTime.now().toInstant(ZoneOffset.of("+8")).toEpochMilli();
return second;
}
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(DateUtil.getNowTime());
//获取秒数
Long second = LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8"));
//获取毫秒数
Long milliSecond = LocalDateTime.now().toInstant(ZoneOffset.of("+8")).toEpochMilli();
System.out.println("second==="+second);
System.out.println("milliSecond==="+milliSecond);
} }
} }
package com.liquidnet.commons.lang.util;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: TreadUtil
* @Package com.liquidnet.commons.lang.util
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/17 18:52
*/
@Slf4j
public class FixedSizeThreadPool {
//手写线程池需要准备什么?
// 1.需要1个仓库
private BlockingQueue<Runnable> blockingQueue;
// 2.需要一个线程的集合
private List<Thread> workers;
//3. 需要具体干活的线程
public static class Worker extends Thread {
// 图上的卡车
// 1.到我们的仓库中去拿东西(blockingQueue)
//
private FixedSizeThreadPool pool;
// 创建构造方法,声明自己属于哪个线程池
public Worker(FixedSizeThreadPool pool) {
this.pool = pool;
}
@Override
public void run() {
// 开始工作
while (this.pool.isWorking || this.pool.blockingQueue.size() > 0) {
Runnable task = null;
// 从队列中拿东西的时候,需要的是阻塞
try {
if (this.pool.isWorking) {
task = this.pool.blockingQueue.take();
} else {
task = this.pool.blockingQueue.poll();
}
} catch (Exception e) {
e.printStackTrace();
}
if (task != null) {
task.run();
log.info("线程:{}执行完毕", Thread.currentThread().getName());
// System.out.println("线程:"+Thread.currentThread().getName());
}
}
}
}
// 线程池的初始化,构造函数
public FixedSizeThreadPool(int poolSize, int taskSize) {
if (poolSize <= 0 || taskSize <= 0)
throw new IllegalArgumentException("非法参数");
this.blockingQueue = new LinkedBlockingQueue<>(taskSize);
this.workers = Collections.synchronizedList(new ArrayList<>());
for (int i = 0; i < poolSize; i++) {
Worker work = new Worker(this);
work.start();
workers.add(work);
}
}
// 把任务提交到仓库中的办法
public boolean submit(Runnable task) {
if (isWorking) {
return this.blockingQueue.offer(task);
} else {
return false;
}
}
// 关闭的方法:
//a.仓库停止接收任务
//b.一旦仓库中还有任务就要继续执行
//c. 拿任务就不该阻塞
//d.一旦任务阻塞,我就中断他
private volatile boolean isWorking = true;
public void shutDown() {
// 执行关闭即可
this.isWorking = false;
for (Thread thread : workers) {
if (thread.getState().equals(Thread.State.BLOCKED)) {
thread.interrupt();// 中断线程
}
}
}
public static void main(String[] args) {
FixedSizeThreadPool fixedSizeThreadPool = new FixedSizeThreadPool(3, 6);
for (int i = 0; i < 6; i++) {
fixedSizeThreadPool.submit(
new Runnable() {
@Override
public void run() {
System.out.println("放入线程");
try {
Thread.sleep(2000L);
} catch (InterruptedException e) {
e.printStackTrace();
log.error("一个线程被中断");
}
}
}
);
}
fixedSizeThreadPool.shutDown();
}
}
...@@ -7,8 +7,10 @@ import org.springframework.http.*; ...@@ -7,8 +7,10 @@ import org.springframework.http.*;
import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap; import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -43,6 +45,18 @@ public class HttpUtil { ...@@ -43,6 +45,18 @@ public class HttpUtil {
return request(url, params, headers, HttpMethod.GET); return request(url, params, headers, HttpMethod.GET);
} }
/**
* get请求 通过uri 解决再次编码问题
* @param url
* @param headers
* @return
*/
public static String getByUri(String url, MultiValueMap<String, String> headers) {
UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromHttpUrl(url);
URI uri = uriComponentsBuilder.build(true).toUri();
return request(uri,headers, HttpMethod.GET);
}
/** /**
* post请求 * post请求
* *
...@@ -240,6 +254,31 @@ public class HttpUtil { ...@@ -240,6 +254,31 @@ public class HttpUtil {
return request(url, params, headers, method, MediaType.APPLICATION_FORM_URLENCODED); return request(url, params, headers, method, MediaType.APPLICATION_FORM_URLENCODED);
} }
/**
* http请求 通过uri
* @param url
* @param headers
* @param method
* @return
*/
public static String request(URI url,MultiValueMap<String, String> headers, HttpMethod method) {
if (url == null) {
return null;
}
// header
HttpHeaders httpHeaders = new HttpHeaders();
if (headers != null) {
httpHeaders.addAll(headers);
}
HttpEntity<Object> httpEntity = new HttpEntity(httpHeaders);
// RestTemplate restTemplate = new RestTemplate();
// 提交方式:表单、json
ResponseEntity<String> response = restTemplate.exchange(url, method, httpEntity, String.class);
return response.getBody();
}
/** /**
* 表单请求Raw * 表单请求Raw
* *
......
...@@ -113,10 +113,18 @@ public class IDGenerator { ...@@ -113,10 +113,18 @@ public class IDGenerator {
return "PAY" + nextTimeId(); return "PAY" + nextTimeId();
} }
public static String getZxlNftImageCosCode() {
return "ZXLNFTIMAGE" + nextTimeId();
}
public static String refundCode() { public static String refundCode() {
return "RED" + nextTimeId(); return "RED" + nextTimeId();
} }
public static String getSeriesCode() {
return "SN" + nextTimeId();
}
/** /**
* 根据 订单号生成qrCode * 根据 订单号生成qrCode
* *
......
package com.liquidnet.common.cache.redis.config;//package com.liquidnet.common.cache.redis.config;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import java.util.List;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: RedisConfig
* @Package com.liquidnet.common.cache.redis.config
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/8/10 16:28
*/
@Slf4j
@Configuration
public class RedisGalaxyConfig extends AbstractRedisConfig{
@Value("${spring.redis.galaxy.host:null}")
private String host;
@Value("${spring.redis.galaxy.port:-1}")
private int port;
@Value("${spring.redis.galaxy.password:null}")
private String password;
@Value("${spring.redis.galaxy.lettuce.pool.max-active:-1}")
private int maxActive;
@Value("${spring.redis.galaxy.lettuce.pool.max-idle:-1}")
private int maxIdle;
@Value("${spring.redis.galaxy.lettuce.pool.min-idle:-1}")
private int minIdle;
@Value("${spring.redis.galaxy.lettuce.pool.max-wait:-1}")
private int maxWait;
@Value("${spring.redis.galaxy.dbs:${spring.redis.galaxy.database:-1}}")
private List<Integer> dbs;
String getHost(){
return this.host;
}
int getPort(){
return this.port;
}
String getPassword(){
return this.password;
}
int getMaxActive(){
return this.maxActive;
}
int getMaxIdle(){
return this.maxIdle;
}
int getMinIdle(){
return this.minIdle;
}
int getMaxWait(){
return this.maxWait;
}
List<Integer> getDbs(){
return this.dbs;
}
}
\ No newline at end of file
...@@ -42,6 +42,6 @@ public class MathUtil { ...@@ -42,6 +42,6 @@ public class MathUtil {
log.info("redisConfig.defaultDb===",redisConfig.defaultDb); log.info("redisConfig.defaultDb===",redisConfig.defaultDb);
log.info("redisConfig.totalDbs===",redisConfig.totalDbs); log.info("redisConfig.totalDbs===",redisConfig.totalDbs);
// redisConfig.getRedisTemplateByDb(MathUtil.getIndex("1",redisConfig.defaultDb,redisConfig.totalDbs)); // redisConfig.getRedisTemplateByDb(MathUtil.getIndex("1",redisConfig.defaultDb,redisConfig.totalDbs));
System.out.println(""+MathUtil.getIndex("redis-test",1,16)); System.out.println(""+MathUtil.getIndex("galaxy:user:zxinchain:1222222",1,16));
} }
} }
...@@ -32,6 +32,9 @@ public class RedisDataSourceUtil { ...@@ -32,6 +32,9 @@ public class RedisDataSourceUtil {
@Autowired @Autowired
private RedisCandyUtil redisCandyUtil; private RedisCandyUtil redisCandyUtil;
@Autowired
private RedisGalaxyUtil redisGalaxyUtil;
public AbstractRedisUtil getRedisKylinUtil() { public AbstractRedisUtil getRedisKylinUtil() {
return this.redisKylinUtil; return this.redisKylinUtil;
} }
...@@ -59,4 +62,8 @@ public class RedisDataSourceUtil { ...@@ -59,4 +62,8 @@ public class RedisDataSourceUtil {
public AbstractRedisUtil getRedisGoblinUtil() { public AbstractRedisUtil getRedisGoblinUtil() {
return this.redisGoblinUtil; return this.redisGoblinUtil;
} }
public AbstractRedisUtil getRedisGalaxyUtil(){
return this.redisGalaxyUtil;
}
} }
package com.liquidnet.common.cache.redis.util;
import com.liquidnet.common.cache.redis.config.AbstractRedisConfig;
import com.liquidnet.common.cache.redis.config.RedisGalaxyConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @author AnJiabin <jiabin.an@lightnet.io>
* @version V1.0
* @Description: Redis工具类
* @class: RedisUtil
* @Package com.liquidnet.stellar.utils
* @Copyright: LightNet @ Copyright (c) 2020
* @date 2022/3/15 13:11
*/
@Slf4j
@Component("redisGalaxyUtil")
public final class RedisGalaxyUtil extends AbstractRedisUtil{
@Autowired
private RedisGalaxyConfig redisConfig;
@Override
public int getDbs() {
log.info("RedisGalaxyUtil.totalDbs===",redisConfig.totalDbs);
return redisConfig.totalDbs;
}
@Override
AbstractRedisConfig getRedisConfig() {
return this.redisConfig;
}
}
...@@ -41,6 +41,9 @@ public enum ErrorCode implements ServiceErrorCode { ...@@ -41,6 +41,9 @@ public enum ErrorCode implements ServiceErrorCode {
ERROR("1",""), ERROR("1",""),
HTTP_PARAM_ERROR("2", "Param error"), HTTP_PARAM_ERROR("2", "Param error"),
HTTP_SYSTEM_ERROR("50000", "System busy, please try again later"), HTTP_SYSTEM_ERROR("50000", "System busy, please try again later"),
SYSTEM_ERROR("SYS0010001", "系统异常,请联系管理员"),
SERVER_INNER_ERROR("SYS0010002", "系统内部错误"),
SERVER_ERROR("SYS0010003", "服务不可用,调用后端服务失败")
; ;
......
...@@ -313,6 +313,37 @@ public class MQConst { ...@@ -313,6 +313,37 @@ public class MQConst {
} }
} }
public enum GalaxyQueue {
SQL_USER_INFO("galaxy:stream:rk.sql.userInfo", "group.sql.userInfo", "用户注册信息"),
SQL_SERIES_INFO("galaxy:stream:rk.sql.seriesInfo", "group.sql.seriesInfo", "系列信息"),
SQL_NFT_ORDER_INFO("galaxy:stream:rk.sql.nftOrderInfo", "group.sql.nftOrderInfo", "订单信息"),
SQL_NFT_TRADE_INFO("galaxy:stream:rk.sql.nftTradeInfo", "group.sql.nftTradeInfo", "交易信息"),
// JSON_NFT_PUBLISH_AND_BUY("galaxy:stream:rk.json.nftPublishAndBuy", "group.sql.nftPublishAndBuy", "NFT发行和购买"),
JSON_NFT_PUBLISH_AND_BUY("galaxy:stream:rk.json.nftPublishAndBuy", "group.sql.nftPublishAndBuy", "NFT发行和购买"),
;
private final String key;
private final String group;
private final String desc;
GalaxyQueue(String key, String group, String desc) {
this.key = key;
this.group = group;
this.desc = desc;
}
public String getKey() {
return key;
}
public String getGroup() {
return group;
}
public String getDesc() {
return desc;
}
}
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(ChimeQueue.USER_OPERATION_LIKE.name()); System.out.println(ChimeQueue.USER_OPERATION_LIKE.name());
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>liquidnet-common-third</artifactId>
<groupId>com.liquidnet</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>liquidnet-common-third-antchain</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-common-base</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-common-cache-redis</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>jakarta.validation</groupId>-->
<!-- <artifactId>jakarta.validation-api</artifactId>-->
<!-- </dependency>-->
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>4.1.59.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-bom</artifactId>
<version>2020.0.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
\ No newline at end of file
package com.liquidnet.common.third.antchain.biz;
import com.liquidnet.common.third.antchain.config.AntchainConfig;
import com.liquidnet.commons.lang.util.BeanUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.NameValuePair;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import java.beans.IntrospectionException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.net.URI;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: ZxlnftBiz
* @Package com.liquidnet.common.third.antchain
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/2/21 11:19
*/
@Slf4j
@Component
public class AntchainBiz {
@Autowired
private AntchainConfig antchainConfig;
/**
* 构造GET请求url
* @param requestUrl
* @param tClass
* @param <T>
* @return
*/
public <T> String buildGetRequestUrl(String requestUrl,Class<T> tClass,Object obj){
//拼接请求url
URI build = null;
// String reqUrl = null;
// try {
// UriComponentsBuilder builder = UriComponentsBuilder
// .fromHttpUrl(requestUrl).queryParams(this.buildGetReqParams(obj));
// reqUrl = builder.build(true).toString();
// }
// catch (Exception e) {
// e.printStackTrace();
// }
List<NameValuePair> params = BeanUtil.convertBeanToNameValuePairList(obj);
requestUrl = requestUrl.concat("?");
for(NameValuePair nameValuePair:params){
try {
requestUrl = requestUrl.concat("&"+nameValuePair.getName()+"="+ URLEncoder.encode(nameValuePair.getValue().toString(), "UTF-8"));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
// try {
// build = new URIBuilder(requestUrl).addParameters(params).build();
// } catch (URISyntaxException e) {
// e.printStackTrace();
// }
// if(build.toString().contains("%20")){
// return build.toString().replaceAll("%20","+");
// }
return requestUrl;
}
public MultiValueMap<String, String> buildGetReqParams(Object obj){
Map<String,Object> map = null;
try {
map = BeanUtil.convertBeanToMap(obj,false);
} catch (IntrospectionException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
MultiValueMap<String, String> params = new LinkedMultiValueMap();
// Map集合循环遍历方式三 推荐,尤其是容量大时
for (Map.Entry<String, Object> m : map.entrySet()) {
params.add(m.getKey(),m.getValue().toString());
}
return params;
}
}
package com.liquidnet.common.third.antchain.config;
import com.liquidnet.commons.lang.util.BASE64Util;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import java.io.UnsupportedEncodingException;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: EasemobConfig
* @Package com.liquidnet.common.third.easemob.config
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/22 10:42
*/
@Configuration
public class AntchainConfig {
@Value("${liquidnet.antchain.appId:220214000100001}")
private String appId;
@Value("${liquidnet.antchain.appKey:82b561110c4b4f4d91ad2a2b0d5b7908}")
private String appKey;
@Value("${liquidnet.antchain.nftPlatformAddress:ZXa66c8a684727d0f9aaa434044362aa8a18b61bb4}")
private String nftPlatformAddress;
@Value("${liquidnet.antchain.nftPlatformPubKey:LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZrd0V3WUhLb1pJemowQ0FRWUlLb0VjejFVQmdpMERRZ0FFbFNTQk00MHJIZlJFa0NjWUxlRm1RZzE0SHlIcAp5Rk9uSktzblFqbDBCL2JXOStFWnZPblArNW0vMEdkUCtXM29yeG5Kd3p5OHNoYS9OYkQ4QVBmNXlBPT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg==}")
private String nftPlatformPubKey;
@Value("${liquidnet.antchain.nftPlatformPriKey:LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JR1RBZ0VBTUJNR0J5cUdTTTQ5QWdFR0NDcUJITTlWQVlJdEJIa3dkd0lCQVFRZ1VhbTVWM2V6ZFZJTmNoZ28KVDRKL28zMHArMGJCd3hQWUZFL01FdEU3MTZhZ0NnWUlLb0VjejFVQmdpMmhSQU5DQUFTVkpJRXpqU3NkOUVTUQpKeGd0NFdaQ0RYZ2ZJZW5JVTZja3F5ZENPWFFIOXRiMzRSbTg2Yy83bWIvUVowLzViZWl2R2NuRFBMeXlGcjgxCnNQd0E5L25JCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K}")
private String nftPlatformPriKey;
@Value("${liquidnet.antchain.walletSdkUrl:http://127.0.0.1:30505}")
private String walletSdkUrl;
@Value("${liquidnet.antchain.nftApiUrl:https://nfttest2.zxinchain.com}")
private String nftApiUrl;
@Value("${liquidnet.antchain.platformIdentification:4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef}")
private String platformIdentification;
public String getAppId(){
return appId;
}
public String getAppKey() {
return appKey;
}
public String getNftPlatformAddress() {
return nftPlatformAddress;
}
public String getPlatformIdentification() {
return platformIdentification;
}
// public String getNftPlatformPubKey(){
// return nftPlatformPubKey;
// }
//
// public String getNftPlatformPriKey(){
// return nftPlatformPriKey;
// }
public String getNftPlatformPubKey(){
String pubKey = null;
try {
pubKey = BASE64Util.decode(nftPlatformPubKey);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return pubKey;
}
public String getNftPlatformPriKey(){
String priKey = null;
try {
priKey = BASE64Util.decode(nftPlatformPriKey);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return priKey;
}
public String getWalletSdkUrl(){
return walletSdkUrl;
}
public String getNftApiUrl(){
return nftApiUrl;
}
}
package com.liquidnet.common.third.antchain.constant;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: EasemobConstant
* @Package com.liquidnet.common.third.easemob.constant
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/22 10:42
*/
public class AntchainConstant {
//注册单个用户
public static String WALLET_SDK_01_CREATE_MNEMONIC = "/createMnemonic";
public static String WALLET_SDK_02_GENERATE_API_SIGN = "/generateApiSign";
public static String WALLET_SDK_03_UPLOAD_TO_COS = "/uploadToCos";
public static String WALLET_SDK_04_UPLOAD_FILE_TO_COS = "/uploadFileToCos";
public static String WALLET_SDK_05_DERIVE_KEY_PAIR = "/DeriveKeyPair";
public static String WALLET_SDK_06_SIGN_BY_PRI_KEY = "/SignByPriKey";
public static String WALLET_SDK_07_PRI_KEY_2_PUB_KEY= "/PriKey2PubKey";
public static String WALLET_SDK_08_PUB_KEY_2_ADDRESS = "/PubKey2Address";
public static String WALLET_SDK_09_PRI_KEY_2_ADDRESS = "/PriKey2Address";
public static String WALLET_SDK_10_VERIFY_BY_PUB_KEY = "/VerifyByPubKey";
public static String WALLET_SDK_11_SM3_HASH = "/SM3Hash";
public static String WALLET_SDK_12_SM3_HASH_ENCODE = "/SM3HashEncode";
/**
* 下发注册实名验证码接口(方案二)
*/
public static String ZXL_NFT_001_REGISTER_VERIFY_CODE_URL = "/api/v1/nft/register/verify_code";
/**
* 自然人注册实名接口(方案二)
*/
public static String ZXL_NFT_002_REGISTER_PERSON_URL = "/api/v1/nft/register/person";
/**
* 自然人注册实名(使用nft平台签名)接口(方案一)
*/
public static String ZXL_NFT_003_REGISTER_PERSON_PLATFORM_URL = "/api/v1/nft/register/person_platform";
/**
* 营业执照上传接口(方案二)
*/
public static String ZXL_NFT_004_BUSINESS_LICENSE_UPLOAD_URL = "/api/v1/nft/business_license/upload";
/**
* 营业执照上传(使用nft平台签名)接口(方案一)
*/
public static String ZXL_NFT_005_BUSINESS_LICENSE_UPLOAD_PLATFORM_URL = "/api/v1/nft/business_license/upload_platform";
/**
* 电子公函上传接口(方案二)
*/
public static String ZXL_NFT_006_OFFICIAL_LETTER_UPLOAD_URL = "/api/v1/nft/official_letter/upload";
/**
* 电子公函上传(使用nft平台签名)接口(方案一)
*/
public static String ZXL_NFT_007_OFFICIAL_LETTER_UPLOAD_PLATFORM_URL = "/api/v1/nft/official_letter/upload_platform";
/**
* 图片内容检测(方案一)
*/
public static String ZXL_NFT_008_QUERY_IMAGE_MODERATION_URL = "/api/v1/nft/query/image/moderation";
/**
* 企业注册实名接口(方案二)
*/
public static String ZXL_NFT_009_REGISTER_COMPANY_URL = "/api/v1/nft/register/company";
/**
* 企业注册实名(使用nft平台签名)接口(方案一)
*/
public static String ZXL_NFT_010_REGISTER_COMPANY_PLATFORM_URL = "/api/v1/nft/register/company_platform";
/**
* 下发查询用户信息验证码接口(方案二)
*/
public static String ZXL_NFT_011_USER_QUERY_VERIFY_CODE_URL = "/api/v1/nft/user/query/verify_code";
/**
* 查询用户信息接口(方案二)
*/
public static String ZXL_NFT_012_USER_QUERY_URL = "/api/v1/nft/user/query";
/**
* NFT地址绑定接口(方案二)
*/
public static String ZXL_NFT_013_IDENTITY_BIND_SUBMIT_URL = "/api/v1/nft/identity/bind/submit";
/**
* 受信平台NFT身份绑定接口(方案一)
*/
public static String ZXL_NFT_014_IDENTITY_BIND_SUBMIT_BY_TRUSTED_URL = "/api/v1/nft/identity/bind/submit_by_trusted_platform";
/**
* NFT平台自身身份绑定,(方案一)
*/
public static String ZXL_NFT_015_IDENTITY_BIND_PLATFORM_SELF_URL = "/api/v1/nft/identity/bind/platform_self";
/**
* 绑定状态批量查询接口(方案二)
*/
public static String ZXL_NFT_016_IDENTITY_BIND_QUERY_URL = "/api/v1/nft/identity/bind/query";
/**
* 地址与身份对应关系核验接(方案二)
*/
public static String ZXL_NFT_017_IDENTITY_VERIFY_IDENTITY_URL = "/api/v1/nft/identity/verify/_identity";
/**
* 请求人脸核身h5url(方案二)
*/
public static String ZXL_NFT_018_FACE_URL_URL = "/api/v1/nft/face/url";
/**
* 通过用户地址请求人脸核身h5url(方案二)
*/
public static String ZXL_NFT_019_FACE_URL_BY_ADDRESS_URL = "/api/v1/nft/face/url_by_address";
/**
* 人身核对结果查询接口(方案二)
*/
public static String ZXL_NFT_020_FACE_QUERY_URL = "/api/v1/nft/face/query";
/**
* 查询素材地址接口(方案一)
*/
public static String ZXL_NFT_021_UPLOAD_URL_URL = "/api/v1/nft/upload/url";
/**
* 生成素材上传临时密钥接口(方案一)
*/
public static String ZXL_NFT_022_UPLOAD_SECRET_URL = "/api/v1/nft/upload/secret";
//===================================================================
//以下为NFT服务接口
//===================================================================
/**
* 申请积分(方案一)
*/
public static String ZXL_NFT_023_POINT_APPLY_URL = "/api/v1/nft/point/apply";
/**
* 查询积分申请结果(方案一)
*/
public static String ZXL_NFT_024_POINT_APPLY_RESULT_URL = "/api/v1/nft/point/apply/result";
/**
* 平台积分转移(方案一)
*/
public static String ZXL_NFT_025_POINT_TRANSFER_URL = "/api/v1/nft/point/transfer";
/**
* 平台积分转移状态查询(方案一)
*/
public static String ZXL_NFT_026_POINT_TRANSFER_RESULT_URL = "/api/v1/nft/point/transfer/result";
/**
* 积分销毁(方案一)
*/
public static String ZXL_NFT_027_POINT_DESTROY_URL = "/api/v1/nft/point/destroy";
/**
* 查询积分销毁结果(方案一)
*/
public static String ZXL_NFT_028_POINT_DESTORY_RESULT_URL = "/api/v1/nft/point/destory/result";
/**
* 积分查询(方案一)
*/
public static String ZXL_NFT_029_POINT_QUERY_URL = "/api/v1/nft/point/query";
/**
* NFT 系列声明(方案一)
*/
public static String ZXL_NFT_030_SERIES_CLAIM_URL = "/api/v1/nft/series/claim";
/**
* 查询NFT系列声明结果(方案一)
*/
public static String ZXL_NFT_031_SERIES_CLAIM_RESULT_URL = "/api/v1/nft/series/claim/result";
/**
* 查询系列信息(方案二)
*/
public static String ZXL_NFT_032_SERIES_URL = "/api/v1/nft/series";
/**
* 查询该账户资产归属的系列列表(方案一)
*/
public static String ZXL_NFT_033_SERIES_LIST_URL = "/api/v1/nft/series/list";
/**
* 发行 NFT(方案一)
*/
public static String ZXL_NFT_034_PUBLISH_URL = "/api/v1/nft/publish";
/**
* 查询 NFT发行结果(方案一)
*/
public static String ZXL_NFT_035_PUBLISH_RESULT_URL = "/api/v1/nft/publish/result";
/**
* NFT元信息查询(方案二)
*/
public static String ZXL_NFT_036_INFO_URL = "/api/v1/nft/info";
/**
* 查询账户NFT列表(方案二)
*/
public static String ZXL_NFT_037_ADDRESS_LIST_URL = "/api/v1/nft/address/list";
/**
* 查询无系列NFT列表(方案二)
*/
public static String ZXL_NFT_038_ADDRESS_WITHOUT_SERIES_LIST_URL = "/api/v1/nft/address/without/series/list";
/**
* 查询NFT交易信息列表(方案二)
*/
public static String ZXL_NFT_039_TRADE_LIST_URL = "/api/v1/nft/trade/list";
/**
* 查询转入NFT交易信息列表(方案二)
*/
public static String ZXL_NFT_040_TRADE_IN_LIST_URL = "/api/v1/nft/trade/in/list";
/**
* 查询转出NFT交易信息列表(方案二)
*/
public static String ZXL_NFT_041_TRADE_OUT_LIST_URL = "/api/v1/nft/trade/out/list";
/**
* 通过地址查询全部NFT交易信息列表(方案二)
*/
public static String ZXL_NFT_042_TRADE_ALL_LIST_URL = "/api/v1/nft/trade/all/list";
/**
* NFT 购买(方案一)
*/
public static String ZXL_NFT_043_BUY_URL = "/api/v1/nft/buy";
/**
* 查询 NFT 购买结果(方案一)
*/
public static String ZXL_NFT_044_BUY_RESULT_URL = "/api/v1/nft/buy/result";
/**
* 查询nft购买支付结果(方案一)
*/
public static String ZXL_NFT_045_BUY_PAY_RESULT_URL = "/api/v1/nft/buy/pay/result";
/**
* NFT 转移(方案二)
*/
public static String ZXL_NFT_046_TRANSFER_URL = "/api/v1/nft/transfer";
/**
* NFT 同名转移(方案一)
*/
public static String ZXL_NFT_047_SELF_TRANSFER_URL = "/api/v1/nft/self_transfer";
/**
* NFT 批量转移(方案二)
*/
public static String ZXL_NFT_048_BATCH_TRANSFER_URL = "/api/v1/nft/batch_transfer";
/**
* NFT转移状态查询(方案二)
*/
public static String ZXL_NFT_049_TRANSFER_RESULT_URL = "/api/v1/nft/transfer/result";
/**
* NFT销售状态变更(方案一)
*/
public static String ZXL_NFT_050_STATUS_UPDATE_URL = "/api/v1/nft/status/update";
/**
* NFT销售状态变更查询(方案一)
*/
public static String ZXL_NFT_051_STATUS_UPDATE_RESULT_URL = "/api/v1/nft/status/update/result";
/**
* NFT售价变更(方案一)
*/
public static String ZXL_NFT_052_PRICE_UPDATE_URL = "/api/v1/nft/price/update";
/**
* NFT 售价变更状态查询(方案一)
*/
public static String ZXL_NFT_053_PRICE_UPDATE_RESULT_URL = "/api/v1/nft/price/update/result";
/**
* 检查地址是否属于同一个用户主体(方案一)
*/
public static String ZXL_NFT_054_PRICE_UPDATE_RESULT_URL = "/api/v1/nft/query/user/address/belong_to_user";
}
package com.liquidnet.common.third.antchain.constant;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: ZxlnftEnum
* @Package com.liquidnet.common.third.antchain.constant
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/22 10:42
*/
public class AntchainEnum {
/**
* txType 交易类别, 1:发行 2:购买 3:转移 4:设置价格 5:设置状态
*/
/**
* 图片检测结果建议
*/
public enum SuggestionEnum{
BLOCK("Block","建议屏蔽"),
REVIEW("Review","建议复审"),
PASS("Pass","建议通过");
private String code;
private String message;
SuggestionEnum(String code, String message) {
this.code = code;
this.message = message;
}
public SuggestionEnum getEnumByCode(String code){
SuggestionEnum[] arry = SuggestionEnum.values();
for (int i = 0; i < arry.length; i++) {
if (arry[i].getCode().equals(code)) {
return arry[i];
}
}
return null;
}
public String getCode() {
return code;
}
}
/**
* 下发用户信息查询验证码(使用场景)
*/
public enum UseSceneEnum{
QUERY("1","查询用户信息"),
BINDING("2","nft平台绑定地址"); //该类型只用于nft平台自身地址绑定
private String code;
private String message;
UseSceneEnum(String code, String message) {
this.code = code;
this.message = message;
}
public UseSceneEnum getEnumByCode(String code){
UseSceneEnum[] arry = UseSceneEnum.values();
for (int i = 0; i < arry.length; i++) {
if (arry[i].getCode().equals(code)) {
return arry[i];
}
}
return null;
}
public String getCode() {
return code;
}
}
/**
* 注册类型
*/
public enum RegisterTypeEnum{
PERSON("1","企业"),
COMPANY("2","个人");
private String code;
private String message;
RegisterTypeEnum(String code, String message) {
this.code = code;
this.message = message;
}
public RegisterTypeEnum getEnumByCode(String code){
RegisterTypeEnum[] arry = RegisterTypeEnum.values();
for (int i = 0; i < arry.length; i++) {
if (arry[i].getCode().equals(code)) {
return arry[i];
}
}
return null;
}
public String getCode() {
return code;
}
}
/**
* 支付状态
*/
public enum SellStatusEnum{
CAN_SELL("1","可售"),
CAN_NOT_SELL("2","不可售");
private String code;
private String message;
SellStatusEnum(String code, String message) {
this.code = code;
this.message = message;
}
public SellStatusEnum getEnumByCode(String code){
SellStatusEnum[] arry = SellStatusEnum.values();
for (int i = 0; i < arry.length; i++) {
if (arry[i].getCode().equals(code)) {
return arry[i];
}
}
return null;
}
public String getCode() {
return code;
}
}
public enum CardTypeEnum{
// 1-身份证 2-护照 3-港澳通行证 4-台湾通行证 5-外国人永居身份证 6-港澳台居民居住证 7-其它
ID_CARD("1","身份证"),
ID_CARD_PP("2","护照"),
ID_CARD_HM("3","港澳通行证"),
ID_CARD_TW("4","台湾通行证"),
ID_CARD_FOR("5","外国人永居身份证"),
ID_CARD_HMTW("6","港澳台居民居住证"),
ID_CARD_OTHER("7","其它");
private String code;
private String message;
CardTypeEnum(String code, String message) {
this.code = code;
this.message = message;
}
public CardTypeEnum getEnumByCode(String code){
CardTypeEnum[] arry = CardTypeEnum.values();
for (int i = 0; i < arry.length; i++) {
if (arry[i].getCode().equals(code)) {
return arry[i];
}
}
return null;
}
public String getCode() {
return code;
}
}
/**
* 标记任务状态
*/
public enum TaskStatusEnum{
PROCESSING("2","任务执行中"),
TASK_SUCCESS("7","任务成功"),
TASK_FAIL("10","任务失败");
private String code;
private String message;
TaskStatusEnum(String code, String message) {
this.code = code;
this.message = message;
}
public TaskStatusEnum getEnumByCode(String code){
TaskStatusEnum[] arry = TaskStatusEnum.values();
for (int i = 0; i < arry.length; i++) {
if (arry[i].getCode().equals(code)) {
return arry[i];
}
}
return null;
}
public String getCode() {
return code;
}
public String getMessage(){
return message;
}
}
/**
* 标记任务状态
*/
public enum UserBindStatusEnum{
BIND_PROCESSING("1","绑定中"),
BIND_SUCCESS("2","已绑定"),
BIND_FAIL("3","绑定失败"),
BIND_CANNOT_QUERY("4","未发起过绑定(未查询到)");
private String code;
private String message;
UserBindStatusEnum(String code, String message) {
this.code = code;
this.message = message;
}
public UserBindStatusEnum getEnumByCode(String code){
UserBindStatusEnum[] arry = UserBindStatusEnum.values();
for (int i = 0; i < arry.length; i++) {
if (arry[i].getCode().equals(code)) {
return arry[i];
}
}
return null;
}
public String getCode() {
return code;
}
public String getMessage(){
return message;
}
}
}
package com.liquidnet.common.third.antchain.constant;
import java.util.Arrays;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: ErrorEnum
* @Package com.liquidnet.common.third.antchain.constant
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/2/21 14:00
*
* * SYS001[0001~9999] : 系统占用 SYS0010001
* * ZXL001[0001~9999] : 至信链NFT业务
* 说明 ZXL001为NFT业务 ZXL002为存证业务
*/
public enum AntchainErrorEnum {
SECCESS("0","成功"),
FAILURE("1","失败"),
SYSTEM_ERROR("SYS0010001", "系统异常,请联系管理员"),
SERVER_INNER_ERROR("SYS0010002", "系统内部错误"),
SERVER_ERROR("SYS0010003", "服务不可用,调用后端服务失败"),
INVALID_PARAM_ERROR("ZXL0010001", "参数错误"),
GENERATE_KEYPAIR_ERROR("ZXL0010002", "生成公私钥错误"),
SIGN_ERROR("ZXL0010003", "签名错误"),
VERIFY_ERROR("ZXL0010004", "验签错误"),
ENCRYPT_ERROR("ZXL0010005", "加密数据错误"),
DECODE_ERROR("ZXL0010006", "解密数据错误"),
IMAGE_CHECK_ERROR("ZXL0010007", "图片内容检测未通过"),
PARAM_FORMAT_ERROR("ZXL0010008", "参数格式错误"),
ORDER_NOT_FOUND_ERROR("ZXL0010009", "此编号未查到对应信息"),
UPLOAD_TEMP_SECRET("ZXL0010010", "生成素材上传临时密钥失败");
private String code;
private String msg;
AntchainErrorEnum(String code, String msg) {
this.code = code;
this.msg = msg;
}
public String getCode() { return this.code; }
public String getMsg() { return this.msg; }
public static String errorMsg(String content) {
AntchainErrorEnum err = Arrays.<AntchainErrorEnum>asList(values()).stream().filter(errorEnum -> errorEnum.getCode().equals(content)).findFirst().orElse(SERVER_INNER_ERROR);
return err.getMsg();
}
}
\ No newline at end of file
package com.liquidnet.common.third.antchain.exception;
import lombok.Data;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: AntchainException
* @Package com.liquidnet.common.third.antchain.exception
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/22 10:42
*/
@Data
public class AntchainException extends RuntimeException{
private static final long serialVersionUID = -3916918823313768482L;
private String code;
private String msg;
public AntchainException(String code, String msg) {
super(msg);
this.code = code;
this.msg = msg;
}
public AntchainException(String code, String msg, Throwable t) {
super(msg, t);
this.code = code;
this.msg = msg;
}
}
package com.liquidnet.common.third.zxlnft.test;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: TestJavaBeanToMap
* @Package com.liquidnet.common.third.zxlnft.test
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/2/24 18:40
*/
/**
*
*/
public class TestJavaBeanToMap {
public static void main(String[] args) {
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>liquidnet-common-third</artifactId>
<groupId>com.liquidnet</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>liquidnet-common-third-zxlnft</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-common-base</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-common-cache-redis</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>jakarta.validation</groupId>-->
<!-- <artifactId>jakarta.validation-api</artifactId>-->
<!-- </dependency>-->
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>4.1.59.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-bom</artifactId>
<version>2020.0.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
\ No newline at end of file
package com.liquidnet.common.third.zxlnft.config;
import com.liquidnet.commons.lang.util.BASE64Util;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import java.io.UnsupportedEncodingException;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: EasemobConfig
* @Package com.liquidnet.common.third.easemob.config
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/9/7 10:42
*/
@Configuration
public class ZxlnftConfig {
@Value("${liquidnet.zxlnft.appId:220214000100001}")
private String appId;
@Value("${liquidnet.zxlnft.appKey:82b561110c4b4f4d91ad2a2b0d5b7908}")
private String appKey;
@Value("${liquidnet.zxlnft.nftPlatformAddress:ZXa66c8a684727d0f9aaa434044362aa8a18b61bb4}")
private String nftPlatformAddress;
@Value("${liquidnet.zxlnft.nftPlatformPubKey:LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZrd0V3WUhLb1pJemowQ0FRWUlLb0VjejFVQmdpMERRZ0FFbFNTQk00MHJIZlJFa0NjWUxlRm1RZzE0SHlIcAp5Rk9uSktzblFqbDBCL2JXOStFWnZPblArNW0vMEdkUCtXM29yeG5Kd3p5OHNoYS9OYkQ4QVBmNXlBPT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg==}")
private String nftPlatformPubKey;
@Value("${liquidnet.zxlnft.nftPlatformPriKey:LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JR1RBZ0VBTUJNR0J5cUdTTTQ5QWdFR0NDcUJITTlWQVlJdEJIa3dkd0lCQVFRZ1VhbTVWM2V6ZFZJTmNoZ28KVDRKL28zMHArMGJCd3hQWUZFL01FdEU3MTZhZ0NnWUlLb0VjejFVQmdpMmhSQU5DQUFTVkpJRXpqU3NkOUVTUQpKeGd0NFdaQ0RYZ2ZJZW5JVTZja3F5ZENPWFFIOXRiMzRSbTg2Yy83bWIvUVowLzViZWl2R2NuRFBMeXlGcjgxCnNQd0E5L25JCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K}")
private String nftPlatformPriKey;
@Value("${liquidnet.zxlnft.walletSdkUrl:http://127.0.0.1:30505}")
private String walletSdkUrl;
@Value("${liquidnet.zxlnft.nftApiUrl:https://nfttest2.zxinchain.com}")
private String nftApiUrl;
@Value("${liquidnet.zxlnft.platformIdentification:4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef}")
private String platformIdentification;
public String getAppId(){
return appId;
}
public String getAppKey() {
return appKey;
}
public String getNftPlatformAddress() {
return nftPlatformAddress;
}
public String getPlatformIdentification() {
return platformIdentification;
}
// public String getNftPlatformPubKey(){
// return nftPlatformPubKey;
// }
//
// public String getNftPlatformPriKey(){
// return nftPlatformPriKey;
// }
public String getNftPlatformPubKey(){
String pubKey = null;
try {
pubKey = BASE64Util.decode(nftPlatformPubKey);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return pubKey;
}
public String getNftPlatformPriKey(){
String priKey = null;
try {
priKey = BASE64Util.decode(nftPlatformPriKey);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return priKey;
}
public String getWalletSdkUrl(){
return walletSdkUrl;
}
public String getNftApiUrl(){
return nftApiUrl;
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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