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

Commit 6cfcfdd8 authored by GaoHu's avatar GaoHu

Merge branch 'master' into gaohu_0826_smileExit

parents 4a4b4357 2aa46f40
package com.liquidnet.service.adam.dto.vo;
import com.liquidnet.commons.lang.util.DESUtils;
import com.liquidnet.commons.lang.util.SensitizeUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "AdamUserIdentityVo", description = "用户身份信息")
@Data
public class AdamUserIdentityInfoVo implements Serializable, Cloneable {
private static final long serialVersionUID = -5828611827493373384L;
@ApiModelProperty(position = 10, value = "用户ID[30]")
private String uid;
@ApiModelProperty(position = 11, value = "脱敏姓名[30]")
private String name;
@ApiModelProperty(position = 12, value = "脱敏手机号[11]")
private String mobile;
@ApiModelProperty(position = 15, value = "数据包")
private String packet;
private static final AdamUserIdentityInfoVo obj = new AdamUserIdentityInfoVo();
public static AdamUserIdentityInfoVo getNew() {
return obj.clone();
}
@Override
public AdamUserIdentityInfoVo clone() {
try {
return (AdamUserIdentityInfoVo) super.clone();
} catch (CloneNotSupportedException e) {
return new AdamUserIdentityInfoVo();
}
}
/**
* 脱敏处理
*
* @return AdamUserIdentityVo
*/
public AdamUserIdentityInfoVo desensitize() {
try {
this.packet = DESUtils.DES().encrypt(uid.concat(",").concat(name).concat(",").concat(mobile));
} catch (Exception e) {
this.packet = "Nil";
}
this.setName(SensitizeUtil.custom(this.getName(), 0, 1));
this.setMobile(SensitizeUtil.custom(this.getMobile(), 3, 4));
return this;
}
}
...@@ -19,6 +19,7 @@ public class GalaxyConstant { ...@@ -19,6 +19,7 @@ public class GalaxyConstant {
public static final String REDIS_KEY_GALAXY_SERIES_NFT="galaxy:series:nft:"; 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_TRADE_ORDER="galaxy:trade:order:";
public static final String REDIS_KEY_GALAXY_PUBLISH_ORDER="galaxy:publish:order:";//订单与索引绑定信息 public static final String REDIS_KEY_GALAXY_PUBLISH_ORDER="galaxy:publish:order:";//订单与索引绑定信息
public static final String REDIS_KEY_GALAXY_TRANSFER_ORDER= "galaxy:transfer:order:";//
//以下禁止删除 //以下禁止删除
public static final String REDIS_KEY_GALAXY_PUBLISH_NFT="galaxy:publish:nft:"; //nft索引递增记录 public static final String REDIS_KEY_GALAXY_PUBLISH_NFT="galaxy:publish:nft:"; //nft索引递增记录
......
...@@ -336,4 +336,41 @@ public class GalaxyEnum { ...@@ -336,4 +336,41 @@ public class GalaxyEnum {
System.out.println("支付成功"); System.out.println("支付成功");
} }
} }
/**
* nft转让状态
*/
public enum NftTransferStatusEnum{
INIT("-1","数据初始化"),
PROCESSING("0","转让中"),
SUCCESS("1","转让成功"),
FAIL("2","转让失败");
private String code;
private String message;
NftTransferStatusEnum(String code, String message) {
this.code = code;
this.message = message;
}
public NftTransferStatusEnum getEnumByCode(String code){
NftTransferStatusEnum[] arry = NftTransferStatusEnum.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;
}
}
} }
...@@ -34,7 +34,15 @@ public enum GalaxyErrorEnum { ...@@ -34,7 +34,15 @@ public enum GalaxyErrorEnum {
NFT_QUERY_FAIL_SERIES_NOT_EXIST("NFT0010022","系列信息查询不存在!"), NFT_QUERY_FAIL_SERIES_NOT_EXIST("NFT0010022","系列信息查询不存在!"),
NFT_USER_HAS_OPEN_ACCOUNT("NFT0010023","用户已经开通过数字账户!"), NFT_USER_HAS_OPEN_ACCOUNT("NFT0010023","用户已经开通过数字账户!"),
SERIES_NFT_INFO_NOT_EXIST("NFT0010024","系列NFT信息查询不存在!"), SERIES_NFT_INFO_NOT_EXIST("NFT0010024","系列NFT信息查询不存在!"),
SERIES_NFT_HASH_CREATE_FAIL("NFT0010025","系列NFT的介质hash生成失败!"); SERIES_NFT_HASH_CREATE_FAIL("NFT0010025","系列NFT的介质hash生成失败!"),
NFT_TRANSFER_FAIL("NFT0010026","NFT转让失败!"),
NFT_TRANSFER_FAIL_OWNER_NOT_EXIST("NFT0010027","NFT转让失败,拥有者不存在!"),
NFT_TRANSFER_FAIL_RECEIVER_NOT_EXIST("NFT0010028","NFT转让失败,接收者不存在!"),
NFT_TRANSFER_OWNER_MATCH_ERROR("NFT0010029","NFT转让失败,拥有者不匹配"),
NFT_TRANSFERING_ERROR("NFT0010030","NFT正在转让中,不允许再次操作!"),
NFT_TRANSFER_NFTID_FORMAT_ERROR("NFT0010031","NFT转让失败,nftid格式错误!"),
NFT_TRANSFER_QUERY_ERROR("NFT0010032","NFT转让结果查询失败,nft信息不存在!"),
NFT_TRANSFER_ERROR("NFT0010033","NFT转让异常,允许再次发起!");
private String code; private String code;
......
package com.liquidnet.service.galaxy.dto; package com.liquidnet.service.galaxy.dto;
import com.liquidnet.service.galaxy.dto.param.GalaxyQueryUserTradeAllListRespDto;
import lombok.Data; import lombok.Data;
/** /**
...@@ -61,4 +62,14 @@ public class TradeInfoDto { ...@@ -61,4 +62,14 @@ public class TradeInfoDto {
* 交易类别, 1:发行 2:购买 3:转移 4:设置价格 5:设置状态 * 交易类别, 1:发行 2:购买 3:转移 4:设置价格 5:设置状态
*/ */
private Integer txType; private Integer txType;
private static final TradeInfoDto obj = new TradeInfoDto();
public static TradeInfoDto getNew() {
try {
return (TradeInfoDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new TradeInfoDto();
}
}
} }
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: nft转让最新记录
* @class: GalaxyTransferNftInfoBo
* @Package com.liquidnet.service.galaxy.dto.bo
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/8/12 13:36
*/
@Data
public class GalaxyTransferNftInfoBo implements Serializable,Cloneable{
/**
* 转让流水号(平台转让订单id)
*/
private String transOrderId;
/**
* nft唯一资产碎片id
*/
private String nftId;
/**
* 转让发起人用户id
*/
private String userId;
/**
* 转让发起人区块链地址
*/
private String address;
/**
* 接收者userId
*/
private String receiveUserId;
/**
* 接收者区块链地址
*/
private String receiveAddress;
/**
* nft当前拥有者用户id(转让成功后更新)
*/
private String ownerUserId;
/**
* nft当前拥有者addr(转让成功后更新)
*/
private String ownerAddress;
/**
* 转让hash
*/
private String transferHash;
/**
* 系列的唯一Id
*/
private String seriesId;
/**
* 路由类型
*/
private String routerType;
/**
* 转让状态(0转让中 1转让成功 2转让失败 )
*/
private String transferStatus;
/**
* 错误码
*/
private String errorCode;
/**
* 错误信息
*/
private String errorMsg;
/**
* 创建时间
*/
private String createdAt;
/**
* 修改时间
*/
private String updatedAt;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyTransferNftInfoBo obj = new GalaxyTransferNftInfoBo();
public static GalaxyTransferNftInfoBo getNew() {
try {
return (GalaxyTransferNftInfoBo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyTransferNftInfoBo();
}
}
}
...@@ -20,9 +20,9 @@ import java.io.Serializable; ...@@ -20,9 +20,9 @@ import java.io.Serializable;
@Data @Data
public class GalaxyBaseReqDto implements Serializable,Cloneable{ public class GalaxyBaseReqDto implements Serializable,Cloneable{
/** /**
* 路由类型(至信链zxinchain、以太坊eth) * 路由类型(至信链zxinchain、百度链xuper)
*/ */
@ApiModelProperty(position = 1, required = true, value = "路由类型(至信链zxinchain、以太坊eth)") @ApiModelProperty(position = 1, required = true, value = "路由类型(至信链zxinchain、百度链xuper)")
@NotBlank(message = "路由类型不能为空!") @NotBlank(message = "路由类型不能为空!")
private String routerType = GalaxyEnum.RouterTypeEnum.ZXINCHAIN.getCode(); private String routerType = GalaxyEnum.RouterTypeEnum.ZXINCHAIN.getCode();
......
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转让结果查询
* @class: GalaxyNftTransferReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/8/15 14:42
*/
@ApiModel(value = "GalaxyNftTransferQueryReqDto", description = "NFT转让结果查询")
@Data
public class GalaxyNftTransferQueryReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
/**
* nft转让流水号
*/
@ApiModelProperty(position = 1, required = true, value = "nft转让流水号(保证唯一),不超过30个字符")
@NotBlank(message = "nft转让流水号(平台订单id)不能为空")
@Size(min = 2, max = 30, message = "nft转让流水号(平台订单id)限制2-30位且不能包含特殊字符")
private String transOrderId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftTransferQueryReqDto obj = new GalaxyNftTransferQueryReqDto();
public static GalaxyNftTransferQueryReqDto getNew() {
try {
return (GalaxyNftTransferQueryReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftTransferQueryReqDto();
}
}
}
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: NFT转让结果查询
* @class: GalaxyNftTransferQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param;
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/8/4 18:51
*/
@ApiModel(value = "GalaxyNftTransferQueryRespDto", description = "NFT转让结果查询")
@Data
public class GalaxyNftTransferQueryRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "nft唯一id")
private String nftId;
@ApiModelProperty(position = 1, required = true, value = "拥有者用户ID")
private String ownerUserId;
@ApiModelProperty(position = 1, required = true, value = "拥有者地址")
private String ownerAddress;
@ApiModelProperty(position = 1, required = true, value = "转出者用户ID")
private String fromUserId;
@ApiModelProperty(position = 1, required = true, value = "转出者地址")
private String fromAddress;
@ApiModelProperty(position = 1, required = true, value = "转让时间")
private String transferTime;
@ApiModelProperty(position = 3, required = true, value = "路由类型")
private String routerType;
@ApiModelProperty(position = 4, required = true, value = "转让hash")
private String transferHash;
@ApiModelProperty(position = 5, required = true, value = "转让状态(-1初始化 0转让中 1转让成功 2转让失败 )")
private String transferStatus;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftTransferQueryRespDto obj = new GalaxyNftTransferQueryRespDto();
public static GalaxyNftTransferQueryRespDto getNew() {
try {
return (GalaxyNftTransferQueryRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftTransferQueryRespDto();
}
}
}
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转让
* @class: GalaxyNftTransferReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/8/12 18:42
*/
@ApiModel(value = "GalaxyNftTransferReqDto", description = "NFT转让")
@Data
public class GalaxyNftTransferReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable {
/**
* nft转让流水号
*/
@ApiModelProperty(position = 1, required = true, value = "nft转让流水号(保证唯一),不超过30个字符")
@NotBlank(message = "nft转让流水号(平台订单id)不能为空")
@Size(min = 2, max = 30, message = "nft转让流水号(平台订单id)限制2-30位且不能包含特殊字符")
private String transOrderId;
/**
* 用户id
*/
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
@NotBlank(message = "用户ID不能为空!")
@Size(min = 1, max = 30, message = "用户ID限制2-30位且不能包含特殊字符")
private String userId;
/**
* 接收用户id
*/
@ApiModelProperty(position = 1, required = true, value = "接收用户ID[30]")
@NotBlank(message = "接收用户ID不能为空!")
@Size(min = 1, max = 30, message = "用户ID限制2-30位且不能包含特殊字符")
private String receiveUserId;
/**
* nftId
*/
@ApiModelProperty(position = 1, required = true, value = "nft唯一id")
@NotBlank(message = "nft唯一id不能为空!")
private String nftId;
/**
* reqTimestamp
*/
@ApiModelProperty(position = 3, required = true, value = "请求时间戳(格式为:2022-04-07 12:12:12)")
@NotBlank(message = "请求时间戳不能为空!")
private String reqTimestamp;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftTransferReqDto obj = new GalaxyNftTransferReqDto();
public static GalaxyNftTransferReqDto getNew() {
try {
return (GalaxyNftTransferReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftTransferReqDto();
}
}
}
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: NFT转让返回
* @class: GalaxyNftTransferRespDto
* @Package com.liquidnet.service.galaxy.dto.param;
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/8/12 18:51
*/
@ApiModel(value = "GalaxyNftTransferRespDto", description = "NFT转让结果")
@Data
public class GalaxyNftTransferRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "nft唯一id")
private String nftId;
@ApiModelProperty(position = 1, required = true, value = "拥有者用户ID")
private String ownerUserId;
@ApiModelProperty(position = 1, required = true, value = "拥有者地址")
private String ownerAddress;
@ApiModelProperty(position = 1, required = true, value = "转出者用户ID")
private String fromUserId;
@ApiModelProperty(position = 1, required = true, value = "转出者地址")
private String fromAddress;
@ApiModelProperty(position = 1, required = true, value = "转让时间")
private String transferTime;
@ApiModelProperty(position = 3, required = true, value = "路由类型")
private String routerType;
@ApiModelProperty(position = 4, required = true, value = "转让hash")
private String transferHash;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyNftTransferRespDto obj = new GalaxyNftTransferRespDto();
public static GalaxyNftTransferRespDto getNew() {
try {
return (GalaxyNftTransferRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyNftTransferRespDto();
}
}
}
...@@ -20,9 +20,9 @@ import java.io.Serializable; ...@@ -20,9 +20,9 @@ import java.io.Serializable;
@ApiModel(value = "GalaxyQueryNftTradeListReqDto", description = "单个NFT交易信息查询") @ApiModel(value = "GalaxyQueryNftTradeListReqDto", description = "单个NFT交易信息查询")
@Data @Data
public class GalaxyQueryNftTradeListReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable{ public class GalaxyQueryNftTradeListReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable{
@ApiModelProperty(position = 1, required = true, value = "NFT购买订单ID") @ApiModelProperty(position = 1, required = true, value = "NFTId")
@NotBlank @NotBlank
private String nftOrderPayId; private String nftId;
@Override @Override
public String toString(){ public String toString(){
......
...@@ -61,11 +61,28 @@ public class GalaxyQueryNftTradeListRespDto implements Serializable,Cloneable { ...@@ -61,11 +61,28 @@ public class GalaxyQueryNftTradeListRespDto implements Serializable,Cloneable {
*/ */
@ApiModelProperty(position = 1, required = true, value = "链上成交时间") @ApiModelProperty(position = 1, required = true, value = "链上成交时间")
private Long dealTimestamp; private Long dealTimestamp;
/**
* 链上成交时间
*/
@ApiModelProperty(position = 1, required = true, value = "链上成交时间(北京时间)")
private String dealTimestampStr;
/** /**
* 交易类别, 1:发行 2:购买 3:转移 4:设置价格 5:设置状态 * 交易类别, 1:发行 2:购买 3:转移 4:设置价格 5:设置状态
*/ */
@ApiModelProperty(position = 1, required = true, value = "交易类别, 1:发行 2:购买 3:转移 4:设置价格 5:设置状态") @ApiModelProperty(position = 1, required = true, value = "交易类别, 1:发行 2:购买 3:转移 4:设置价格 5:设置状态")
private Integer txType; private Integer txType;
private static final TransInfoDto obj = new TransInfoDto();
public static TransInfoDto getNew() {
try {
return (TransInfoDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new TransInfoDto();
}
}
} }
@Override @Override
......
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;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: nft转让信息查询
* @class: GalaxyQueryNftInfoReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/4/8 16:27
*/
@ApiModel(value = "GalaxyQueryTransNftInfoReqDto", description = "nft转让信息查询")
@Data
public class GalaxyQueryTransNftInfoReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable{
@ApiModelProperty(position = 1, required = true, value = "NFTId")
@NotBlank
private String nftId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyQueryTransNftInfoReqDto obj = new GalaxyQueryTransNftInfoReqDto();
public static GalaxyQueryTransNftInfoReqDto getNew() {
try {
return (GalaxyQueryTransNftInfoReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyQueryTransNftInfoReqDto();
}
}
}
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;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyQueryNftInfoRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/4/8 16:27
*/
@ApiModel(value = "GalaxyQueryTransNftInfoRespDto", description = "NFT信息查询")
@Data
public class GalaxyQueryTransNftInfoRespDto{
/**
* nftId
*/
@ApiModelProperty(position = 1, required = true, value = "nftId")
private String nftId;
/**
* 所有者地址
*/
@ApiModelProperty(position = 1, required = true, value = "所有者地址")
private String ownerAddr;
/**
* 发行地址
*/
@ApiModelProperty(position = 1, required = true, value = "发行地址")
private String publishAddr;
/**
* 作品名字,中英文数字均可,不超过256个字符
*/
@ApiModelProperty(position = 1, required = true, value = "作品名字")
private String name;
/**
* 作品简介,500个字符以内
*/
@ApiModelProperty(position = 1, required = true, value = "作品简介")
private String desc;
/**
* 作品url,不超过2048个字符 疑问:应该是发行的1024吧?
*/
@ApiModelProperty(position = 1, required = true, value = "作品url")
private String url;
/**
* 预览图url
*/
@ApiModelProperty(position = 1, required = true, value = "预览图url")
private String displayUrl;
/**
* 交易时间
*/
@ApiModelProperty(position = 1, required = true, value = "交易时间")
private String tradeTime;
/**
* 交易hash
*/
@ApiModelProperty(position = 1, required = true, value = "交易hash")
private String tradeHash;
/**
* 转让状态(-1初始化 0转让中 1转让成功 2转让失败 )
*/
@ApiModelProperty(position = 1, required = true, value = "-1初始化 0转让中 1转让成功 2转让失败")
private String tradeStatus;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyQueryTransNftInfoRespDto obj = new GalaxyQueryTransNftInfoRespDto();
public static GalaxyQueryTransNftInfoRespDto getNew() {
try {
return (GalaxyQueryTransNftInfoRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyQueryTransNftInfoRespDto();
}
}
}
\ No newline at end of file
...@@ -24,6 +24,9 @@ public class GalaxyQueryUserTradeAllListReqDto extends GalaxyBaseReqDto implemen ...@@ -24,6 +24,9 @@ public class GalaxyQueryUserTradeAllListReqDto extends GalaxyBaseReqDto implemen
@NotBlank(message = "区块链地址不能为空!") @NotBlank(message = "区块链地址不能为空!")
private String blockChainAddress; private String blockChainAddress;
@ApiModelProperty(position = 1, required = true, value = "seriesId(可选,默认为0查询全部)")
private String seriesId = "0";
@Override @Override
public String toString(){ public String toString(){
return JsonUtils.toJson(this); return JsonUtils.toJson(this);
......
...@@ -14,6 +14,7 @@ import com.liquidnet.service.galaxy.dto.param.*; ...@@ -14,6 +14,7 @@ import com.liquidnet.service.galaxy.dto.param.*;
*/ */
public interface IGalaxyTradeQueryService { public interface IGalaxyTradeQueryService {
ResponseDto<GalaxyQueryNftInfoRespDto> queryNftInfo(GalaxyQueryNftInfoReqDto reqDto); ResponseDto<GalaxyQueryNftInfoRespDto> queryNftInfo(GalaxyQueryNftInfoReqDto reqDto);
ResponseDto<GalaxyQueryTransNftInfoRespDto> queryTransNftInfo(GalaxyQueryTransNftInfoReqDto reqDto);
ResponseDto<GalaxyQueryNftTradeListRespDto> queryNftTradeList(GalaxyQueryNftTradeListReqDto reqDto); ResponseDto<GalaxyQueryNftTradeListRespDto> queryNftTradeList(GalaxyQueryNftTradeListReqDto reqDto);
ResponseDto<GalaxyQuerySeriesInfoRespDto> querySeriesInfo(GalaxyQuerySeriesInfoReqDto reqDto); ResponseDto<GalaxyQuerySeriesInfoRespDto> querySeriesInfo(GalaxyQuerySeriesInfoReqDto reqDto);
ResponseDto<GalaxyQueryUserSeriesNftListRespDto> queryUserSeriesNftList(GalaxyQueryUserSeriesNftListReqDto reqDto); ResponseDto<GalaxyQueryUserSeriesNftListRespDto> queryUserSeriesNftList(GalaxyQueryUserSeriesNftListReqDto reqDto);
......
...@@ -25,4 +25,8 @@ public interface IGalaxyTradeService { ...@@ -25,4 +25,8 @@ public interface IGalaxyTradeService {
ResponseDto<GalaxyNftPublishAndBuyResultQueryRespDto> nftPublishAndBuyResultQuery(GalaxyNftPublishAndBuyResultQueryReqDto reqDto); ResponseDto<GalaxyNftPublishAndBuyResultQueryRespDto> nftPublishAndBuyResultQuery(GalaxyNftPublishAndBuyResultQueryReqDto reqDto);
ResponseDto<GalaxyNftPublishAndBuyRouterBatchQueryRespDto> nftPublishAndBuyResultBatchQuery(GalaxyNftPublishAndBuyRouterBatchQueryReqDto reqDto); ResponseDto<GalaxyNftPublishAndBuyRouterBatchQueryRespDto> nftPublishAndBuyResultBatchQuery(GalaxyNftPublishAndBuyRouterBatchQueryReqDto reqDto);
ResponseDto<GalaxyNftTransferRespDto> nftTransfer(GalaxyNftTransferReqDto reqDto);
ResponseDto<GalaxyNftTransferQueryRespDto> nftTransferQuery(GalaxyNftTransferQueryReqDto reqDto);
} }
...@@ -3,6 +3,8 @@ package com.liquidnet.service.goblin.constant; ...@@ -3,6 +3,8 @@ package com.liquidnet.service.goblin.constant;
public class GoblinRedisConst { public class GoblinRedisConst {
public static final String PREFIX = "goblin:"; public static final String PREFIX = "goblin:";
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
public static final String VALID_SMS_CODE_MOBILE = PREFIX.concat("valid:sms:code:mobile:");
/* ----------------------------------------------------------------- */
/** /**
* IOS商品价格集 * IOS商品价格集
* {goblin:bsc:lib:ios_products, JsonNode} * {goblin:bsc:lib:ios_products, JsonNode}
...@@ -187,13 +189,13 @@ public class GoblinRedisConst { ...@@ -187,13 +189,13 @@ public class GoblinRedisConst {
/** /**
* 我的藏品ID列表(首页) * 我的藏品ID列表(首页)
* {goblin:u_d_art:${uid}, JsonUtils.toJson(List<String:artwork_id>)} * {goblin:u_d_art:${uid}, List<String:artwork_id>}
*/ */
public static final String USER_DIGITAL_ARTWORK_IDS = PREFIX.concat("u_d_art_ids:"); public static final String USER_DIGITAL_ARTWORK_IDS = PREFIX.concat("u_d_art_ids:");
/** /**
* 我的藏品信息 * 我的藏品信息
* {goblin:u_d_art:${artwork_id}, JsonUtils.toJson(com.liquidnet.service.goblin.dto.vo.GoblinDigitalArtworkVo)} * {goblin:u_d_art:${artwork_id}, com.liquidnet.service.goblin.dto.vo.GoblinUserDigitalArtworkVo}
*/ */
public static final String USER_DIGITAL_ARTWORK = PREFIX.concat("u_d_art:"); public static final String USER_DIGITAL_ARTWORK = PREFIX.concat("u_d_art:");
...@@ -351,4 +353,23 @@ public class GoblinRedisConst { ...@@ -351,4 +353,23 @@ public class GoblinRedisConst {
public static final String GOBLIN_NUM_LIST = PREFIX.concat("nft:num:");//$key+":"+$skuId 根据skuId获取序号list public static final String GOBLIN_NUM_LIST = PREFIX.concat("nft:num:");//$key+":"+$skuId 根据skuId获取序号list
public static final String GOBLIN_NUM_DETAILS = PREFIX.concat("nft:num:details:");//$key+$num+$skuId 根据num+skuId获取DTO public static final String GOBLIN_NUM_DETAILS = PREFIX.concat("nft:num:details:");//$key+$num+$skuId 根据num+skuId获取DTO
/* ----------------------------------------------------------------- */
/**
* NFT用户安全配置
* {goblin:u_safe_c:${uid}, com.liquidnet.service.goblin.dto.GoblinUserSafeConfigDto}
*/
public static final String USER_SAFE_CONFIG = PREFIX.concat("u_safe_c:");
/**
* NFT转赠约束配置
* {goblin:nft_trans_conf, "${timeLimit},${routeType:1},${routeType:2}..."}
*/
public static final String NFT_TRANSFER_CONF = PREFIX.concat("nft_trans_conf");
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
} }
...@@ -220,7 +220,14 @@ public class GoblinStatusConst { ...@@ -220,7 +220,14 @@ public class GoblinStatusConst {
} }
} }
/**
* 数字藏品:转赠状态[PENDING|SUCCESS]
*/
public enum TransferState {
PENDING,
SUCCESS,
;
}
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
} }
package com.liquidnet.service.goblin.dto;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
/**
* 购买藏品、开启盲盒后,生成藏品队列消息体
*
* @author zhanggb
* Created by IntelliJ IDEA at 2022/3/31
*/
@Data
public class GoblinQueueBizArtworkGenDto implements Serializable, Cloneable {
private static final long serialVersionUID = 8267639695935038399L;
private String uid;
private String skuId;
private String orderId;
private Integer source;
private String fromArtId;
private static final GoblinQueueBizArtworkGenDto obj = new GoblinQueueBizArtworkGenDto();
public static GoblinQueueBizArtworkGenDto getNew() {
try {
return (GoblinQueueBizArtworkGenDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinQueueBizArtworkGenDto();
}
}
public String toJson() {
return JsonUtils.toJson(this);
}
}
package com.liquidnet.service.goblin.dto;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.util.DigestUtils;
import java.io.Serializable;
import java.nio.charset.StandardCharsets;
@ApiModel(value = "GoblinUserSafeConfigDto", description = "NFT:用户安全配置")
@Data
@JsonIgnoreProperties(value = {"uid"}, ignoreUnknown = true)
public class GoblinUserSafeConfigDto implements Serializable, Cloneable {
private static final long serialVersionUID = -141364364882594556L;
@ApiModelProperty(position = 11, value = "安全密码")
private String passwd;
private static final GoblinUserSafeConfigDto obj = new GoblinUserSafeConfigDto();
public static GoblinUserSafeConfigDto getNew() {
return obj.clone();
}
@Override
public GoblinUserSafeConfigDto clone() {
try {
return (GoblinUserSafeConfigDto) super.clone();
} catch (CloneNotSupportedException e) {
return new GoblinUserSafeConfigDto();
}
}
public boolean validPasswd(String saltPasswd) {
return this.passwd.equals(DigestUtils.md5DigestAsHex(saltPasswd.getBytes(StandardCharsets.UTF_8)));
}
}
...@@ -111,7 +111,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -111,7 +111,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private LocalDateTime openingTime; private LocalDateTime openingTime;
@ApiModelProperty(position = 33, value = "盲盒开启时限[单位秒]") @ApiModelProperty(position = 33, value = "盲盒开启时限[单位秒]")
private Integer openingLimit; private Integer openingLimit;
@ApiModelProperty(position = 33, value = "NFT路由") @ApiModelProperty(position = 33, value = "NFT路由[zxinchain-至信链|xuper-百度超级链]")
private String routeType; private String routeType;
@ApiModelProperty(position = 33, value = "NFT上传声明状态[0-待上传|1-已声明|2-声明失败|9-声明中]") @ApiModelProperty(position = 33, value = "NFT上传声明状态[0-待上传|1-已声明|2-声明失败|9-声明中]")
private Integer upchain; private Integer upchain;
......
...@@ -113,6 +113,13 @@ public class GoblinNftGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -113,6 +113,13 @@ public class GoblinNftGoodsSkuInfoVo implements Serializable, Cloneable {
@ApiModelProperty(position = 72, value = "下个分段购开始时间,如果为null则没有") @ApiModelProperty(position = 72, value = "下个分段购开始时间,如果为null则没有")
private LocalDateTime nextSaleStartTime; private LocalDateTime nextSaleStartTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 73, value = "第一个分批购开始时间")
private LocalDateTime firstSaleStartTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 74, value = "第一个分批购结束时间")
private LocalDateTime firstSaleEndTime;
private static final GoblinNftGoodsSkuInfoVo obj = new GoblinNftGoodsSkuInfoVo(); private static final GoblinNftGoodsSkuInfoVo obj = new GoblinNftGoodsSkuInfoVo();
public static GoblinNftGoodsSkuInfoVo getNew() { public static GoblinNftGoodsSkuInfoVo getNew() {
......
package com.liquidnet.service.goblin.dto.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.liquidnet.commons.lang.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang.StringUtils;
import java.io.Serializable;
import java.time.LocalDateTime;
@ApiModel(value = "GoblinNftOrderArtworkInfoVo", description = "NFT订单中藏品信息")
@Data
public class GoblinNftOrderArtworkInfoVo implements Serializable, Cloneable {
private static final long serialVersionUID = 5307265664272864863L;
@ApiModelProperty(position = 10, value = "商品单品ID")
private String artworkId;
@ApiModelProperty(position = 11, value = "是否盲盒[0-否|1-是]")
private String unbox;
@ApiModelProperty(position = 12, value = "藏品状态,根据`unbox`区分盲盒来判断[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败|5-待收取]")
private Integer state;
@ApiModelProperty(position = 13, value = "转赠状态[PENDING|SUCCESS],为空代表未发生转赠")
private String transferState;
@ApiModelProperty(position = 14, value = "受赠人信息")
private String receiverUser;
@ApiModelProperty(position = 15, value = "藏品转赠时间[yyyy-MM-dd HH:mm:ss]")
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR)
private LocalDateTime transferTime;
private static final GoblinNftOrderArtworkInfoVo obj = new GoblinNftOrderArtworkInfoVo();
public static GoblinNftOrderArtworkInfoVo getNew() {
return obj.clone();
}
@Override
public GoblinNftOrderArtworkInfoVo clone() {
try {
return (GoblinNftOrderArtworkInfoVo) super.clone();
} catch (CloneNotSupportedException e) {
return new GoblinNftOrderArtworkInfoVo();
}
}
public GoblinNftOrderArtworkInfoVo copy(GoblinUserDigitalArtworkVo source) {
if (null == source) return this;
this.setArtworkId(source.getArtworkId());
this.setState(source.getState());
this.setTransferState(source.getTransferState());
if (StringUtils.isNotEmpty(source.getTransferState())) {
this.setReceiverUser(source.getReceiverUser());
this.setTransferTime(source.getUpdatedAt());
}
return this;
}
}
...@@ -68,6 +68,9 @@ public class GoblinNftOrderDetailsVo implements Serializable, Cloneable { ...@@ -68,6 +68,9 @@ public class GoblinNftOrderDetailsVo implements Serializable, Cloneable {
@ApiModelProperty(value = " 混合售名称") @ApiModelProperty(value = " 混合售名称")
private String mixName; private String mixName;
@ApiModelProperty(value = "订单藏品信息")
GoblinNftOrderArtworkInfoVo artworkInfoVo;
private static final GoblinNftOrderDetailsVo obj = new GoblinNftOrderDetailsVo(); private static final GoblinNftOrderDetailsVo obj = new GoblinNftOrderDetailsVo();
public static GoblinNftOrderDetailsVo getNew() { public static GoblinNftOrderDetailsVo getNew() {
......
...@@ -67,6 +67,9 @@ public class GoblinNftOrderVo implements Serializable, Cloneable { ...@@ -67,6 +67,9 @@ public class GoblinNftOrderVo implements Serializable, Cloneable {
@ApiModelProperty(value = "兑换码") @ApiModelProperty(value = "兑换码")
private String exCode; private String exCode;
@ApiModelProperty(value = "藏品ID")
private String artworkId;
@ApiModelProperty(value = "应付金额") @ApiModelProperty(value = "应付金额")
private BigDecimal priceTotal; private BigDecimal priceTotal;
......
package com.liquidnet.service.goblin.dto.vo; package com.liquidnet.service.goblin.dto.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.liquidnet.commons.lang.util.DateUtil;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
@ApiModel(value = "GoblinUserDigitalArtworkInfoVo", description = "我的藏品详情") @ApiModel(value = "GoblinUserDigitalArtworkInfoVo", description = "我的藏品详情")
@Data @Data
...@@ -33,7 +36,7 @@ public class GoblinUserDigitalArtworkInfoVo implements Serializable, Cloneable { ...@@ -33,7 +36,7 @@ public class GoblinUserDigitalArtworkInfoVo implements Serializable, Cloneable {
@ApiModelProperty(position = 18, value = "藏品生成时间[yyyy-MM-dd HH:mm:ss]") @ApiModelProperty(position = 18, value = "藏品生成时间[yyyy-MM-dd HH:mm:ss]")
private String generateTime; private String generateTime;
@ApiModelProperty(position = 19, value = "获得方式[1-购买|2-兑换|3-赠送|5-赠|31-空投赠送]") @ApiModelProperty(position = 19, value = "获得方式[1-购买|2-兑换|3-赠送|5-大美|6-转赠|31-空投赠送]")
private Integer source; private Integer source;
@ApiModelProperty(position = 20, value = "藏品状态,根据`unbox`区分盲盒来判断[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败|5-待收取]") @ApiModelProperty(position = 20, value = "藏品状态,根据`unbox`区分盲盒来判断[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败|5-待收取]")
private Integer state; private Integer state;
...@@ -53,6 +56,23 @@ public class GoblinUserDigitalArtworkInfoVo implements Serializable, Cloneable { ...@@ -53,6 +56,23 @@ public class GoblinUserDigitalArtworkInfoVo implements Serializable, Cloneable {
private String skuId; private String skuId;
@ApiModelProperty(position = 27, value = "展示预览图片URL[256]") @ApiModelProperty(position = 27, value = "展示预览图片URL[256]")
private String skuWatchPic; private String skuWatchPic;
@ApiModelProperty(position = 27, value = "区块链路由[zxinchain-至信链|xuper-百度超级链]")
private String routeType;
@ApiModelProperty(position = 28, value = "转赠状态[PENDING|SUCCESS]")
private String transferState;
@ApiModelProperty(position = 25, value = "转赠允许时间")
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR)
private LocalDateTime transferAllowTime;
@ApiModelProperty(position = 30, value = "系统当前时间")
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR)
private LocalDateTime systime;
@ApiModelProperty(position = 31, value = "受赠人信息")
private String receiverUser;
@ApiModelProperty(position = 32, value = "藏品转赠时间[yyyy-MM-dd HH:mm:ss]")
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR)
private LocalDateTime transferTime;
private static final GoblinUserDigitalArtworkInfoVo obj = new GoblinUserDigitalArtworkInfoVo(); private static final GoblinUserDigitalArtworkInfoVo obj = new GoblinUserDigitalArtworkInfoVo();
...@@ -77,10 +97,12 @@ public class GoblinUserDigitalArtworkInfoVo implements Serializable, Cloneable { ...@@ -77,10 +97,12 @@ public class GoblinUserDigitalArtworkInfoVo implements Serializable, Cloneable {
this.setGenerateTime(source.getTradingAt()); this.setGenerateTime(source.getTradingAt());
this.setSource(source.getSource()); this.setSource(source.getSource());
this.setState(source.getState()); this.setState(source.getState());
// this.setAuthor(); this.setAuthor(source.getAuthor());
// this.setPublisher(); this.setPublisher(source.getPublisher());
// this.setDetails(); // this.setDetails();
this.setSkuId(source.getSkuId()); this.setSkuId(source.getSkuId());
this.setTransferState(source.getTransferState());
this.setReceiverUser(source.getReceiverUser());
return this; return this;
} }
} }
...@@ -28,7 +28,7 @@ public class GoblinUserDigitalArtworkListVo implements Serializable, Cloneable { ...@@ -28,7 +28,7 @@ public class GoblinUserDigitalArtworkListVo implements Serializable, Cloneable {
private Integer editionSn; private Integer editionSn;
@ApiModelProperty(position = 16, value = "藏品发行量") @ApiModelProperty(position = 16, value = "藏品发行量")
private Integer edition; private Integer edition;
@ApiModelProperty(position = 17, value = "获得方式[1-购买|2-兑换|3-赠送|5-赠|31-空投赠送]") @ApiModelProperty(position = 17, value = "获得方式[1-购买|2-兑换|3-赠送|5-大美|6-转赠|31-空投赠送]")
private Integer source; private Integer source;
@ApiModelProperty(position = 18, value = "藏品状态,根据`unbox`区分盲盒来判断[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败|5-待收取]") @ApiModelProperty(position = 18, value = "藏品状态,根据`unbox`区分盲盒来判断[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败|5-待收取]")
...@@ -37,7 +37,6 @@ public class GoblinUserDigitalArtworkListVo implements Serializable, Cloneable { ...@@ -37,7 +37,6 @@ public class GoblinUserDigitalArtworkListVo implements Serializable, Cloneable {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime createdAt; private LocalDateTime createdAt;
@ApiModelProperty(position = 20, value = "是否盲盒[0-否|1-是]") @ApiModelProperty(position = 20, value = "是否盲盒[0-否|1-是]")
private String unbox; private String unbox;
@ApiModelProperty(position = 21, value = "盲盒开启时间") @ApiModelProperty(position = 21, value = "盲盒开启时间")
...@@ -46,6 +45,13 @@ public class GoblinUserDigitalArtworkListVo implements Serializable, Cloneable { ...@@ -46,6 +45,13 @@ public class GoblinUserDigitalArtworkListVo implements Serializable, Cloneable {
@ApiModelProperty(position = 22, value = "创作者") @ApiModelProperty(position = 22, value = "创作者")
private String author; private String author;
@ApiModelProperty(position = 23, value = "区块链路由[zxinchain-至信链|xuper-百度超级链]")
private String routeType;
@ApiModelProperty(position = 24, value = "转赠状态[PENDING|SUCCESS]")
private String transferState;
@ApiModelProperty(position = 25, value = "转赠允许时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime transferAllowTime;
private static final GoblinUserDigitalArtworkListVo obj = new GoblinUserDigitalArtworkListVo(); private static final GoblinUserDigitalArtworkListVo obj = new GoblinUserDigitalArtworkListVo();
...@@ -59,6 +65,7 @@ public class GoblinUserDigitalArtworkListVo implements Serializable, Cloneable { ...@@ -59,6 +65,7 @@ public class GoblinUserDigitalArtworkListVo implements Serializable, Cloneable {
} }
public GoblinUserDigitalArtworkListVo copy(GoblinUserDigitalArtworkVo source) { public GoblinUserDigitalArtworkListVo copy(GoblinUserDigitalArtworkVo source) {
if (null == source) return this;
this.setArtworkId(source.getArtworkId()); this.setArtworkId(source.getArtworkId());
// this.setName(); // this.setName();
// this.setSubtitle(); // this.setSubtitle();
...@@ -72,6 +79,7 @@ public class GoblinUserDigitalArtworkListVo implements Serializable, Cloneable { ...@@ -72,6 +79,7 @@ public class GoblinUserDigitalArtworkListVo implements Serializable, Cloneable {
// this.setOpeningTime(); // this.setOpeningTime();
this.setAuthor(source.getAuthor()); this.setAuthor(source.getAuthor());
this.setTransferState(source.getTransferState());
return this; return this;
} }
} }
...@@ -17,7 +17,7 @@ public class GoblinUserDigitalArtworkPageVo implements Cloneable { ...@@ -17,7 +17,7 @@ public class GoblinUserDigitalArtworkPageVo implements Cloneable {
@ApiModelProperty(position = 12, value = "藏品列表分页数据") @ApiModelProperty(position = 12, value = "藏品列表分页数据")
private PagedResult<GoblinUserDigitalArtworkListVo> pagedResult; private PagedResult<GoblinUserDigitalArtworkListVo> pagedResult;
@ApiModelProperty(position = 13, value = "系统时间") @ApiModelProperty(position = 13, value = "系统当前时间")
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR) @JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR)
private LocalDateTime systime; private LocalDateTime systime;
......
...@@ -20,6 +20,9 @@ public class GoblinUserDigitalArtworkVo implements Serializable, Cloneable { ...@@ -20,6 +20,9 @@ public class GoblinUserDigitalArtworkVo implements Serializable, Cloneable {
private String releaseAt; private String releaseAt;
private String tradingTxhash; private String tradingTxhash;
private String tradingAt; private String tradingAt;
private String receiverUid;
private String transferOrderId;
private String transferState;
private Integer source; private Integer source;
private Integer state; private Integer state;
private String delFlg; private String delFlg;
...@@ -28,10 +31,11 @@ public class GoblinUserDigitalArtworkVo implements Serializable, Cloneable { ...@@ -28,10 +31,11 @@ public class GoblinUserDigitalArtworkVo implements Serializable, Cloneable {
private LocalDateTime updatedAt; private LocalDateTime updatedAt;
private LocalDateTime deletedAt; private LocalDateTime deletedAt;
/* ---------------------- 冗余SPU信息 ---------------------- */ /* ---------------------- 冗余的关联信息 ---------------------- */
private String author; private String author;
private String publisher; private String publisher;
private String hitArtworkId; private String hitArtworkId;
private String receiverUser;
private static final GoblinUserDigitalArtworkVo obj = new GoblinUserDigitalArtworkVo(); private static final GoblinUserDigitalArtworkVo obj = new GoblinUserDigitalArtworkVo();
......
package com.liquidnet.service.goblin.service; package com.liquidnet.service.goblin.service;
import com.liquidnet.service.goblin.dto.vo.GoblinUserDigitalArtworkInfoVo; import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.dto.vo.GoblinUserDigitalArtworkListVo;
import com.liquidnet.service.goblin.dto.vo.GoblinUserDigitalArtworkPageVo;
import com.liquidnet.service.goblin.dto.vo.GoblinUserDigitalArtworkVo;
public interface IGoblinUserDigitalArtworkService { public interface IGoblinUserDigitalArtworkService {
...@@ -14,4 +11,6 @@ public interface IGoblinUserDigitalArtworkService { ...@@ -14,4 +11,6 @@ public interface IGoblinUserDigitalArtworkService {
GoblinUserDigitalArtworkListVo unboxingForBuyOrExchange(String uid, GoblinUserDigitalArtworkVo userDigitalArtworkVo); GoblinUserDigitalArtworkListVo unboxingForBuyOrExchange(String uid, GoblinUserDigitalArtworkVo userDigitalArtworkVo);
boolean accept(String uid, GoblinUserDigitalArtworkVo userDigitalArtworkVo); boolean accept(String uid, GoblinUserDigitalArtworkVo userDigitalArtworkVo);
boolean transfer(GoblinUserDigitalArtworkVo userDigitalArtworkVo, String routerType, String[] receiverArr);
} }
package com.liquidnet.service.goblin.service;
public interface IGoblinUserSafeConfigService {
/**
* 设置安全密码(首次)
*
* @param passwd 安全密码:MD5(******)
* @param uid UID
* @return boolean:true|false
*/
boolean initSafePasswd(String passwd, String uid);
}
...@@ -36,7 +36,7 @@ public class GoblinGagoController extends BaseController { ...@@ -36,7 +36,7 @@ public class GoblinGagoController extends BaseController {
RedisDataSourceUtil redisDataSourceUtil; RedisDataSourceUtil redisDataSourceUtil;
@Autowired @Autowired
GoblinRedisUtils goblinRedisUtils; GoblinRedisUtils goblinRedisUtils;
@Value("${liquidnet.service.order.url}") @Value("${liquidnet.service.order.url}")
private String orderUrl; private String orderUrl;
// private String orderUrl = "http://127.0.0.1:9004/order"; // private String orderUrl = "http://127.0.0.1:9004/order";
...@@ -75,6 +75,7 @@ public class GoblinGagoController extends BaseController { ...@@ -75,6 +75,7 @@ public class GoblinGagoController extends BaseController {
public AjaxResult listByStatus(@RequestParam(value = "skuId") String skuId, @RequestParam(value = "nftNum") int nftNum, @RequestParam(value = "uid") String uid) { public AjaxResult listByStatus(@RequestParam(value = "skuId") String skuId, @RequestParam(value = "nftNum") int nftNum, @RequestParam(value = "uid") String uid) {
//当前 nft序号 //当前 nft序号
GoblinGoodsSkuInfoVo skuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId); GoblinGoodsSkuInfoVo skuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
String routeType = skuInfoVo.getRouteType();
int cNufCount = goblinRedisUtils.getNftCountBySku(skuInfoVo.getRouteType(), skuId); int cNufCount = goblinRedisUtils.getNftCountBySku(skuInfoVo.getRouteType(), skuId);
if (cNufCount >= nftNum) { if (cNufCount >= nftNum) {
return AjaxResult.error("该序号已售卖"); return AjaxResult.error("该序号已售卖");
...@@ -90,9 +91,9 @@ public class GoblinGagoController extends BaseController { ...@@ -90,9 +91,9 @@ public class GoblinGagoController extends BaseController {
return AjaxResult.error("该序号已被占用"); return AjaxResult.error("该序号已被占用");
} }
// //
int count = goblinRedisUtils.decrSkuStock(null,skuId,1); int count = goblinRedisUtils.decrSkuStock(null, skuId, 1);
if(count<0){ if (count < 0) {
goblinRedisUtils.incrSkuStock(null,skuId,1); goblinRedisUtils.incrSkuStock(null, skuId, 1);
goblinRedisUtils.removeNftList(skuId, nftNum + ""); goblinRedisUtils.removeNftList(skuId, nftNum + "");
return AjaxResult.error("已售罄"); return AjaxResult.error("已售罄");
} }
...@@ -113,6 +114,7 @@ public class GoblinGagoController extends BaseController { ...@@ -113,6 +114,7 @@ public class GoblinGagoController extends BaseController {
dto.setNftOrderPayId(innerReturnVo.getData()); dto.setNftOrderPayId(innerReturnVo.getData());
dto.setSkuId(skuId); dto.setSkuId(skuId);
dto.setUserId(uid); dto.setUserId(uid);
dto.setRouterType(routeType);
goblinRedisUtils.setNftNumDetails(nftNum + "", skuId, dto); goblinRedisUtils.setNftNumDetails(nftNum + "", skuId, dto);
return AjaxResult.success(); return AjaxResult.success();
} else { } else {
......
...@@ -11,6 +11,7 @@ public class CollectionUtil { ...@@ -11,6 +11,7 @@ public class CollectionUtil {
private static final HashMap<String, Object> STRING_OBJECT_HASH_MAP = new HashMap<>(); private static final HashMap<String, Object> STRING_OBJECT_HASH_MAP = new HashMap<>();
private static final HashMap<String, List<String>> STRING_LIST_HASH_MAP = new HashMap<>(); private static final HashMap<String, List<String>> STRING_LIST_HASH_MAP = new HashMap<>();
private static final HashMap<String, Integer> STRING_INTEGER_HASH_MAP = new HashMap<>(); private static final HashMap<String, Integer> STRING_INTEGER_HASH_MAP = new HashMap<>();
private static final HashMap<String, Long> STRING_LONG_HASH_MAP = new HashMap<>();
private static final HashMap<String, BigDecimal> STRING_BIG_DECIMAL_HASH_MAP = new HashMap<>(); private static final HashMap<String, BigDecimal> STRING_BIG_DECIMAL_HASH_MAP = new HashMap<>();
private static final HashMap<String, Map<String, Object>> STRING_MAP_HASH_MAP = new HashMap<>(); private static final HashMap<String, Map<String, Object>> STRING_MAP_HASH_MAP = new HashMap<>();
private static final LinkedList<String> STRING_LINKED_LIST = new LinkedList<>(); private static final LinkedList<String> STRING_LINKED_LIST = new LinkedList<>();
...@@ -42,6 +43,10 @@ public class CollectionUtil { ...@@ -42,6 +43,10 @@ public class CollectionUtil {
return (HashMap<String, Integer>) STRING_INTEGER_HASH_MAP.clone(); return (HashMap<String, Integer>) STRING_INTEGER_HASH_MAP.clone();
} }
public static HashMap<String, Long> mapStringLong() {
return (HashMap<String, Long>) STRING_LONG_HASH_MAP.clone();
}
public static HashMap<String, BigDecimal> mapStringBigDecimal() { public static HashMap<String, BigDecimal> mapStringBigDecimal() {
return (HashMap<String, BigDecimal>) STRING_BIG_DECIMAL_HASH_MAP.clone(); return (HashMap<String, BigDecimal>) STRING_BIG_DECIMAL_HASH_MAP.clone();
} }
......
...@@ -44,6 +44,17 @@ public abstract class AbstractRedisUtil { ...@@ -44,6 +44,17 @@ public abstract class AbstractRedisUtil {
// =============================common============================ // =============================common============================
/**
* 指定缓存失效时间
*
* @param key 键
* @param time 时间(秒)
* @return
*/
public boolean expireSet(String key, long time) {
return expire(this.fillingKey(key), time);
}
/** /**
* 指定缓存失效时间 * 指定缓存失效时间
* *
...@@ -54,10 +65,10 @@ public abstract class AbstractRedisUtil { ...@@ -54,10 +65,10 @@ public abstract class AbstractRedisUtil {
private boolean expire(String key, long time) { private boolean expire(String key, long time) {
if (time > 0) { if (time > 0) {
this.getRedisConfig().getRedisTemplateByDb(this.getIndex(key)).expire(key, time, TimeUnit.SECONDS); return this.getRedisConfig().getRedisTemplateByDb(this.getIndex(key)).expire(key, time, TimeUnit.SECONDS);
} }
return true; return false;
} }
......
...@@ -32,8 +32,13 @@ public class MdbMessage implements Serializable, Cloneable { ...@@ -32,8 +32,13 @@ public class MdbMessage implements Serializable, Cloneable {
private static final MdbMessage obj = new MdbMessage(); private static final MdbMessage obj = new MdbMessage();
public static MdbMessage getNew() { public static MdbMessage getNew() {
return obj.clone();
}
@Override
public MdbMessage clone() {
try { try {
return (MdbMessage) obj.clone(); return (MdbMessage) super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
return new MdbMessage(); return new MdbMessage();
} }
......
...@@ -42,8 +42,13 @@ public class SmsMessage implements Serializable, Cloneable { ...@@ -42,8 +42,13 @@ public class SmsMessage implements Serializable, Cloneable {
private final static SmsMessage instance = new SmsMessage(); private final static SmsMessage instance = new SmsMessage();
public static SmsMessage builder() { public static SmsMessage builder() {
return instance.clone();
}
@Override
public SmsMessage clone() {
try { try {
return (SmsMessage) instance.clone(); return (SmsMessage) super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
return new SmsMessage(); return new SmsMessage();
} }
......
...@@ -290,7 +290,7 @@ public class MQConst { ...@@ -290,7 +290,7 @@ public class MQConst {
BIZ_ARTWORK_UPL("goblin:stream:biz_art:upl", "group.biz.artwork", "藏品上传声明"), BIZ_ARTWORK_UPL("goblin:stream:biz_art:upl", "group.biz.artwork", "藏品上传声明"),
BIZ_ARTWORK_CLQ("goblin:stream:biz_art:clq", "group.biz.artwork", "藏品声明查询"), BIZ_ARTWORK_CLQ("goblin:stream:biz_art:clq", "group.biz.artwork", "藏品声明查询"),
BIZ_ARTWORK_GEN("goblin:stream:biz_art:gen", "group.biz.artwork", "藏品生成"), BIZ_ARTWORK_TRANS_QUERY("goblin:stream:biz_art:trans_query", "group.biz.artwork", "藏品转赠查询"),
SQL_ARTWORK_GEN("goblin:stream:sql_art:gen", "group.biz.artwork", "藏品生成"), SQL_ARTWORK_GEN("goblin:stream:sql_art:gen", "group.biz.artwork", "藏品生成"),
GOBLIN_NFT_ORDER("goblin:stream:nftOrder:create", "group.nftOrder:create", "NFT订单处理"), GOBLIN_NFT_ORDER("goblin:stream:nftOrder:create", "group.nftOrder:create", "NFT订单处理"),
...@@ -329,7 +329,8 @@ public class MQConst { ...@@ -329,7 +329,8 @@ public class MQConst {
SQL_NFT_TRADE_INFO("galaxy:stream:rk.sql.nftTradeInfo", "group.sql.nftTradeInfo", "交易信息"), SQL_NFT_TRADE_INFO("galaxy:stream:rk.sql.nftTradeInfo", "group.sql.nftTradeInfo", "交易信息"),
SQL_NFT_ORDER_FAIL_LOG("galaxy:stream:rk.sql.nftOrderFailLog", "group.sql.nftOrderFailLog", "交易发行购买失败记录"), SQL_NFT_ORDER_FAIL_LOG("galaxy:stream:rk.sql.nftOrderFailLog", "group.sql.nftOrderFailLog", "交易发行购买失败记录"),
JSON_NFT_PUBLISH_AND_BUY("galaxy:stream:rk.json.nftPublishAndBuy", "group.json.nftPublishAndBuy", "NFT发行和购买"), JSON_NFT_PUBLISH_AND_BUY("galaxy:stream:rk.json.nftPublishAndBuy", "group.json.nftPublishAndBuy", "NFT发行和购买"),
JSON_NFT_USER_REGISTER("galaxy:stream:rk.json.userRegister", "group.json.userRegister", "NFT用户注册"); JSON_NFT_USER_REGISTER("galaxy:stream:rk.json.userRegister", "group.json.userRegister", "NFT用户注册"),
JSON_NFT_TRANSFER("galaxy:stream:rk.json.nftTransfer", "group.json.nftTransfer", "NFT转让");
private final String key; private final String key;
private final String group; private final String group;
private final String desc; private final String desc;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<dependency> <dependency>
<groupId>com.baidu.xuper</groupId> <groupId>com.baidu.xuper</groupId>
<artifactId>xasset-sdk-java</artifactId> <artifactId>xasset-sdk-java</artifactId>
<version>1.0.4</version> <version>1.0.7</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.baidu.xuper</groupId> <groupId>com.baidu.xuper</groupId>
......
package com.baidu.xasset.client.base;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: BaseDef
* @Package com.baidu.xasset.client.base
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/8/17 10:59
*/
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
public class BaseDef {
public static final int ERRNOSUCC = 0;
public static final int MAXLIMIT = 50;
public BaseDef() {
}
public static class ListAddrResp<T> {
public long requestId;
public int errNo;
public String errMsg;
public T list;
public ListAddrResp(long requestId, int errNo, String errMsg, T list) {
this.requestId = requestId;
this.errNo = errNo;
this.errMsg = errMsg;
this.list = list;
}
}
public static class ListPageResp<T> {
public long requestId;
public int errNo;
public String errMsg;
public T list;
public int totalCnt;
public ListPageResp(long requestId, int errNo, String errMsg, T list, int totalCnt) {
this.requestId = requestId;
this.errNo = errNo;
this.errMsg = errMsg;
this.list = list;
this.totalCnt = totalCnt;
}
public long getRequestId() {
return requestId;
}
public void setRequestId(long requestId) {
this.requestId = requestId;
}
public int getErrNo() {
return errNo;
}
public void setErrNo(int errNo) {
this.errNo = errNo;
}
public String getErrMsg() {
return errMsg;
}
public void setErrMsg(String errMsg) {
this.errMsg = errMsg;
}
public T getList() {
return list;
}
public void setList(T list) {
this.list = list;
}
public int getTotalCnt() {
return totalCnt;
}
public void setTotalCnt(int totalCnt) {
this.totalCnt = totalCnt;
}
}
public static class ListCursorResp<T> {
public long requestId;
public int errNo;
public String errMsg;
public T list;
public int hasMore;
public String cursor;
public ListCursorResp(long requestId, int errNo, String errMsg, T list, int hasMore, String cursor) {
this.requestId = requestId;
this.errNo = errNo;
this.errMsg = errMsg;
this.list = list;
this.hasMore = hasMore;
this.cursor = cursor;
}
public long getRequestId() {
return requestId;
}
public void setRequestId(long requestId) {
this.requestId = requestId;
}
public int getErrNo() {
return errNo;
}
public void setErrNo(int errNo) {
this.errNo = errNo;
}
public String getErrMsg() {
return errMsg;
}
public void setErrMsg(String errMsg) {
this.errMsg = errMsg;
}
public T getList() {
return list;
}
public void setList(T list) {
this.list = list;
}
public int getHasMore() {
return hasMore;
}
public void setHasMore(int hasMore) {
this.hasMore = hasMore;
}
public String getCursor() {
return cursor;
}
public void setCursor(String cursor) {
this.cursor = cursor;
}
}
public static class Resp<T> {
public T apiResp;
public RequestRes res;
public Resp(T resp, RequestRes res) {
this.apiResp = resp;
this.res = res;
}
}
public static class BaseResp {
public long requestId;
public int errNo;
public String errMsg;
public BaseResp(long requestId, int errNo, String errMsg) {
this.requestId = requestId;
this.errNo = errNo;
this.errMsg = errMsg;
}
}
public static class RequestRes {
public int httpCode;
public String reqUrl;
public String traceId;
public String body;
RequestRes(int httpCode, String reqUrl, String traceId, String body) {
this.httpCode = httpCode;
this.reqUrl = reqUrl;
this.traceId = traceId;
this.body = body;
}
}
}
...@@ -42,13 +42,13 @@ public class XuperConfig { ...@@ -42,13 +42,13 @@ public class XuperConfig {
@PostConstruct @PostConstruct
public void init(){ public void init(){
long _appId = Long.parseLong(appId); long _appId = Long.parseLong(appId);
//生产
String ak = accessKeyID; String ak = accessKeyID;
String sk = secretAccessKey; String sk = secretAccessKey;
//测试环境 // //测试环境
// String ak = MD5Utils.md5(accessKeyID); // String ak2 = MD5Utils.md5(accessKeyID);
// String sk = MD5Utils.md5(secretAccessKey); // String sk2 = MD5Utils.md5(secretAccessKey);
// System.out.println("test==ak=="+ak2);
// System.out.println("test==sk=="+sk2);
Config.XassetCliConfig cfg = new Config.XassetCliConfig(); Config.XassetCliConfig cfg = new Config.XassetCliConfig();
cfg.setCredentials(_appId, ak, sk); cfg.setCredentials(_appId, ak, sk);
cfg.setEndPoint(nftApiUrl); cfg.setEndPoint(nftApiUrl);
......
...@@ -25,7 +25,7 @@ public class Xuper010QuerySdsRespDto { ...@@ -25,7 +25,7 @@ public class Xuper010QuerySdsRespDto {
public String ownerAddr; public String ownerAddr;
public long uid; public long uid;
public long price; public long price;
public int status; public int status; //0:已上链 1:授予中 4:转移中 5: 核销中 6: 已核销 10:异常详情参考错误码和状态码
public String txId; public String txId;
public ShardAssetInfo assetInfo; public ShardAssetInfo assetInfo;
public long ctime; public long ctime;
......
...@@ -16,9 +16,11 @@ public class Xuper011ListSdsByAddrReqDto { ...@@ -16,9 +16,11 @@ public class Xuper011ListSdsByAddrReqDto {
//要拉取的区块链账户地址 //要拉取的区块链账户地址
private String addr = ""; private String addr = "";
//要拉取页数,第一页为1 //要拉取页数,第一页为1
private int page = 1; private Integer page = 1;
//每页拉取数量,默认20,最大50(可选) //每页拉取数量,默认20,最大50(可选)
private int limit = 50; private Integer limit = 50;
//资产id
private Long assetId;
private static final Xuper011ListSdsByAddrReqDto obj = new Xuper011ListSdsByAddrReqDto(); private static final Xuper011ListSdsByAddrReqDto obj = new Xuper011ListSdsByAddrReqDto();
public static Xuper011ListSdsByAddrReqDto getNew() { public static Xuper011ListSdsByAddrReqDto getNew() {
......
...@@ -6,7 +6,7 @@ import lombok.Data; ...@@ -6,7 +6,7 @@ import lombok.Data;
* @author AnJiabin <anjiabin@zhengzai.tv> * @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0 * @version V1.0
* @Description: 拉取数字商品历史登记记录 * @Description: 拉取数字商品历史登记记录
* @class: Xuper001GetStokenReqDto * @class: Xuper013HistoryReqDto
* @Package com.liquidnet.common.third.xuper.dto * @Package com.liquidnet.common.third.xuper.dto
* @Copyright: LightNet @ Copyright (c) 2022 * @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/4/18 15:10 * @date 2022/4/18 15:10
...@@ -14,11 +14,15 @@ import lombok.Data; ...@@ -14,11 +14,15 @@ import lombok.Data;
@Data @Data
public class Xuper013HistoryReqDto { public class Xuper013HistoryReqDto {
//资产id //资产id
private long assetId; private Long assetId;
//要拉取页数,第一页为1 //要拉取页数,第一页为1
private int page = 1; private Integer page = 1;
//每页拉取数量,默认20,最大50(可选) //每页拉取数量,默认20,最大50(可选)
private int limit = 20; private Integer limit = 20;
/**
* 碎片id
*/
private Long shardId;
private static final Xuper013HistoryReqDto obj = new Xuper013HistoryReqDto(); private static final Xuper013HistoryReqDto obj = new Xuper013HistoryReqDto();
public static Xuper013HistoryReqDto getNew() { public static Xuper013HistoryReqDto getNew() {
......
...@@ -8,21 +8,20 @@ import java.util.ArrayList; ...@@ -8,21 +8,20 @@ import java.util.ArrayList;
* @author AnJiabin <anjiabin@zhengzai.tv> * @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0 * @version V1.0
* @Description: 拉取数字商品历史登记记录 * @Description: 拉取数字商品历史登记记录
* @class: Xuper001GetStokenReqDto * @class: Xuper013HistoryRespDto
* @Package com.liquidnet.common.third.xuper.dto * @Package com.liquidnet.common.third.xuper.dto
* @Copyright: LightNet @ Copyright (c) 2022 * @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/4/18 15:10 * @date 2022/8/12 17:50
*/ */
@Data @Data
public class Xuper013HistoryRespDto { public class Xuper013HistoryRespDto {
public long requestId; public long requestId;
public int errNo; public int errNo;
public String errMsg; public String errMsg;
public ArrayList<AssetInfo> list; public ArrayList<History> list;
public int totalCnt; public int totalCnt;
@Data public static class History {
public static class AssetInfo {
public long assetId; public long assetId;
public long type; public long type;
public long shardId; public long shardId;
...@@ -31,6 +30,70 @@ public class Xuper013HistoryRespDto { ...@@ -31,6 +30,70 @@ public class Xuper013HistoryRespDto {
public String from; public String from;
public String to; public String to;
public long ctime; public long ctime;
public long getAssetId() {
return assetId;
}
public void setAssetId(long assetId) {
this.assetId = assetId;
}
public long getType() {
return type;
}
public void setType(long type) {
this.type = type;
}
public long getShardId() {
return shardId;
}
public void setShardId(long shardId) {
this.shardId = shardId;
}
public long getPrice() {
return price;
}
public void setPrice(long price) {
this.price = price;
}
public String getTxId() {
return txId;
}
public void setTxId(String txId) {
this.txId = txId;
}
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String getTo() {
return to;
}
public void setTo(String to) {
this.to = to;
}
public long getCtime() {
return ctime;
}
public void setCtime(long ctime) {
this.ctime = ctime;
}
} }
......
...@@ -8,6 +8,7 @@ import com.liquidnet.common.third.zxlnft.exception.ZxlNftException; ...@@ -8,6 +8,7 @@ import com.liquidnet.common.third.zxlnft.exception.ZxlNftException;
import com.liquidnet.common.third.zxlnft.service.WalletSdkService; import com.liquidnet.common.third.zxlnft.service.WalletSdkService;
import com.liquidnet.commons.lang.util.BeanUtil; import com.liquidnet.commons.lang.util.BeanUtil;
import com.liquidnet.commons.lang.util.JsonUtils; import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.commons.lang.util.UUIDUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.http.NameValuePair; import org.apache.http.NameValuePair;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -59,6 +60,7 @@ public class ZxlnftBiz { ...@@ -59,6 +60,7 @@ public class ZxlnftBiz {
commonHeader.add("Signature-Time", resp.getSignData().getSignatureTime()); commonHeader.add("Signature-Time", resp.getSignData().getSignatureTime());
commonHeader.add("Nonce", resp.getSignData().getNonce()); commonHeader.add("Nonce", resp.getSignData().getNonce());
commonHeader.add("Content-Type", "application/json;charset=utf-8"); commonHeader.add("Content-Type", "application/json;charset=utf-8");
commonHeader.add("Cloud-Trace-Id", UUIDUtil.randomUUID());
log.debug("buildHeader ---> {}",JsonUtils.toJson(commonHeader)); log.debug("buildHeader ---> {}",JsonUtils.toJson(commonHeader));
} }
...@@ -79,6 +81,7 @@ public class ZxlnftBiz { ...@@ -79,6 +81,7 @@ public class ZxlnftBiz {
commonHeader.add("Signature-Time", resp.getSignData().getSignatureTime()); commonHeader.add("Signature-Time", resp.getSignData().getSignatureTime());
commonHeader.add("Nonce", resp.getSignData().getNonce()); commonHeader.add("Nonce", resp.getSignData().getNonce());
commonHeader.add("Content-Type", "application/json;charset=utf-8"); commonHeader.add("Content-Type", "application/json;charset=utf-8");
commonHeader.add("Cloud-Trace-Id", UUIDUtil.randomUUID());
log.debug("buildPlatFormHeader ---> {}",JsonUtils.toJson(commonHeader)); log.debug("buildPlatFormHeader ---> {}",JsonUtils.toJson(commonHeader));
} }
...@@ -90,7 +93,7 @@ public class ZxlnftBiz { ...@@ -90,7 +93,7 @@ public class ZxlnftBiz {
* 构造返回结果 * 构造返回结果
*/ */
resp = this.buildNftRespObj(response,tClass,true); resp = this.buildNftRespObj(response,tClass,true);
log.info(tClass.getName()+"--->>> return result : {} ",resp.toString()); // log.info(tClass.getName()+"--->>> return result : {} ",resp.toString());
} catch (ZxlNftException e){ } catch (ZxlNftException e){
log.error("buildNftRespObj biz error response: {}", JsonUtils.toJson(response),e); log.error("buildNftRespObj biz error response: {}", JsonUtils.toJson(response),e);
throw new ZxlNftException(e.getCode(),e.getMsg()); throw new ZxlNftException(e.getCode(),e.getMsg());
......
...@@ -212,6 +212,7 @@ public class ZxlnftConstant { ...@@ -212,6 +212,7 @@ public class ZxlnftConstant {
* NFT 转移(方案二) * NFT 转移(方案二)
*/ */
public static String ZXL_NFT_046_TRANSFER_URL = "/api/v1/nft/transfer"; public static String ZXL_NFT_046_TRANSFER_URL = "/api/v1/nft/transfer";
public static String ZXL_NFT_046_TRANSFER_URL_V2 = "/api/v2/nft/transfer";
/** /**
* NFT 同名转移(方案一) * NFT 同名转移(方案一)
*/ */
......
...@@ -334,6 +334,13 @@ public interface ZxlnftSdkService { ...@@ -334,6 +334,13 @@ public interface ZxlnftSdkService {
*/ */
Nft046TransferResp nft046Transfer(Nft046TransferReq req); Nft046TransferResp nft046Transfer(Nft046TransferReq req);
/**
* 46.NFT 转移 v2
* @param req
* @return
*/
Nft046TransferResp nft046TransferV2(Nft046TransferReq req);
/** /**
* 47.NFT 同名转移 * 47.NFT 同名转移
* @param req * @param req
......
...@@ -210,7 +210,7 @@ public class WalletSdkServiceImpl implements WalletSdkService { ...@@ -210,7 +210,7 @@ public class WalletSdkServiceImpl implements WalletSdkService {
}catch (Exception e) { }catch (Exception e) {
log.error("pubKey2Address error",e); log.error("pubKey2Address error",e);
} }
log.debug("pubKey2Address--->>> response : {} ",response); log.info("pubKey2Address--->>> response : {} ",response);
if (StringUtils.isEmpty(response)) { if (StringUtils.isEmpty(response)) {
return null; return null;
......
...@@ -2,16 +2,13 @@ package com.liquidnet.common.third.zxlnft.service.impl; ...@@ -2,16 +2,13 @@ package com.liquidnet.common.third.zxlnft.service.impl;
import com.liquidnet.common.third.zxlnft.biz.ZxlnftBiz; import com.liquidnet.common.third.zxlnft.biz.ZxlnftBiz;
import com.liquidnet.common.third.zxlnft.config.ZxlnftConfig; import com.liquidnet.common.third.zxlnft.config.ZxlnftConfig;
import com.liquidnet.common.third.zxlnft.constant.ZxlErrorEnum;
import com.liquidnet.common.third.zxlnft.constant.ZxlnftConstant; import com.liquidnet.common.third.zxlnft.constant.ZxlnftConstant;
import com.liquidnet.common.third.zxlnft.dto.nft.*; import com.liquidnet.common.third.zxlnft.dto.nft.*;
import com.liquidnet.common.third.zxlnft.exception.ZxlNftException;
import com.liquidnet.common.third.zxlnft.service.ZxlnftSdkService; import com.liquidnet.common.third.zxlnft.service.ZxlnftSdkService;
import com.liquidnet.commons.lang.util.BeanUtil; import com.liquidnet.commons.lang.util.BeanUtil;
import com.liquidnet.commons.lang.util.HttpUtil; import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.commons.lang.util.JsonUtils; import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.LinkedMultiValueMap;
...@@ -1088,6 +1085,7 @@ public class ZxlnftSdkServiceImpl implements ZxlnftSdkService ...@@ -1088,6 +1085,7 @@ public class ZxlnftSdkServiceImpl implements ZxlnftSdkService
@Override @Override
public Nft035PublishResultResp nft035PublishResult(Nft035PublishResultReq req) { public Nft035PublishResultResp nft035PublishResult(Nft035PublishResultReq req) {
zxlnftBiz.buildPlatFormHeader(commonHeader); zxlnftBiz.buildPlatFormHeader(commonHeader);
log.info("nft035PublishResult header ---> {}", JsonUtils.toJson(commonHeader));
String requestUrl = zxlnftConfig.getNftApiUrl() + ZxlnftConstant.ZXL_NFT_035_PUBLISH_RESULT_URL; String requestUrl = zxlnftConfig.getNftApiUrl() + ZxlnftConstant.ZXL_NFT_035_PUBLISH_RESULT_URL;
log.info("nft035PublishResult--->>> request url : {} body : {} ",requestUrl, req.toString()); log.info("nft035PublishResult--->>> request url : {} body : {} ",requestUrl, req.toString());
...@@ -1166,14 +1164,14 @@ public class ZxlnftSdkServiceImpl implements ZxlnftSdkService ...@@ -1166,14 +1164,14 @@ public class ZxlnftSdkServiceImpl implements ZxlnftSdkService
}catch (Exception e) { }catch (Exception e) {
log.error("nft037AddressList error",e); log.error("nft037AddressList error",e);
} }
log.info("nft037AddressList--->>> response : {} ",response); log.warn("nft037AddressList--->>> response : {} ",response);
/** /**
* 构造返回结果 * 构造返回结果
*/ */
Nft037AddressListResp resp = zxlnftBiz.buildNftRespObj(response,Nft037AddressListResp.class); Nft037AddressListResp resp = zxlnftBiz.buildNftRespObj(response,Nft037AddressListResp.class);
log.info("nft037AddressList--->>> return result : {} ",resp.toString()); log.warn("nft037AddressList--->>> return result : {} ",resp.toString());
return resp; return resp;
} }
...@@ -1364,6 +1362,7 @@ public class ZxlnftSdkServiceImpl implements ZxlnftSdkService ...@@ -1364,6 +1362,7 @@ public class ZxlnftSdkServiceImpl implements ZxlnftSdkService
@Override @Override
public Nft044BuyResultResp nft044BuyResult(Nft044BuyResultReq req) { public Nft044BuyResultResp nft044BuyResult(Nft044BuyResultReq req) {
zxlnftBiz.buildPlatFormHeader(commonHeader); zxlnftBiz.buildPlatFormHeader(commonHeader);
log.info("nft044BuyResult header ---> {}", JsonUtils.toJson(commonHeader));
String requestUrl = zxlnftConfig.getNftApiUrl() + ZxlnftConstant.ZXL_NFT_044_BUY_RESULT_URL; String requestUrl = zxlnftConfig.getNftApiUrl() + ZxlnftConstant.ZXL_NFT_044_BUY_RESULT_URL;
log.info("nft044BuyResult--->>> request url : {} body : {} ",requestUrl, req.toString()); log.info("nft044BuyResult--->>> request url : {} body : {} ",requestUrl, req.toString());
...@@ -1452,6 +1451,35 @@ public class ZxlnftSdkServiceImpl implements ZxlnftSdkService ...@@ -1452,6 +1451,35 @@ public class ZxlnftSdkServiceImpl implements ZxlnftSdkService
return resp; return resp;
} }
@Override
public Nft046TransferResp nft046TransferV2(Nft046TransferReq req) {
zxlnftBiz.buildPlatFormHeader(commonHeader);
//构造请求参数
String reqJsonStr = BeanUtil.convertBeanToJsonString(req);
String requestUrl = zxlnftConfig.getNftApiUrl() + ZxlnftConstant.ZXL_NFT_046_TRANSFER_URL_V2;
log.info("nft046TransferV2--->>> request url : {} body : {} ",requestUrl, reqJsonStr);
String response = null;
try {
response = HttpUtil.postJson(requestUrl,reqJsonStr,commonHeader);
} catch(HttpClientErrorException e) {
log.error("nft046TransferV2 error", e);
}catch (Exception e) {
log.error("nft046TransferV2 error",e);
}
log.info("nft046TransferV2--->>> response : {} ",response);
/**
* 构造返回结果
*/
Nft046TransferResp resp = zxlnftBiz.buildNftRespObj(response,Nft046TransferResp.class);
log.info("nft046TransferV2--->>> return result : {} ",resp.toString());
return resp;
}
@Override @Override
public Nft047SelfTransferResp nft047SelfTransfer(Nft047SelfTransferReq req) { public Nft047SelfTransferResp nft047SelfTransfer(Nft047SelfTransferReq req) {
zxlnftBiz.buildPlatFormHeader(commonHeader); zxlnftBiz.buildPlatFormHeader(commonHeader);
......
...@@ -8,7 +8,6 @@ import com.liquidnet.common.third.zxlnft.dto.nft.*; ...@@ -8,7 +8,6 @@ import com.liquidnet.common.third.zxlnft.dto.nft.*;
import com.liquidnet.common.third.zxlnft.exception.ZxlNftException; import com.liquidnet.common.third.zxlnft.exception.ZxlNftException;
import com.liquidnet.common.third.zxlnft.service.ZxlnftSdkService; import com.liquidnet.common.third.zxlnft.service.ZxlnftSdkService;
import com.liquidnet.commons.lang.util.BeanUtil; import com.liquidnet.commons.lang.util.BeanUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.commons.lang.util.StringUtil; import com.liquidnet.commons.lang.util.StringUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -1075,6 +1074,25 @@ public class ZxlnftSdkUtil { ...@@ -1075,6 +1074,25 @@ public class ZxlnftSdkUtil {
return ZxlnftResponseDto.success(respDto); return ZxlnftResponseDto.success(respDto);
} }
public ZxlnftResponseDto<Nft046TransferRespDto> nft046TransferV2(Nft046TransferReqDto reqDto){
/**
* 构造请求
*/
Nft046TransferReq req = Nft046TransferReq.getNew();
BeanUtil.copy(reqDto,req);
Nft046TransferRespDto respDto = Nft046TransferRespDto.getNew();
try{
Nft046TransferResp resp = zxlnftSdkService.nft046TransferV2(req);
BeanUtil.copy(resp,respDto);
}catch(ZxlNftException e){
return ZxlnftResponseDto.failure(e.getCode()+","+e.getMessage());
}catch(Exception e){
return ZxlnftResponseDto.failure(ZxlErrorEnum.SERVER_INNER_ERROR.getCode(),ZxlErrorEnum.SERVER_INNER_ERROR.getMsg());
}
return ZxlnftResponseDto.success(respDto);
}
public ZxlnftResponseDto<Nft047SelfTransferRespDto> nft047SelfTransfer(Nft047SelfTransferReqDto reqDto){ public ZxlnftResponseDto<Nft047SelfTransferRespDto> nft047SelfTransfer(Nft047SelfTransferReqDto reqDto){
/** /**
* 构造请求 * 构造请求
......
...@@ -95,6 +95,11 @@ public class GoblinNftOrder implements Serializable, Cloneable { ...@@ -95,6 +95,11 @@ public class GoblinNftOrder implements Serializable, Cloneable {
*/ */
private String exCode; private String exCode;
/**
* 藏品ID
*/
private String artworkId;
/** /**
* 应付金额 * 应付金额
*/ */
......
...@@ -80,7 +80,12 @@ public class GoblinUserDigitalArtwork implements Serializable { ...@@ -80,7 +80,12 @@ public class GoblinUserDigitalArtwork implements Serializable {
private String tradingAt; private String tradingAt;
/** /**
* 获得方式[1-购买|2-兑换|3-赠送|5-受赠|31-空投赠送] * 转赠状态[PENDING|SUCCESS]
*/
private String transferState;
/**
* 获得方式[1-购买|2-兑换|3-赠送|5-大美|6-转赠|31-空投赠送]
*/ */
private Integer source; private Integer source;
......
package com.liquidnet.service.goblin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 用户安全设置
* </p>
*
* @author liquidnet
* @since 2022-08-16
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinUserSafeConfig implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* UID
*/
private String uid;
/**
* 安全密码
*/
private String pwsswd;
/**
* 0-INIT,1-NORMAL,2-INVALID
*/
private Integer state;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private String comment;
}
package com.liquidnet.service.goblin.mapper;
import com.liquidnet.service.goblin.entity.GoblinUserSafeConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 用户安全设置 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2022-08-16
*/
public interface GoblinUserSafeConfigMapper extends BaseMapper<GoblinUserSafeConfig> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.goblin.mapper.GoblinUserSafeConfigMapper">
</mapper>
...@@ -499,6 +499,10 @@ alter table adam_addresses add town varchar(50) null comment '街道/镇' after ...@@ -499,6 +499,10 @@ alter table adam_addresses add town varchar(50) null comment '街道/镇' after
alter table adam_addresses add town_id varchar(20) null comment '街道行政编码' after town; alter table adam_addresses add town_id varchar(20) null comment '街道行政编码' after town;
alter table adam_addresses modify address varchar(255) not null comment '详细地址'; alter table adam_addresses modify address varchar(255) not null comment '详细地址';
alter table adam_addresses add full_address varchar(500) null comment '完整地址' after address; alter table adam_addresses add full_address varchar(500) null comment '完整地址' after address;
-- >>------------------------------------------------------------------------------------ |20220323三要素实名
alter table adam_real_name add node tinyint default 2 not null comment '认证节点[2-二要素|3-三要素]' after type;
-- >>------------------------------------------------------------------------------------ -- >>------------------------------------------------------------------------------------
-- >>------------------------------------------------------------------------------------ -- >>------------------------------------------------------------------------------------
-- >>------------------------------------------------------------------------------------ -- >>------------------------------------------------------------------------------------
-- >>------------------------------------------------------------------------------------
-- >>------------------------------------------------------------------------------------
\ No newline at end of file
...@@ -15,6 +15,7 @@ import io.swagger.annotations.Api; ...@@ -15,6 +15,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -38,6 +39,7 @@ public class AdamMemberController { ...@@ -38,6 +39,7 @@ public class AdamMemberController {
@Autowired @Autowired
IAdamUserMemberService adamUserMemberService; IAdamUserMemberService adamUserMemberService;
@Autowired @Autowired
@Lazy
FeignAdamPlatformClient feignAdamPlatformClient; FeignAdamPlatformClient feignAdamPlatformClient;
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
......
...@@ -33,6 +33,7 @@ import org.springframework.validation.annotation.Validated; ...@@ -33,6 +33,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern; import javax.validation.constraints.Pattern;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
...@@ -467,41 +468,41 @@ public class AdamUserController { ...@@ -467,41 +468,41 @@ public class AdamUserController {
} }
} }
// @ApiOperationSupport(order = 11) @ApiOperationSupport(order = 11)
// @ApiOperation(value = "业务账号开通") @ApiOperation(value = "用户身份信息")
// @ApiImplicitParams({ @ApiImplicitParams({
// @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "bizCode", value = "业务码[NFT_ZX]", allowableValues = "NFT_ZX"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "mobile", value = "手机号"),
// @ApiImplicitParam(type = "form", required = false, dataType = "String", name = "name", value = "姓名"), })
// @ApiImplicitParam(type = "form", required = false, dataType = "String", name = "idCard", value = "身份证号"), @GetMapping(value = "info/identity")
// }) public ResponseDto<AdamUserIdentityInfoVo> identityInfoByMobile(@Pattern(regexp = "\\d{11}", message = "手机号格式有误")
// @PostMapping(value = "open/account") @RequestParam(required = false) String mobile) {
// public ResponseDto<AdamUserBizAcctVo> openAccount(@Pattern(regexp = "\\b(NFT_ZX)\\b", message = "业务码无效") String uid = null == mobile ? CurrentUtil.getCurrentUid() : adamRdmService.getUidByMobile(mobile);
// @RequestParam String bizCode, AdamUserInfoVo userInfoVo;
// @RequestParam(required = false) String name, if (uid == null || null == (userInfoVo = adamRdmService.getUserInfoVoByUid(uid))) {
// @RequestParam(required = false) String idCard) { log.warn("###用户不存在[MOBILE:{},UID:{},TOKEN:{}]", mobile, uid, CurrentUtil.getToken());
// if (StringUtils.isNotBlank(name) && !name.contains("*")) { return ResponseDto.failure(ErrorMapping.get("10114"));
// if (!java.util.regex.Pattern.matches(LnsRegex.Valid.CN_HANZI, name)) { }
// return ResponseDto.failure(ErrorMapping.get("10103")); AdamRealInfoVo realInfoVoByUidPlain = adamRdmService.getRealInfoVoByUidPlain(uid);
// } if (null == realInfoVoByUidPlain || 3 != realInfoVoByUidPlain.getNode()) {
// if (!java.util.regex.Pattern.matches(LnsRegex.Valid.CN_ID_CARD_REF, idCard)) { return ResponseDto.failure(ErrorMapping.get("10115"));
// return ResponseDto.failure(ErrorMapping.get("10104")); }
// } AdamUserIdentityInfoVo userIdentityInfoVo = AdamUserIdentityInfoVo.getNew();
// if (IDCardUtil.getAge(idCard) < 18) { userIdentityInfoVo.setUid(uid);
// return ResponseDto.failure(ErrorMapping.get("10100")); userIdentityInfoVo.setName(realInfoVoByUidPlain.getName());
// } userIdentityInfoVo.setMobile(mobile);
// } return ResponseDto.success(userIdentityInfoVo.desensitize());
// String currentUid = CurrentUtil.getCurrentUid(); }
// String mobile = (String) CurrentUtil.getTokenClaims().get(CurrentUtil.TOKEN_MOBILE);
// try { @ApiOperationSupport(order = 12)
// return adamUserBusiAcctService.openAccount(currentUid, bizCode, name, idCard, mobile); @ApiOperation(value = "验证手机号")
// } catch (Exception e) { @ApiImplicitParams({
// if (e instanceof LiquidnetServiceException) { @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "mobile", value = "手机号[用于验证当前账户所绑定手机号]"),
// LiquidnetServiceException lsEx = (LiquidnetServiceException) e; })
// return ResponseDto.failure(lsEx.getCode(), lsEx.getMessage()); @PostMapping(value = {"check/mobile"})
// } public ResponseDto<Object> checkMobile(@NotBlank(message = "手机号不能为空") @Pattern(regexp = "\\d{11}", message = "手机号格式有误") @RequestParam String mobile) {
// return ResponseDto.failure(ErrorMapping.get("10113")); String currentMobile = (String) CurrentUtil.getTokenClaims().get(CurrentUtil.TOKEN_MOBILE);
// } return mobile.equals(currentMobile) ? ResponseDto.success() : ResponseDto.failure(ErrorMapping.get("10003"));
// } }
/* ---------------------------- Internal Method ---------------------------- */ /* ---------------------------- Internal Method ---------------------------- */
......
...@@ -21,6 +21,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -21,6 +21,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -44,6 +45,7 @@ public class AdamMemberOrderServiceImpl implements IAdamMemberOrderService { ...@@ -44,6 +45,7 @@ public class AdamMemberOrderServiceImpl implements IAdamMemberOrderService {
@Autowired @Autowired
IAdamUserMemberService adamUserMemberService; IAdamUserMemberService adamUserMemberService;
@Autowired @Autowired
@Lazy
FeignStoneIntegralClient feignStoneIntegralClient; FeignStoneIntegralClient feignStoneIntegralClient;
......
...@@ -20,9 +20,11 @@ import com.liquidnet.service.base.constant.MQConst; ...@@ -20,9 +20,11 @@ import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.feign.adam.rsc.FeignAdamChimeClient; import com.liquidnet.service.feign.adam.rsc.FeignAdamChimeClient;
import com.liquidnet.service.feign.adam.rsc.FeignAdamStoneClient; import com.liquidnet.service.feign.adam.rsc.FeignAdamStoneClient;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
...@@ -54,8 +56,10 @@ public class AdamUserInfoServiceImpl implements IAdamUserInfoService { ...@@ -54,8 +56,10 @@ public class AdamUserInfoServiceImpl implements IAdamUserInfoService {
private EasemobUtil easemobUtil; private EasemobUtil easemobUtil;
@Autowired @Autowired
@Lazy
private FeignAdamChimeClient feignAdamChimeClient; private FeignAdamChimeClient feignAdamChimeClient;
@Autowired @Autowired
@Lazy
private FeignAdamStoneClient feignAdamStoneClient; private FeignAdamStoneClient feignAdamStoneClient;
@Value("${liquidnet.reviewer.user-info}") @Value("${liquidnet.reviewer.user-info}")
...@@ -158,8 +162,8 @@ public class AdamUserInfoServiceImpl implements IAdamUserInfoService { ...@@ -158,8 +162,8 @@ public class AdamUserInfoServiceImpl implements IAdamUserInfoService {
) { ) {
updateProvinceCityCountyFlg = true; updateProvinceCityCountyFlg = true;
existUserInfoVo.setProvince(province); existUserInfoVo.setProvince(province);
existUserInfoVo.setCity(parameter.getCity()); existUserInfoVo.setCity(city);
existUserInfoVo.setCounty(parameter.getCounty()); existUserInfoVo.setCounty(county);
existUserInfoVo.setArea(province.concat("-").concat(city).concat("-").concat(county)); existUserInfoVo.setArea(province.concat("-").concat(city).concat("-").concat(county));
} }
} }
...@@ -278,13 +282,14 @@ public class AdamUserInfoServiceImpl implements IAdamUserInfoService { ...@@ -278,13 +282,14 @@ public class AdamUserInfoServiceImpl implements IAdamUserInfoService {
String[] mobileLocateArr = adamRdmService.getMobileLocateArr(mobile); String[] mobileLocateArr = adamRdmService.getMobileLocateArr(mobile);
toMqSqls.add(SqlMapping.get("adam_user_mobile_locate.modify_mobile")); toMqSqls.add(SqlMapping.get("adam_user_mobile_locate.modify_mobile"));
if (null != mobileLocateArr && mobileLocateArr.length > 0) { // if (null != mobileLocateArr && mobileLocateArr.length > 0) {
updateUserMobileLocateObjs.add(new Object[]{ updateUserMobileLocateObjs.add(new Object[]{
mobile, mobile,
mobileLocateArr[0], mobileLocateArr[1], mobileLocateArr[2], mobileLocateArr[3], mobileLocateArr[4], // mobileLocateArr[0], mobileLocateArr[1], mobileLocateArr[2], mobileLocateArr[3], mobileLocateArr[4],
ArrayUtils.isEmpty(mobileLocateArr) ? null : mobileLocateArr[2],
now, uid now, uid
}); });
} // }
s = System.currentTimeMillis(); s = System.currentTimeMillis();
queueUtils.sendMsgByRedis(MQConst.AdamQueue.SQL_UCENTER.getKey(), queueUtils.sendMsgByRedis(MQConst.AdamQueue.SQL_UCENTER.getKey(),
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
10000=\u64CD\u4F5C\u8FC7\u4E8E\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5 10000=\u64CD\u4F5C\u8FC7\u4E8E\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5
10001=\u6388\u6743\u5931\u8D25 10001=\u6388\u6743\u5931\u8D25
10002=\u9A8C\u8BC1\u7801\u53D1\u9001\u5931\u8D25 10002=\u9A8C\u8BC1\u7801\u53D1\u9001\u5931\u8D25
10003=\u8BF7\u8F93\u5165\u6B63\u786E\u624B\u673A\u53F7 10003=\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7
10004=\u8BF7\u8F93\u5165\u6B63\u786E\u9A8C\u8BC1\u7801 10004=\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u9A8C\u8BC1\u7801
10005=\u624B\u673A\u53F7\u83B7\u53D6\u5931\u8D25\uFF0C\u8BF7\u66F4\u6362\u767B\u5F55\u65B9\u5F0F 10005=\u624B\u673A\u53F7\u83B7\u53D6\u5931\u8D25\uFF0C\u8BF7\u66F4\u6362\u767B\u5F55\u65B9\u5F0F
10006=\u7B2C\u4E09\u65B9\u8D26\u53F7\u672A\u6CE8\u518C 10006=\u7B2C\u4E09\u65B9\u8D26\u53F7\u672A\u6CE8\u518C
10007=\u8BE5\u7B2C\u4E09\u65B9\u8D26\u53F7\u5DF2\u7ECF\u88AB\u5176\u4ED6\u7528\u6237\u7ED1\u5B9A 10007=\u8BE5\u7B2C\u4E09\u65B9\u8D26\u53F7\u5DF2\u7ECF\u88AB\u5176\u4ED6\u7528\u6237\u7ED1\u5B9A
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
10111=\u519B\u5B98\u8BC1\u53F7\u4E0D\u5408\u89C4 10111=\u519B\u5B98\u8BC1\u53F7\u4E0D\u5408\u89C4
10112=\u8BC1\u4EF6\u4FE1\u606F\u6216\u624B\u673A\u53F7\u4E0D\u4E00\u81F4 10112=\u8BC1\u4EF6\u4FE1\u606F\u6216\u624B\u673A\u53F7\u4E0D\u4E00\u81F4
10113=\u5B9E\u540D\u8BA4\u8BC1\u5931\u8D25 10113=\u5B9E\u540D\u8BA4\u8BC1\u5931\u8D25
10114=\u8BE5\u7528\u6237\u4E0D\u5B58\u5728
10115=\u8BE5\u7528\u6237\u672A\u8FDB\u884C\u5B9E\u540D\u8BA4\u8BC1
10200=\u4EC5\u9650\u4ECE\u672A\u8D2D\u4E70\u8FC7\u4F1A\u5458\u7684\u7528\u6237\u4F7F\u7528 10200=\u4EC5\u9650\u4ECE\u672A\u8D2D\u4E70\u8FC7\u4F1A\u5458\u7684\u7528\u6237\u4F7F\u7528
......
...@@ -73,7 +73,8 @@ adam_user_busi_acct.add=INSERT INTO adam_user_busi_acct (`uid`, busi, uuid, `wor ...@@ -73,7 +73,8 @@ adam_user_busi_acct.add=INSERT INTO adam_user_busi_acct (`uid`, busi, uuid, `wor
# ---------------------------------------------------- # ----------------------------------------------------
adam_user_mobile_locate.add=INSERT INTO adam_user_mobile_locate (`uid`, mobile, `state`, province, city, corp, area_code, post_code, regist_mobile, regist_addr, regist_source, regist_at, latest_addr, latest_source, latest_at, updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) adam_user_mobile_locate.add=INSERT INTO adam_user_mobile_locate (`uid`, mobile, `state`, province, city, corp, area_code, post_code, regist_mobile, regist_addr, regist_source, regist_at, latest_addr, latest_source, latest_at, updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
adam_user_mobile_locate.modify_mobile=UPDATE adam_user_mobile_locate SET mobile=?, province=?, city=?, corp=?, area_code=?, post_code=?, updated_at=? WHERE uid=? AND `state`=1 #adam_user_mobile_locate.modify_mobile=UPDATE adam_user_mobile_locate SET mobile=?, province=?, city=?, corp=?, area_code=?, post_code=?, updated_at=? WHERE uid=? AND `state`=1
adam_user_mobile_locate.modify_mobile=UPDATE adam_user_mobile_locate SET mobile=?,corp=?,updated_at=? WHERE uid=? AND `state`=1
adam_user_mobile_locate.real_name=UPDATE adam_user_mobile_locate SET name=?, id_card=?, updated_at=? WHERE uid=? AND `state`=1 adam_user_mobile_locate.real_name=UPDATE adam_user_mobile_locate SET name=?, id_card=?, updated_at=? WHERE uid=? AND `state`=1
adam_user_mobile_locate.update_province=UPDATE adam_user_mobile_locate SET province=?, city=?, county=?, updated_at=? WHERE uid=? AND `state`=1 adam_user_mobile_locate.update_province=UPDATE adam_user_mobile_locate SET province=?, city=?, county=?, updated_at=? WHERE uid=? AND `state`=1
adam_user_mobile_locate.close=UPDATE adam_user_mobile_locate SET `state`=2, updated_at=? WHERE uid=? AND `state`=1 adam_user_mobile_locate.close=UPDATE adam_user_mobile_locate SET `state`=2, updated_at=? WHERE uid=? AND `state`=1
......
...@@ -37,10 +37,15 @@ public class ConsumerCommonBizRedisStreamConfig extends RedisStreamConfig { ...@@ -37,10 +37,15 @@ public class ConsumerCommonBizRedisStreamConfig extends RedisStreamConfig {
@Autowired @Autowired
ConsumerGoblinBizArtworkClqReceiver consumerGoblinBizArtworkClqReceiver; ConsumerGoblinBizArtworkClqReceiver consumerGoblinBizArtworkClqReceiver;
@Autowired @Autowired
ConsumerGoblinBizArtworkTransQueryReceiver consumerGoblinBizArtworkTransQueryReceiver;
/*------galaxy------*/
@Autowired
ConsumerGalaxyJsonNftPublishAndBuyReceiver jsonNftPublishAndBuyReceiver; ConsumerGalaxyJsonNftPublishAndBuyReceiver jsonNftPublishAndBuyReceiver;
@Autowired @Autowired
ConsumerGalaxyJsonNftUserRegisterReceiver jsonNftUserRegisterReceiver; ConsumerGalaxyJsonNftUserRegisterReceiver jsonNftUserRegisterReceiver;
@Autowired @Autowired
ConsumerGalaxyJsonNftTransferReceiver jsonNftTransferReceiver;
@Autowired
ConsumerGoblinBizIntegralReceiver consumerGoblinBizIntegralReceiver; ConsumerGoblinBizIntegralReceiver consumerGoblinBizIntegralReceiver;
/*------sweet------*/ /*------sweet------*/
@Autowired @Autowired
...@@ -133,6 +138,22 @@ public class ConsumerCommonBizRedisStreamConfig extends RedisStreamConfig { ...@@ -133,6 +138,22 @@ public class ConsumerCommonBizRedisStreamConfig extends RedisStreamConfig {
return subscriptionList; return subscriptionList;
} }
@Bean
public List<Subscription> subscriptionGoblinBizArtworkTransQuery(RedisConnectionFactory factory) {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GoblinQueue stream = MQConst.GoblinQueue.BIZ_ARTWORK_TRANS_QUERY;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 1; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
StreamOffset.create(stream.getKey(), ReadOffset.lastConsumed()), consumerGoblinBizArtworkTransQueryReceiver
));
listenerContainer.start();
}
return subscriptionList;
}
/** /**
* galaxy发行和购买 * galaxy发行和购买
* @param factory * @param factory
...@@ -177,6 +198,28 @@ public class ConsumerCommonBizRedisStreamConfig extends RedisStreamConfig { ...@@ -177,6 +198,28 @@ public class ConsumerCommonBizRedisStreamConfig extends RedisStreamConfig {
return subscriptionList; return subscriptionList;
} }
/**
* Galaxy nft转让
* @param factory
* @return
*/
@Bean
public List<Subscription> subscriptionGalaxyJsonNftTransfer(RedisConnectionFactory factory) {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GalaxyQueue stream = MQConst.GalaxyQueue.JSON_NFT_TRANSFER;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 10; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
StreamOffset.create(stream.getKey(), ReadOffset.lastConsumed()), jsonNftTransferReceiver
));
listenerContainer.start();
}
return subscriptionList;
}
@Bean // 增减积分 @Bean // 增减积分
public List<Subscription> subscriptionGoblinBizIntegral(RedisConnectionFactory factory) { public List<Subscription> subscriptionGoblinBizIntegral(RedisConnectionFactory factory) {
List<Subscription> subscriptionList = new ArrayList<>(); List<Subscription> subscriptionList = new ArrayList<>();
......
...@@ -71,6 +71,7 @@ public class ConsumerCommonSqlRedisStreamConfig extends RedisStreamConfig { ...@@ -71,6 +71,7 @@ public class ConsumerCommonSqlRedisStreamConfig extends RedisStreamConfig {
ConsumerSlimeSqlLineReceiver consumerSlimeSqlLineReceiver; ConsumerSlimeSqlLineReceiver consumerSlimeSqlLineReceiver;
@Autowired @Autowired
ConsumerSlimeSqlPerformanceInsertReceiver consumerSlimeSqlPerformanceInsertReceiver; ConsumerSlimeSqlPerformanceInsertReceiver consumerSlimeSqlPerformanceInsertReceiver;
/*------galaxy------*/
@Autowired @Autowired
ConsumerGalaxySqlUserInfoReceiver consumerGalaxySqlUserInfoReceiver; ConsumerGalaxySqlUserInfoReceiver consumerGalaxySqlUserInfoReceiver;
@Autowired @Autowired
......
package com.liquidnet.service.consumer.base.receiver;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.codec.util.CodecUtil;
import com.liquidnet.service.base.codec.vo.EncryptedReq;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftTransferReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftTransferRespDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.connection.stream.StreamRecords;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.util.HashMap;
@Slf4j
@Component
public class ConsumerGalaxyJsonNftTransferReceiver extends AbstractBizRedisReceiver {
@Value("${liquidnet.service.goblin.url}")
private String serviceGoblinUrl;
@Override
protected boolean consumerMessageHandler(String msg) {
boolean aBoolean = false;
try {
GalaxyNftTransferReqDto textMessage = JsonUtils.fromJson(msg, GalaxyNftTransferReqDto.class);
if (textMessage == null) {
aBoolean = true;
} else {
//执行计数
ResponseDto<GalaxyNftTransferRespDto> responseDto = this.nftTransfer(textMessage);
if(responseDto.isSuccess()){
aBoolean = true;
}
}
} catch (Exception e) {
log.error("CONSUMER MSG EX_HANDLE ==> [{}]:{}", this.getRedisStreamKey(), msg, e);
} finally {
if (!aBoolean) {
HashMap<String, String> map = CollectionUtil.mapStringString();
map.put("message", msg);
stringRedisTemplate.opsForStream().add(StreamRecords.mapBacked(map).withStreamKey(this.getRedisStreamKey()));
}
}
return aBoolean;
}
@Override
protected String getRedisStreamKey() {
return MQConst.GalaxyQueue.JSON_NFT_TRANSFER.getKey();
}
@Override
protected String getRedisStreamGroup() {
return MQConst.GalaxyQueue.JSON_NFT_TRANSFER.getGroup();
}
// /**
// * 执行nft转让
// * @param reqDto
// * @return
// */
// private ResponseDto<GalaxyNftTransferRespDto> nftTransfer(GalaxyNftTransferReqDto reqDto) {
// String postUrl = serviceGoblinUrl + "/goblin/nftTrade/que/nftTransfer";
// try {
// String postRespStr = HttpUtil.postJson(postUrl, JsonUtils.toJson(reqDto));
// ResponseDto responseDto = JsonUtils.fromJson(postRespStr, ResponseDto.class);
// return responseDto;
// } catch (Exception e) {
// log.error("Ex.NFT转让:请求异常[url={},paramsStr={}],ex:{}", postUrl, JsonUtils.toJson(reqDto), e.getMessage());
// return ResponseDto.failure();
// }
// }
/**
* 执行nft转让
* @param reqDto
* @return
*/
private ResponseDto<GalaxyNftTransferRespDto> nftTransfer(GalaxyNftTransferReqDto reqDto) {
log.info("nftTransfer request queue message:{}", JsonUtils.toJson(reqDto));
String postUrl = serviceGoblinUrl + "/goblin/nftTrade/que/nftTransfer";
try {
//获取摘要
Long timeStamp = DateUtil.asDate(LocalDateTime.now()).getTime();
String encryptedData = CodecUtil.aesEncrypt(JsonUtils.toJson(reqDto));
log.info("加密后的数据:" + encryptedData);
String sign = CodecUtil.sha1Encrypt(encryptedData + timeStamp);
log.info("签名:" + sign);
// //设置header
// MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
// header.add("signData",sign);
EncryptedReq<GalaxyNftTransferReqDto> encryptedReq = new EncryptedReq<>();
encryptedReq.setEncryptedData(encryptedData);
encryptedReq.setTimestamp(timeStamp);
encryptedReq.setSign(sign);
encryptedReq.setData(reqDto);
String postRespStr = HttpUtil.postJson(postUrl, JsonUtils.toJson(encryptedReq));
ResponseDto responseDto = JsonUtils.fromJson(postRespStr, ResponseDto.class);
return responseDto;
} catch (Exception e) {
log.error("Ex.NFT转让:请求异常[url={},paramsStr={}],ex:{}", postUrl, JsonUtils.toJson(reqDto), e.getMessage());
return ResponseDto.failure();
}
}
}
package com.liquidnet.service.consumer.base.receiver; package com.liquidnet.service.consumer.base.receiver;
import com.fasterxml.jackson.databind.JsonNode;
import com.liquidnet.commons.lang.util.CollectionUtil; import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.HttpUtil; import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.constant.MQConst; import com.liquidnet.service.base.constant.MQConst;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -77,12 +75,12 @@ public class ConsumerGoblinBizArtworkClqReceiver extends AbstractBizRedisReceive ...@@ -77,12 +75,12 @@ public class ConsumerGoblinBizArtworkClqReceiver extends AbstractBizRedisReceive
// 失败重新入队逻辑改至`被调用API`实现 // 失败重新入队逻辑改至`被调用API`实现
// JsonNode postRespJNode = JsonUtils.fromJson(postRespStr, JsonNode.class), postRespCode; // JsonNode postRespJNode = JsonUtils.fromJson(postRespStr, JsonNode.class), postRespCode;
// if (null == postRespJNode || null == (postRespCode = postRespJNode.get("code")) || !postRespCode.asText().equals("0")) { // if (null == postRespJNode || null == (postRespCode = postRespJNode.get("code")) || !postRespCode.asText().equals("0")) {
// log.warn("#NFT声明查询:处理失败[paramsStr={},postRespStr={}]", postDataMap, postRespStr); // log.warn("#藏品声明查询:处理失败[paramsStr={},postRespStr={}]", postDataMap, postRespStr);
// return false; // return false;
// } // }
return true; return true;
} catch (Exception e) { } catch (Exception e) {
log.error("Ex.NFT声明查询:处理异常[url={},paramsStr={}],ex:{}", postUrl, postDataMap, e.getMessage()); log.error("Ex.藏品声明查询:处理异常[url={},paramsStr={}],ex:{}", postUrl, postDataMap, e.getMessage());
return false; return false;
} }
} }
......
package com.liquidnet.service.consumer.base.receiver;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.service.base.constant.MQConst;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.connection.stream.StreamRecords;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import java.time.Duration;
import java.time.LocalDateTime;
import java.util.HashMap;
@Slf4j
@Component
public class ConsumerGoblinBizArtworkTransQueryReceiver extends AbstractBizRedisReceiver {
@Value("${liquidnet.service.goblin.url}")
private String serviceGoblinUrl;
@Override
protected boolean consumerMessageHandler(String msg) {
boolean aBoolean = false;
try {
if (StringUtils.isEmpty(msg)) {
log.warn("CONSUMER MSG NULL_MSG ==> [{}]:{}", this.getRedisStreamKey(), msg);
aBoolean = true;
} else {
String[] msgArr = msg.split(",");
String bizId = msgArr[0], time = msgArr.length == 2 ? msgArr[1] : null;
LocalDateTime now = LocalDateTime.now(), checkTime = now.minusSeconds(15);
LocalDateTime createAt = StringUtils.isEmpty(time) ? checkTime : LocalDateTime.parse(time);
long durationToMillis = Duration.between(createAt, checkTime).toMillis();
if (durationToMillis >= 0) {
aBoolean = this.bizArtworkTransQueryProcessing(bizId);
} else {
try {
Thread.sleep(Math.abs(durationToMillis));
} catch (InterruptedException ignored) {
}
aBoolean = this.bizArtworkTransQueryProcessing(bizId);
}
}
} catch (Exception e) {
log.error("CONSUMER MSG EX_HANDLE ==> [{}]:{}", this.getRedisStreamKey(), msg, e);
} finally {
if (!aBoolean) {
HashMap<String, String> map = CollectionUtil.mapStringString();
map.put(MQConst.QUEUE_MESSAGE_KEY, msg);
stringRedisTemplate.opsForStream().add(StreamRecords.mapBacked(map).withStreamKey(this.getRedisStreamKey()));
}
}
return aBoolean;
}
@Override
protected String getRedisStreamKey() {
return MQConst.GoblinQueue.BIZ_ARTWORK_TRANS_QUERY.getKey();
}
@Override
protected String getRedisStreamGroup() {
return MQConst.GoblinQueue.BIZ_ARTWORK_TRANS_QUERY.getGroup();
}
private boolean bizArtworkTransQueryProcessing(String artworkId) {
String postUrl = serviceGoblinUrl + "/goblin/que/artwork/transQuery";
LinkedMultiValueMap<String, String> postDataMap = CollectionUtil.linkedMultiValueMapStringString();
try {
postDataMap.add("artworkId", artworkId);
String postRespStr = HttpUtil.post(postUrl, postDataMap);
// 失败重新入队逻辑改至`被调用API`实现
// JsonNode postRespJNode = JsonUtils.fromJson(postRespStr, JsonNode.class), postRespCode;
// if (null == postRespJNode || null == (postRespCode = postRespJNode.get("code")) || !postRespCode.asText().equals("0")) {
// log.warn("#藏品转赠结果查询:处理失败[paramsStr={},postRespStr={}]", postDataMap, postRespStr);
// return false;
// }
return true;
} catch (Exception e) {
log.error("Ex.藏品转赠结果查询:处理异常[url={},paramsStr={}],ex:{}", postUrl, postDataMap, e.getMessage());
return false;
}
}
/* ------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------ */
}
package com.liquidnet.service.consumer.base.receiver; package com.liquidnet.service.consumer.base.receiver;
import com.fasterxml.jackson.databind.JsonNode;
import com.liquidnet.commons.lang.util.CollectionUtil; import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.HttpUtil; import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.constant.MQConst; import com.liquidnet.service.base.constant.MQConst;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -61,12 +59,12 @@ public class ConsumerGoblinBizArtworkUplReceiver extends AbstractBizRedisReceive ...@@ -61,12 +59,12 @@ public class ConsumerGoblinBizArtworkUplReceiver extends AbstractBizRedisReceive
// 失败重新入队逻辑改至`被调用API`实现 // 失败重新入队逻辑改至`被调用API`实现
// JsonNode postRespJNode = JsonUtils.fromJson(postRespStr, JsonNode.class), postRespCode; // JsonNode postRespJNode = JsonUtils.fromJson(postRespStr, JsonNode.class), postRespCode;
// if (null == postRespJNode || null == (postRespCode = postRespJNode.get("code")) || !postRespCode.asText().equals("0")) { // if (null == postRespJNode || null == (postRespCode = postRespJNode.get("code")) || !postRespCode.asText().equals("0")) {
// log.warn("#NFT素材上传:处理失败[paramsStr={},postRespStr={}]", postDataMap, postRespStr); // log.warn("#藏品素材上传:处理失败[paramsStr={},postRespStr={}]", postDataMap, postRespStr);
// return false; // return false;
// } // }
return true; return true;
} catch (Exception e) { } catch (Exception e) {
log.error("Ex.NFT素材上传:处理异常[url={},paramsStr={}],ex:{}", postUrl, postDataMap, e.getMessage()); log.error("Ex.藏品素材上传:处理异常[url={},paramsStr={}],ex:{}", postUrl, postDataMap, e.getMessage());
return false; return false;
} }
} }
......
...@@ -6,8 +6,12 @@ import com.liquidnet.commons.lang.util.StringUtil; ...@@ -6,8 +6,12 @@ import com.liquidnet.commons.lang.util.StringUtil;
import com.liquidnet.service.galaxy.constant.GalaxyEnum; import com.liquidnet.service.galaxy.constant.GalaxyEnum;
import com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBo; import com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBo;
import com.liquidnet.service.galaxy.dto.bo.GalaxySeriesNftInfoBo; import com.liquidnet.service.galaxy.dto.bo.GalaxySeriesNftInfoBo;
import com.liquidnet.service.galaxy.dto.bo.GalaxyTransferNftInfoBo;
import com.liquidnet.service.galaxy.dto.bo.GalaxyUserInfoBo; import com.liquidnet.service.galaxy.dto.bo.GalaxyUserInfoBo;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto; import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftTransferQueryRespDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftTransferReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftTransferRespDto;
import com.liquidnet.service.galaxy.dto.vo.mongo.GalaxyNftOrderFailLogVo; import com.liquidnet.service.galaxy.dto.vo.mongo.GalaxyNftOrderFailLogVo;
import com.liquidnet.service.galaxy.dto.vo.mongo.GalaxyNftTradeVo; import com.liquidnet.service.galaxy.dto.vo.mongo.GalaxyNftTradeVo;
import com.liquidnet.service.galaxy.utils.GalaxyDataUtils; import com.liquidnet.service.galaxy.utils.GalaxyDataUtils;
...@@ -136,4 +140,69 @@ public class GalaxyBeanTransferBiz { ...@@ -136,4 +140,69 @@ public class GalaxyBeanTransferBiz {
nftTradeVo.setCreatedAt(DateUtil.getNowTime()); nftTradeVo.setCreatedAt(DateUtil.getNowTime());
return nftTradeVo; return nftTradeVo;
} }
/**
* 构造nft转让信息
* @param reqDto
* @param userInfoBo
* @param receiveUserInfoBo
* @return
*/
public GalaxyTransferNftInfoBo buildTransferNftInfoBo(GalaxyNftTransferReqDto reqDto,GalaxyUserInfoBo userInfoBo,GalaxyUserInfoBo receiveUserInfoBo){
GalaxyTransferNftInfoBo transferNftInfoBo = GalaxyTransferNftInfoBo.getNew();
transferNftInfoBo.setTransOrderId(reqDto.getTransOrderId());
transferNftInfoBo.setNftId(reqDto.getNftId());
transferNftInfoBo.setUserId(reqDto.getUserId());
transferNftInfoBo.setAddress(userInfoBo.getBlockChainAddress());
transferNftInfoBo.setReceiveUserId(reqDto.getReceiveUserId());
transferNftInfoBo.setReceiveAddress(receiveUserInfoBo.getBlockChainAddress());
transferNftInfoBo.setOwnerUserId(null);
transferNftInfoBo.setOwnerAddress(null);
transferNftInfoBo.setSeriesId(null);
transferNftInfoBo.setRouterType(reqDto.getRouterType());
transferNftInfoBo.setTransferStatus(GalaxyEnum.NftTransferStatusEnum.INIT.getCode());
transferNftInfoBo.setTransferHash(null);
transferNftInfoBo.setErrorCode(null);
transferNftInfoBo.setErrorMsg(null);
transferNftInfoBo.setCreatedAt(DateUtil.getNowTime());
transferNftInfoBo.setUpdatedAt(null);
return transferNftInfoBo;
}
/**
* 构造nft转让返回结果
* @param reqDto
* @param userInfoBo
* @param receiveUserInfoBo
* @return
*/
public GalaxyNftTransferRespDto buildNftTransferRespDto(GalaxyNftTransferReqDto reqDto,GalaxyUserInfoBo userInfoBo,GalaxyUserInfoBo receiveUserInfoBo,GalaxyTransferNftInfoBo transferNftInfoBo){
GalaxyNftTransferRespDto respDto = GalaxyNftTransferRespDto.getNew();
respDto.setNftId(reqDto.getNftId());
respDto.setOwnerUserId(receiveUserInfoBo.getUserId());
respDto.setOwnerAddress(receiveUserInfoBo.getBlockChainAddress());
respDto.setFromUserId(userInfoBo.getUserId());
respDto.setFromAddress(userInfoBo.getBlockChainAddress());
respDto.setTransferTime(DateUtil.getNowTime());
respDto.setTransferHash(transferNftInfoBo.getTransferHash());
return respDto;
}
/**
* 构造nft转让结果查询
* @param transferNftInfoBo
* @return
*/
public GalaxyNftTransferQueryRespDto buildNftTransferQueryRespDto(GalaxyTransferNftInfoBo transferNftInfoBo){
GalaxyNftTransferQueryRespDto nftTransferQueryRespDto = GalaxyNftTransferQueryRespDto.getNew();
nftTransferQueryRespDto.setNftId(transferNftInfoBo.getNftId());
nftTransferQueryRespDto.setOwnerUserId(transferNftInfoBo.getOwnerUserId());
nftTransferQueryRespDto.setOwnerAddress(transferNftInfoBo.getOwnerAddress());
nftTransferQueryRespDto.setFromUserId(transferNftInfoBo.getUserId());
nftTransferQueryRespDto.setFromAddress(transferNftInfoBo.getAddress());
nftTransferQueryRespDto.setTransferTime(transferNftInfoBo.getCreatedAt());
nftTransferQueryRespDto.setRouterType(transferNftInfoBo.getRouterType());
nftTransferQueryRespDto.setTransferHash(transferNftInfoBo.getTransferHash());
return nftTransferQueryRespDto;
}
} }
...@@ -179,4 +179,53 @@ public class GalaxyEnumBiz { ...@@ -179,4 +179,53 @@ public class GalaxyEnumBiz {
} }
return taskStatusEnum; return taskStatusEnum;
} }
/**
* 资产转让状态转换
* @param routerType
* @param code
* @return
*/
public static GalaxyEnum.NftTransferStatusEnum getTransStatusEnum(String routerType, String code){
GalaxyEnum.NftTransferStatusEnum rsStatusEnum = null;
switch (routerType){
case "zxinchain":
if(code.equalsIgnoreCase(ZxlnftEnum.TaskStatusEnum.PROCESSING.getCode())){
rsStatusEnum = GalaxyEnum.NftTransferStatusEnum.PROCESSING;
break;
}else if(code.equalsIgnoreCase(ZxlnftEnum.TaskStatusEnum.TASK_SUCCESS.getCode())){
rsStatusEnum = GalaxyEnum.NftTransferStatusEnum.SUCCESS;
break;
}else if(code.equalsIgnoreCase(ZxlnftEnum.TaskStatusEnum.TASK_FAIL.getCode())){
rsStatusEnum = GalaxyEnum.NftTransferStatusEnum.FAIL;
break;
}
case "antchain":
if(code.equalsIgnoreCase(AntchainEnum.TaskStatusEnum.PROCESSING.getCode())){
rsStatusEnum = GalaxyEnum.NftTransferStatusEnum.PROCESSING;
break;
}else if(code.equalsIgnoreCase(AntchainEnum.TaskStatusEnum.TASK_SUCCESS.getCode())){
rsStatusEnum = GalaxyEnum.NftTransferStatusEnum.SUCCESS;
break;
}else if(code.equalsIgnoreCase(AntchainEnum.TaskStatusEnum.TASK_FAIL.getCode())){
rsStatusEnum = GalaxyEnum.NftTransferStatusEnum.FAIL;
break;
}
case "xuper":
if(code.equalsIgnoreCase(XuperEnum.AssetGrantStatusEnum.TRANSFERING.getCode())){
rsStatusEnum = GalaxyEnum.NftTransferStatusEnum.PROCESSING;
break;
}else if(code.equalsIgnoreCase(XuperEnum.AssetGrantStatusEnum.GRANT_SUCCESS.getCode())){
rsStatusEnum = GalaxyEnum.NftTransferStatusEnum.SUCCESS;
break;
}else if(code.equalsIgnoreCase(XuperEnum.AssetGrantStatusEnum.CANCELING.getCode())
||code.equalsIgnoreCase(XuperEnum.AssetGrantStatusEnum.CANCELED.getCode())
||code.equalsIgnoreCase(XuperEnum.AssetGrantStatusEnum.OTHER_ERROR.getCode())
){
rsStatusEnum = GalaxyEnum.NftTransferStatusEnum.FAIL;
break;
}
}
return rsStatusEnum;
}
} }
\ No newline at end of file
...@@ -8,12 +8,13 @@ import com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBindBo; ...@@ -8,12 +8,13 @@ import com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBindBo;
import com.liquidnet.service.galaxy.dto.bo.GalaxySeriesNftInfoBo; import com.liquidnet.service.galaxy.dto.bo.GalaxySeriesNftInfoBo;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto; import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyRespDto; import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyRespDto;
import com.liquidnet.service.galaxy.router.zxin.biz.ZxinTradeCommonBiz; import com.liquidnet.service.galaxy.service.IGalaxyTradeService;
import com.liquidnet.service.galaxy.utils.GalaxyDataUtils; import com.liquidnet.service.galaxy.utils.GalaxyDataUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
...@@ -32,8 +33,8 @@ public class GalaxyTradeBiz { ...@@ -32,8 +33,8 @@ public class GalaxyTradeBiz {
@Autowired @Autowired
private GalaxyDataUtils dataUtils; private GalaxyDataUtils dataUtils;
@Autowired @Resource(name = "galaxyTradeServiceImpl")
private ZxinTradeCommonBiz zxinTradeCommonBiz; private IGalaxyTradeService galaxyTradeService;
/** /**
* 根据skuid和nftIndex判断是否切换nft购买订单 * 根据skuid和nftIndex判断是否切换nft购买订单
* @param skuid * @param skuid
...@@ -71,7 +72,7 @@ public class GalaxyTradeBiz { ...@@ -71,7 +72,7 @@ public class GalaxyTradeBiz {
//执行nft购买订单切换 //执行nft购买订单切换
log.info("开始执行nft购买订单切换===>>>>> reqParam:{}", JsonUtils.toJson(reqDto)); log.info("开始执行nft购买订单切换===>>>>> reqParam:{}", JsonUtils.toJson(reqDto));
ResponseDto<GalaxyNftPublishAndBuyRespDto> responseDto = zxinTradeCommonBiz.nftPublishAndBuy(reqDto); ResponseDto<GalaxyNftPublishAndBuyRespDto> responseDto = galaxyTradeService.nftPublishAndBuy(reqDto);
log.info("执行nft购买订单切换结果===>>>>> response:{}",JsonUtils.toJson(responseDto)); log.info("执行nft购买订单切换结果===>>>>> response:{}",JsonUtils.toJson(responseDto));
} }
} }
...@@ -13,6 +13,7 @@ import com.liquidnet.commons.lang.util.StringUtil; ...@@ -13,6 +13,7 @@ import com.liquidnet.commons.lang.util.StringUtil;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.biz.GalaxyBeanTransferBiz; import com.liquidnet.service.galaxy.biz.GalaxyBeanTransferBiz;
import com.liquidnet.service.galaxy.biz.GalaxyEnumBiz; import com.liquidnet.service.galaxy.biz.GalaxyEnumBiz;
import com.liquidnet.service.galaxy.biz.GalaxyTradeBiz;
import com.liquidnet.service.galaxy.constant.GalaxyEnum; import com.liquidnet.service.galaxy.constant.GalaxyEnum;
import com.liquidnet.service.galaxy.constant.GalaxyErrorEnum; import com.liquidnet.service.galaxy.constant.GalaxyErrorEnum;
import com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBindBo; import com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBindBo;
...@@ -30,6 +31,8 @@ import org.springframework.stereotype.Component; ...@@ -30,6 +31,8 @@ import org.springframework.stereotype.Component;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/** /**
* @author AnJiabin <anjiabin@zhengzai.tv> * @author AnJiabin <anjiabin@zhengzai.tv>
...@@ -55,6 +58,11 @@ public class XuperTradeCommonBiz { ...@@ -55,6 +58,11 @@ public class XuperTradeCommonBiz {
@Autowired @Autowired
private GalaxyBeanTransferBiz galaxyBeanTransferBiz; private GalaxyBeanTransferBiz galaxyBeanTransferBiz;
@Autowired
private GalaxyTradeBiz galaxyTradeBiz;
private ExecutorService executorService = Executors.newFixedThreadPool(10);
/** /**
* 发行和购买 * 发行和购买
* @param reqDto * @param reqDto
...@@ -139,6 +147,17 @@ public class XuperTradeCommonBiz { ...@@ -139,6 +147,17 @@ public class XuperTradeCommonBiz {
//发行失败 //发行失败
throw new GalaxyNftPublishException(GalaxyErrorEnum.NFT_PUBLISH_ERROR.getCode(),"该sku:"+reqDto.getSkuId()+" 总共"+seriesNftInfoBo.getNftTotalCount()+"个NFT已经发行完毕,没有剩余库存!"); throw new GalaxyNftPublishException(GalaxyErrorEnum.NFT_PUBLISH_ERROR.getCode(),"该sku:"+reqDto.getSkuId()+" 总共"+seriesNftInfoBo.getNftTotalCount()+"个NFT已经发行完毕,没有剩余库存!");
} }
//判断是否切换订单
while(galaxyTradeBiz.isNeedSwitch(reqDto.getSkuId(),String.valueOf(nftIdNo))){
long finalNftIdNo = nftIdNo;
//开启新线程去执行购买
executorService.submit(() -> {
galaxyTradeBiz.switchBuyRouterBySkuId(reqDto.getSkuId(),String.valueOf(finalNftIdNo),seriesNftInfoBo);
});
nftIdNo = dataUtils.incrNftIdNo(reqDto.getRouterType(),reqDto.getSkuId());
}
nftOrderBindBo = GalaxyNftOrderBindBo.getNew(); nftOrderBindBo = GalaxyNftOrderBindBo.getNew();
nftOrderBindBo.setNftOrderPayId(reqDto.getNftOrderPayId()); nftOrderBindBo.setNftOrderPayId(reqDto.getNftOrderPayId());
nftOrderBindBo.setSeriesId(seriesNftInfoBo.getSeriesId()); nftOrderBindBo.setSeriesId(seriesNftInfoBo.getSeriesId());
......
...@@ -532,4 +532,65 @@ public abstract class AbstractDataUtils { ...@@ -532,4 +532,65 @@ public abstract class AbstractDataUtils {
} }
return null; return null;
} }
/**
* 创建nft转让信息
* @param routerType
* @param transOrderId
* @param transferNftInfoBo
*/
public void setGalaxyTransferNftInfoBo(String routerType,String transOrderId, GalaxyTransferNftInfoBo transferNftInfoBo) {
this.getRedisUtil().set(GalaxyConstant.REDIS_KEY_GALAXY_TRANSFER_ORDER.concat(routerType).concat(":") + transOrderId,transferNftInfoBo);
try{
this.getQueueUtil().sendMySqlRedis(
SqlMapping.get("galaxy_nft_transfer_info.insert"),
new Object[]{transferNftInfoBo.getTransOrderId(),transferNftInfoBo.getNftId(),transferNftInfoBo.getUserId(),transferNftInfoBo.getAddress(),transferNftInfoBo.getReceiveUserId(),transferNftInfoBo.getReceiveAddress(),
transferNftInfoBo.getOwnerUserId(),transferNftInfoBo.getOwnerAddress(),transferNftInfoBo.getTransferHash(),transferNftInfoBo.getSeriesId(),transferNftInfoBo.getRouterType(),
transferNftInfoBo.getTransferStatus(),transferNftInfoBo.getErrorCode(),transferNftInfoBo.getErrorMsg(),transferNftInfoBo.getCreatedAt(),transferNftInfoBo.getUpdatedAt()}
, MQConst.GalaxyQueue.SQL_NFT_TRADE_INFO.getKey()
);
}catch(Exception e){
log.error(e.getMessage(),e);
log.error("#setGalaxyTransferNftInfoBo error ==> MESSAGE:{}",e.getMessage());
}
}
/**
* 获取nft转让信息
* @param routerType
* @param transOrderId
* @return
*/
public GalaxyTransferNftInfoBo getGalaxyTransferNftInfoBo(String routerType,String transOrderId) {
String redisKey = GalaxyConstant.REDIS_KEY_GALAXY_TRANSFER_ORDER.concat(routerType).concat(":") + transOrderId;
Object obj = this.getRedisUtil().get(redisKey);
if(obj!=null){
return (GalaxyTransferNftInfoBo) obj;
}
return null;
}
/**
* 更新nft转移信息
* @param routerType
* @param transOrderId
* @param transferNftInfoBo
*/
public void updateTransferNftInfoBo(String routerType,String transOrderId, GalaxyTransferNftInfoBo transferNftInfoBo) {
this.getRedisUtil().set(GalaxyConstant.REDIS_KEY_GALAXY_TRANSFER_ORDER.concat(routerType).concat(":") + transOrderId,transferNftInfoBo);
try{
this.getQueueUtil().sendMySqlRedis(
SqlMapping.get("galaxy_nft_transfer_info.updateNftTransferInfo"),
new Object[]{transferNftInfoBo.getOwnerUserId(),transferNftInfoBo.getOwnerAddress(),transferNftInfoBo.getTransferHash(),
transferNftInfoBo.getTransferStatus(),transferNftInfoBo.getErrorCode(),transferNftInfoBo.getErrorMsg()
,transferNftInfoBo.getUpdatedAt(),transferNftInfoBo.getTransOrderId()}
, MQConst.GalaxyQueue.SQL_NFT_TRADE_INFO.getKey()
);
}catch(Exception e){
log.error(e.getMessage(),e);
log.error("#setGalaxyTransferNftInfoBo error ==> MESSAGE:{}",e.getMessage());
}
}
} }
...@@ -10,6 +10,8 @@ galaxy_nft_order_info.insert=insert into galaxy_nft_order_info (nft_order_pay_id ...@@ -10,6 +10,8 @@ galaxy_nft_order_info.insert=insert into galaxy_nft_order_info (nft_order_pay_id
galaxy_nft_trade_info.insert=insert into galaxy_nft_trade_info (user_id, nft_id, nft_name, series_name, series_id, series_code, trade_hash,chain_timestamp, from_address, to_address, trade_price, trade_type, router_type,created_at, updated_at)values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) galaxy_nft_trade_info.insert=insert into galaxy_nft_trade_info (user_id, nft_id, nft_name, series_name, series_id, series_code, trade_hash,chain_timestamp, from_address, to_address, trade_price, trade_type, router_type,created_at, updated_at)values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
# ------------------------数字藏品发行购买失败记录---------------------------- # ------------------------数字藏品发行购买失败记录----------------------------
galaxy_nft_order_fail_log.insert=insert into galaxy_nft_order_fail_log (nft_order_pay_id, user_id, nft_id, nft_name, series_name, series_id,series_code, taskId, fail_reason_desc, fail_reason_desc_second, deal_with_status, trade_type,router_type, created_at, updated_at)values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) galaxy_nft_order_fail_log.insert=insert into galaxy_nft_order_fail_log (nft_order_pay_id, user_id, nft_id, nft_name, series_name, series_id,series_code, taskId, fail_reason_desc, fail_reason_desc_second, deal_with_status, trade_type,router_type, created_at, updated_at)values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
# ------------------------数字藏品转让记录----------------------------
galaxy_nft_transfer_info.insert=insert into galaxy_nft_transfer_info (trans_order_id,nft_id,user_id, address, receive_user_id, receive_address, owner_user_id,owner_address, transfer_hash, series_id, router_type, transfer_status, error_code,error_msg, created_at, updated_at) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
# ------------------------更新用户注册信息---------------------------- # ------------------------更新用户注册信息----------------------------
galaxy_user_info.update=update galaxy_user_info set user_name = ?,id_card_type = ?,id_card = ?,mobile = ?,block_chain_address = ?,user_identification = ?,updated_at =? where router_type = ? and user_id = ? galaxy_user_info.update=update galaxy_user_info set user_name = ?,id_card_type = ?,id_card = ?,mobile = ?,block_chain_address = ?,user_identification = ?,updated_at =? where router_type = ? and user_id = ?
...@@ -31,3 +33,5 @@ galaxy_nft_order_fail_log.updateDealWithStatus=update galaxy_nft_order_fail_log ...@@ -31,3 +33,5 @@ galaxy_nft_order_fail_log.updateDealWithStatus=update galaxy_nft_order_fail_log
galaxy_series_nft_info.updateSeriesNftPublishStatus=update galaxy_series_nft_info t set t.publish_status = ?,t.publish_trade_hash = ?,t.updated_at =? where t.sku_id = ? galaxy_series_nft_info.updateSeriesNftPublishStatus=update galaxy_series_nft_info t set t.publish_status = ?,t.publish_trade_hash = ?,t.updated_at =? where t.sku_id = ?
# ------------------------同步用户数字账户信息到adam--------------------------- # ------------------------同步用户数字账户信息到adam---------------------------
adam_user_busi_acct.add=INSERT INTO adam_user_busi_acct (`uid`, busi, uuid, `work`, ppwd, `state`, created_at) VALUES (?,?,?,?,?,?,?) adam_user_busi_acct.add=INSERT INTO adam_user_busi_acct (`uid`, busi, uuid, `work`, ppwd, `state`, created_at) VALUES (?,?,?,?,?,?,?)
# ------------------------更新nft转让信息----------------------------
galaxy_nft_transfer_info.updateNftTransferInfo=update galaxy_nft_transfer_info t set t.owner_user_id = ?,t.owner_address = ?,t.transfer_hash =?,t.transfer_status =?,t.error_code =?,t.error_msg =? ,t.updated_at =? where t.trans_order_id = ?
USE dev_ln_scene;
ALTER TABLE goblin_nft_order ADD list_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '分批购ID' after user_mobile;
ALTER TABLE goblin_nft_order ADD ex_code VARCHAR(64) NOT NULL DEFAULT '' COMMENT '兑换码' after list_id;
\ No newline at end of file
...@@ -13,3 +13,30 @@ alter table galaxy_nft_order_fail_log modify series_name varchar(30) not null co ...@@ -13,3 +13,30 @@ alter table galaxy_nft_order_fail_log modify series_name varchar(30) not null co
alter table galaxy_nft_order_info modify series_name varchar(30) not null comment '系列的唯一名称(前缀+skuid)'; alter table galaxy_nft_order_info modify series_name varchar(30) not null comment '系列的唯一名称(前缀+skuid)';
alter table galaxy_nft_trade_info modify series_name varchar(30) not null comment '系列的唯一名称'; alter table galaxy_nft_trade_info modify series_name varchar(30) not null comment '系列的唯一名称';
-- nft转让新增表galaxy_nft_transfer_info
drop TABLE if exists `galaxy_nft_transfer_info`;
create table galaxy_nft_transfer_info
(
mid bigint unsigned NOT NULL AUTO_INCREMENT,
trans_order_id varchar(100) NOT NULL COMMENT '转让订单id',
nft_id varchar(200) COMMENT 'nftId',
user_id varchar(200) NOT NULL COMMENT '用户ID',
address varchar(200) COMMENT '转出方地址',
receive_user_id varchar(200) NOT NULL COMMENT '接收者用户id',
receive_address varchar(200) NOT NULL COMMENT '接收者地址',
owner_user_id varchar(200) COMMENT '拥有者用户id',
owner_address varchar(200) COMMENT '拥有者地址',
transfer_hash varchar(200) COMMENT '转让hash',
series_id varchar(200) COMMENT '系列的唯一Id',
router_type varchar(20) NOT NULL COMMENT '路由类型(zxinchain、eth、antchain)',
transfer_status varchar(30) NOT NULL COMMENT '转让状态(-1初始化 0转让中 1转让成功 2转让失败 )',
error_code varchar(200) COMMENT '错误code',
error_msg varchar(200) COMMENT '错误信息',
created_at timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
updated_at timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`)
) ENGINE = InnoDB comment '数字藏品转让信息';
create index gntri_idx_trans_order_id on galaxy_nft_transfer_info (trans_order_id);
create index gntri_idx_user_id on galaxy_nft_transfer_info (user_id);
create index gntri_idx_nft_id on galaxy_nft_transfer_info (nft_id);
...@@ -1060,10 +1060,121 @@ create table goblin_user_coupon ...@@ -1060,10 +1060,121 @@ create table goblin_user_coupon
) engine = InnoDB comment '商城用户券信息'; ) engine = InnoDB comment '商城用户券信息';
create unique index uidx_guc_ucoupon_id on goblin_user_coupon (ucoupon_id); create unique index uidx_guc_ucoupon_id on goblin_user_coupon (ucoupon_id);
# -- >>------------------------------------------------------------------------------------ |20220323数字藏品NFT
alter table goblin_goods add spu_type tinyint default 0 not null comment '商品类型[0-常规|1-数字藏品]' after spu_no;
alter table goblin_goods add attention varchar(256) null comment '注意事项' after details;
alter table goblin_goods add sale_start_time datetime null comment '开售时间' after shelves_time;
alter table goblin_goods add sale_stop_time datetime null comment '停售时间' after sale_start_time;
alter table goblin_goods add author varchar(100) null comment '创作者' after spu_appear;
alter table goblin_goods add spu_canbuy char null comment '是否购买[0-否|1-是]' after spu_appear;
alter table goblin_goods add publisher varchar(100) null comment '发行方' after author;
# alter table goblin_goods add has_box tinyint default 0 null comment '存在盲盒[0-否|1-是]' after spu_appear;
alter table goblin_goods_sku add sku_type tinyint default 0 not null comment '商品类型[0-常规|1-数字藏品]' after sku_no;
alter table goblin_goods_sku add sku_watch varchar(256) null comment '展示文件URL' after sku_pic;
alter table goblin_goods_sku add watch_type char null comment '展示文件类型[1-图片|2-视频|3-模型]' after sku_watch;
alter table goblin_goods_sku add sku_watch_pic varchar(256) null comment '展示预览图片' after watch_type;
alter table goblin_goods_sku add intro varchar(256) null comment '简介' after weight;
alter table goblin_goods_sku add details text null comment '详情' after intro;
# alter table goblin_goods_sku add gift_stock int null comment '兑换库存' after sku_stock;
alter table goblin_goods_sku add price_v decimal(20, 2) null comment '苹果商品价格' after price;
alter table goblin_goods_sku add product_id varchar(20) null comment '苹果商品价格ID' after price_v;
alter table goblin_goods_sku add shelves_handle char default '1' comment '上架处理方式[1-等待手动上架|2-直接上架售卖|3-预约定时上架]' after store_id;
alter table goblin_goods_sku add shelves_time datetime null comment '预约上架时间[上架处理方式为3-预约定时上架时需要指定]' after shelves_handle;
alter table goblin_goods_sku add sale_start_time datetime null comment '开售时间' after shelves_time;
alter table goblin_goods_sku add sale_stop_time datetime null comment '停售时间' after sale_start_time;
alter table goblin_goods_sku add soldout_status char default '0' not null comment '是否售罄[0-否|1-是]' after shelves_status;
alter table goblin_goods_sku add sku_canbuy char null comment '是否购买[0-否|1-是]' after sku_appear;
alter table goblin_goods_sku add unbox char default '0' not null null comment '是否盲盒[0-否|1-是]' after sku_canbuy;
alter table goblin_goods_sku add hit_ratio decimal(8, 2) null comment '盲盒命中率[0.00~100%],0标识不参与盲盒,null标识均摊' after unbox;
alter table goblin_goods_sku add opening_time datetime null comment '盲盒开启时间' after hit_ratio;
alter table goblin_goods_sku add opening_limit int default 0 comment '盲盒开启时限[单位秒]' after opening_time;
drop table if exists goblin_goods_sku_nft;
create table goblin_goods_sku_nft
(
mid bigint auto_increment primary key,
sku_id varchar(64) not null comment '单品id',
route_type varchar(20) null comment 'NFT路由',
material_type char null comment '素材原始文件类型[1-图片|2-视频|3-模型]',
material_url varchar(256) null comment '素材原始文件URL',
upchain tinyint default 0 comment 'NFT上传声明状态[0-待上传|1-已声明|2-声明失败|9-声明中]',
display_url varchar(500) null comment 'NFT预览图URL',
nft_url varchar(500) null comment 'NFT素材访问URL',
series_id varchar(256) null comment 'NFT系列ID',
series_hash varchar(256) null comment 'NFT系列HASH',
nft_hash varchar(256) null comment 'NFT藏品HASH',
declare_at varchar(25) null comment 'NFT系列声明时间',
created_at datetime not null,
updated_at datetime null,
comment varchar(255)
) engine = InnoDB comment '商品NFT信息';
create unique index uidx_ggsn_sku_id on goblin_goods_sku_nft (sku_id);
drop table if exists goblin_goods_sku_tag;
create table goblin_goods_sku_tag
(
mid bigint auto_increment primary key,
sku_id varchar(64) not null comment '商品id',
tag_id varchar(30) not null comment '标签id,对应 goblin_self_tag.tag_id',
sort int default 0 comment '排序[数值越小,排序越前]',
tag_belong char default '0' comment '标签所属[0-普通标签|1-专属标签]',
del_flg char default '0' comment '删除标记[0-未删除|1-删除]',
comment varchar(255)
) engine = InnoDB comment '商品关联标签';
create unique index uidx_ggst_sku_tag on goblin_goods_sku_tag (sku_id, tag_id);
drop table if exists goblin_user_digital_artwork;
create table goblin_user_digital_artwork
(
mid bigint auto_increment primary key,
artwork_id varchar(64) not null comment '藏品ID',
uid varchar(64) not null comment '用户UID',
sku_id varchar(64) not null comment '单品ID',
order_id varchar(64) not null comment '藏品订单号',
edition_sn int null comment '序列号',
nft_id varchar(256) null comment '藏品NFT ID',
release_txhash varchar(256) null comment '发行HASH',
release_at varchar(25) null comment '发行时间',
trading_txhash varchar(256) null comment '发放HASH',
trading_at varchar(25) null comment '交易时间',
source tinyint null comment '获得方式[1-购买|2-兑换|3-赠送|5-受赠|31-空投赠送]',
state tinyint default 0 comment '藏品状态[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败|5-待收取]',
del_flg char default '0' comment '删除标记[0-未删除|1-删除]',
opening_at datetime null comment '盲盒开启时间',
created_at datetime not null,
updated_at datetime null,
deleted_at datetime null,
comment varchar(500)
) engine = InnoDB comment '用户数字藏品信息';
# -- >>------------------------------------------------------------------------------------ |20220817数字藏品转赠安全密码
alter table goblin_user_digital_artwork
add receiver_uid varchar(20) null comment '受赠人UID' after trading_at;
alter table goblin_user_digital_artwork
add transfer_order_id varchar(20) null comment '转赠订单号' after receiver_uid;
alter table goblin_user_digital_artwork
add transfer_state varchar(20) null comment '转赠状态[PENDING|SUCCESS]' after transfer_order_id;
alter table goblin_user_digital_artwork
modify source tinyint null comment '获得方式[1-购买|2-兑换|3-赠送|5-大美|6-转赠|31-空投赠送]';
drop table if exists goblin_user_safe_config;
create table goblin_user_safe_config
(
mid bigint auto_increment primary key,
uid varchar(64) not null comment 'UID',
passwd varchar(100) comment '安全密码',
state tinyint default 1 comment '0-INIT,1-NORMAL,2-INVALID',
created_at datetime not null,
updated_at datetime null,
comment varchar(500)
) engine = InnoDB comment '用户安全设置';
create unique index idx_gusc_uid on goblin_user_safe_config (uid);
# -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
\ No newline at end of file
package com.liquidnet.service.galaxy.controller; package com.liquidnet.service.galaxy.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.codec.annotation.DecryptAndVerify;
import com.liquidnet.service.base.codec.vo.EncryptedReq;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.galaxy.aop.annotation.ControllerLog; import com.liquidnet.service.galaxy.aop.annotation.ControllerLog;
import com.liquidnet.service.galaxy.constant.GalaxyErrorEnum;
import com.liquidnet.service.galaxy.dto.param.*; import com.liquidnet.service.galaxy.dto.param.*;
import com.liquidnet.service.galaxy.service.IGalaxyTradeService; import com.liquidnet.service.galaxy.service.IGalaxyTradeService;
import com.liquidnet.service.galaxy.utils.QueueUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -32,6 +39,9 @@ import javax.validation.Valid; ...@@ -32,6 +39,9 @@ import javax.validation.Valid;
@Validated @Validated
@Slf4j @Slf4j
public class GalaxyTradeController { public class GalaxyTradeController {
@Autowired
private QueueUtil queueUtil;
@Resource(name = "galaxyTradeServiceImpl") @Resource(name = "galaxyTradeServiceImpl")
private IGalaxyTradeService galaxyTradeService; private IGalaxyTradeService galaxyTradeService;
...@@ -64,14 +74,59 @@ public class GalaxyTradeController { ...@@ -64,14 +74,59 @@ public class GalaxyTradeController {
@ApiOperation(value = "NFT发行购买结果查询") @ApiOperation(value = "NFT发行购买结果查询")
@PostMapping(value = {"nftPublishAndBuyResultQuery"}) @PostMapping(value = {"nftPublishAndBuyResultQuery"})
public ResponseDto<GalaxyNftPublishAndBuyResultQueryRespDto> nftPublishAndBuyResultQuery(@Valid @RequestBody GalaxyNftPublishAndBuyResultQueryReqDto reqDto){ public ResponseDto<GalaxyNftPublishAndBuyResultQueryRespDto> nftPublishAndBuyResultQuery(@Valid @RequestBody GalaxyNftPublishAndBuyResultQueryReqDto reqDto){
try {
Thread.sleep(2000l);
} catch (InterruptedException e) {
e.printStackTrace();
}
return galaxyTradeService.nftPublishAndBuyResultQuery(reqDto); return galaxyTradeService.nftPublishAndBuyResultQuery(reqDto);
} }
// @ControllerLog(description = "NFT转让")
// @ApiOperationSupport(order = 2)
// @ApiOperation(value = "NFT转让")
// @PostMapping(value = {"/que/nftTransfer"})
// public ResponseDto<GalaxyNftTransferRespDto> nftTransfer(@Valid @RequestBody GalaxyNftTransferReqDto reqDto, HttpServletRequest request){
//
//
// ResponseDto<GalaxyNftTransferRespDto> responseDto = galaxyTradeService.nftTransfer(reqDto);
// if(!responseDto.isSuccess()){
// //系统异常允许重试
// if(responseDto.getCode().equalsIgnoreCase(GalaxyErrorEnum.NFT_TRANSFER_ERROR.getCode())){
// queueUtil.sendMsgByRedis(MQConst.GalaxyQueue.JSON_NFT_TRANSFER.getKey(), JsonUtils.toJson(reqDto));
// }
// }
// return ResponseDto.success();
// }
@ControllerLog(description = "NFT转让")
@DecryptAndVerify(decryptedClass = GalaxyNftTransferReqDto.class)
@ApiOperationSupport(order = 2)
@ApiOperation(value = "NFT转让")
@PostMapping(value = {"/que/nftTransfer"})
public ResponseDto<GalaxyNftTransferRespDto> nftTransfer(@Valid @RequestBody EncryptedReq<GalaxyNftTransferReqDto> encryptedReq){
GalaxyNftTransferReqDto reqDto = encryptedReq.getData();
ResponseDto<GalaxyNftTransferRespDto> responseDto = galaxyTradeService.nftTransfer(reqDto);
if(!responseDto.isSuccess()){
//系统异常允许重试
if(responseDto.getCode().equalsIgnoreCase(GalaxyErrorEnum.NFT_TRANSFER_ERROR.getCode())){
queueUtil.sendMsgByRedis(MQConst.GalaxyQueue.JSON_NFT_TRANSFER.getKey(), JsonUtils.toJson(reqDto));
}
}
return ResponseDto.success();
}
@ControllerLog(description = "NFT转让结果查询")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "NFT转让结果查询")
@PostMapping(value = {"nftTransferResultQuery"})
public ResponseDto<GalaxyNftTransferQueryRespDto> nftTransferResultQuery(@Valid @RequestBody GalaxyNftTransferQueryReqDto reqDto){
return galaxyTradeService.nftTransferQuery(reqDto);
}
@ControllerLog(description = "NFT手工转让调试")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "NFT手工转让调试")
@PostMapping(value = {"/manual/nftTransfer"})
public ResponseDto<GalaxyNftTransferRespDto> nftManualTransfer(@Valid @RequestBody GalaxyNftTransferReqDto reqDto){
return galaxyTradeService.nftTransfer(reqDto);
}
// @ControllerLog(description = "NFT发行购买结果批量查询") // @ControllerLog(description = "NFT发行购买结果批量查询")
// @ApiOperationSupport(order = 1) // @ApiOperationSupport(order = 1)
// @ApiOperation(value = "NFT发行购买结果批量查询") // @ApiOperation(value = "NFT发行购买结果批量查询")
......
...@@ -35,18 +35,26 @@ public class GalaxyTradeQueryController { ...@@ -35,18 +35,26 @@ public class GalaxyTradeQueryController {
@Resource(name = "galaxyTradeQueryService") @Resource(name = "galaxyTradeQueryService")
private IGalaxyTradeQueryService galaxyTradeQueryService; private IGalaxyTradeQueryService galaxyTradeQueryService;
@ControllerLog(description = "NFT信息查询") @ControllerLog(description = "NFT购买订单查询")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "NFT信息查询") @ApiOperation(value = "NFT购买订单查询")
@PostMapping(value = {"queryNftInfo"}) @PostMapping(value = {"queryNftInfo"})
public ResponseDto<GalaxyQueryNftInfoRespDto> queryNftInfo(@Valid @RequestBody GalaxyQueryNftInfoReqDto reqDto){ public ResponseDto<GalaxyQueryNftInfoRespDto> queryNftInfo(@Valid @RequestBody GalaxyQueryNftInfoReqDto reqDto){
return galaxyTradeQueryService.queryNftInfo(reqDto); return galaxyTradeQueryService.queryNftInfo(reqDto);
} }
@ControllerLog(description = "NFT转让订单查询")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "NFT转让订单查询(xuper)")
@PostMapping(value = {"queryTransNftInfo"})
public ResponseDto<GalaxyQueryTransNftInfoRespDto> queryTransNftInfo(@Valid @RequestBody GalaxyQueryTransNftInfoReqDto reqDto){
return galaxyTradeQueryService.queryTransNftInfo(reqDto);
}
@ControllerLog(description = "单个NFT交易信息查询") @ControllerLog(description = "NFT交易历史记录查询")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "单个NFT交易信息查询") @ApiOperation(value = "NFT交易历史记录查询")
@PostMapping(value = {"queryNftTradeList"}) @PostMapping(value = {"queryNftTradeList"})
ResponseDto<GalaxyQueryNftTradeListRespDto> queryNftTradeList(@Valid @RequestBody GalaxyQueryNftTradeListReqDto reqDto){ ResponseDto<GalaxyQueryNftTradeListRespDto> queryNftTradeList(@Valid @RequestBody GalaxyQueryNftTradeListReqDto reqDto){
return galaxyTradeQueryService.queryNftTradeList(reqDto); return galaxyTradeQueryService.queryNftTradeList(reqDto);
...@@ -62,7 +70,7 @@ public class GalaxyTradeQueryController { ...@@ -62,7 +70,7 @@ public class GalaxyTradeQueryController {
@ControllerLog(description = "用户系列NFT查询") @ControllerLog(description = "用户系列NFT查询")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "用户系列NFT查询") @ApiOperation(value = "用户系列NFT查询(zxinchain)")
@PostMapping(value = {"queryUserSeriesNftList"}) @PostMapping(value = {"queryUserSeriesNftList"})
ResponseDto<GalaxyQueryUserSeriesNftListRespDto> queryUserSeriesNftList(@Valid @RequestBody GalaxyQueryUserSeriesNftListReqDto reqDto){ ResponseDto<GalaxyQueryUserSeriesNftListRespDto> queryUserSeriesNftList(@Valid @RequestBody GalaxyQueryUserSeriesNftListReqDto reqDto){
return galaxyTradeQueryService.queryUserSeriesNftList(reqDto); return galaxyTradeQueryService.queryUserSeriesNftList(reqDto);
...@@ -78,7 +86,7 @@ public class GalaxyTradeQueryController { ...@@ -78,7 +86,7 @@ public class GalaxyTradeQueryController {
@ControllerLog(description = "用户所有进NFT信息查询") @ControllerLog(description = "用户所有进NFT信息查询")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "用户所有进NFT信息查询") @ApiOperation(value = "用户所有进NFT信息查询(zxinchain)")
@PostMapping(value = {"queryUserTradeInList"}) @PostMapping(value = {"queryUserTradeInList"})
ResponseDto<GalaxyQueryUserTradeInListRespDto> queryUserTradeInList(@Valid @RequestBody GalaxyQueryUserTradeInListReqDto reqDto){ ResponseDto<GalaxyQueryUserTradeInListRespDto> queryUserTradeInList(@Valid @RequestBody GalaxyQueryUserTradeInListReqDto reqDto){
return galaxyTradeQueryService.queryUserTradeInList(reqDto); return galaxyTradeQueryService.queryUserTradeInList(reqDto);
...@@ -86,7 +94,7 @@ public class GalaxyTradeQueryController { ...@@ -86,7 +94,7 @@ public class GalaxyTradeQueryController {
@ControllerLog(description = "用户所有出NFT信息查询") @ControllerLog(description = "用户所有出NFT信息查询")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "用户所有出NFT信息查询") @ApiOperation(value = "用户所有出NFT信息查询(zxinchain)")
@PostMapping(value = {"queryUserTradeOutList"}) @PostMapping(value = {"queryUserTradeOutList"})
ResponseDto<GalaxyQueryUserTradeOutListRespDto> queryUserTradeOutList(@Valid @RequestBody GalaxyQueryUserTradeOutListReqDto reqDto){ ResponseDto<GalaxyQueryUserTradeOutListRespDto> queryUserTradeOutList(@Valid @RequestBody GalaxyQueryUserTradeOutListReqDto reqDto){
return galaxyTradeQueryService.queryUserTradeOutList(reqDto); return galaxyTradeQueryService.queryUserTradeOutList(reqDto);
......
...@@ -51,4 +51,14 @@ public class GalaxyRouterStrategyEthTradeImpl implements IGalaxyRouterStrategyTr ...@@ -51,4 +51,14 @@ public class GalaxyRouterStrategyEthTradeImpl implements IGalaxyRouterStrategyTr
public ResponseDto<GalaxyNftPublishAndBuyRouterBatchQueryRespDto> nftPublishAndBuyResultBatchQuery(GalaxyNftPublishAndBuyRouterBatchQueryReqDto reqDto) { public ResponseDto<GalaxyNftPublishAndBuyRouterBatchQueryRespDto> nftPublishAndBuyResultBatchQuery(GalaxyNftPublishAndBuyRouterBatchQueryReqDto reqDto) {
return null; return null;
} }
@Override
public ResponseDto<GalaxyNftTransferRespDto> nftTransfer(GalaxyNftTransferReqDto reqDto) {
return null;
}
@Override
public ResponseDto<GalaxyNftTransferQueryRespDto> nftTransferQuery(GalaxyNftTransferQueryReqDto reqDto) {
return null;
}
} }
...@@ -28,9 +28,6 @@ public class GalaxyRouterStrategyXuperTradeImpl implements IGalaxyRouterStrategy ...@@ -28,9 +28,6 @@ public class GalaxyRouterStrategyXuperTradeImpl implements IGalaxyRouterStrategy
@Override @Override
public ResponseDto<GalaxyNftPublishAndBuyRespDto> nftPublishAndBuy(GalaxyNftPublishAndBuyReqDto reqDto) { public ResponseDto<GalaxyNftPublishAndBuyRespDto> nftPublishAndBuy(GalaxyNftPublishAndBuyReqDto reqDto) {
//测试发送队列
// queueUtil.sendMsgByRedis(MQConst.GalaxyQueue.JSON_NFT_PUBLISH_AND_BUY.getKey(), JsonUtils.toJson(reqDto));
// return ResponseDto.success();
return xuperTradeBiz.nftPublishAndBuy(reqDto); return xuperTradeBiz.nftPublishAndBuy(reqDto);
} }
...@@ -58,4 +55,14 @@ public class GalaxyRouterStrategyXuperTradeImpl implements IGalaxyRouterStrategy ...@@ -58,4 +55,14 @@ public class GalaxyRouterStrategyXuperTradeImpl implements IGalaxyRouterStrategy
public ResponseDto<GalaxyNftBuyRespDto> nftBuy(GalaxyNftBuyReqDto reqDto) { public ResponseDto<GalaxyNftBuyRespDto> nftBuy(GalaxyNftBuyReqDto reqDto) {
return null; return null;
} }
@Override
public ResponseDto<GalaxyNftTransferRespDto> nftTransfer(GalaxyNftTransferReqDto reqDto) {
return xuperTradeBiz.nftTransfer(reqDto);
}
@Override
public ResponseDto<GalaxyNftTransferQueryRespDto> nftTransferQuery(GalaxyNftTransferQueryReqDto reqDto) {
return xuperTradeBiz.nftTransferQuery(reqDto);
}
} }
\ No newline at end of file
...@@ -31,6 +31,11 @@ public class GalaxyRouterStrategyXuperTradeQueryImpl implements IGalaxyRouterStr ...@@ -31,6 +31,11 @@ public class GalaxyRouterStrategyXuperTradeQueryImpl implements IGalaxyRouterStr
return xuperTradeQueryBiz.queryNftInfo(reqDto); return xuperTradeQueryBiz.queryNftInfo(reqDto);
} }
@Override
public ResponseDto<GalaxyQueryTransNftInfoRespDto> queryTransNftInfo(GalaxyQueryTransNftInfoReqDto reqDto) {
return xuperTradeQueryBiz.queryTransNftInfo(reqDto);
}
@Override @Override
public ResponseDto<GalaxyQueryNftTradeListRespDto> queryNftTradeList(GalaxyQueryNftTradeListReqDto reqDto) { public ResponseDto<GalaxyQueryNftTradeListRespDto> queryNftTradeList(GalaxyQueryNftTradeListReqDto reqDto) {
return xuperTradeQueryBiz.queryNftTradeList(reqDto); return xuperTradeQueryBiz.queryNftTradeList(reqDto);
......
...@@ -66,19 +66,24 @@ public class ZxinTradeQueryBiz implements IGalaxyRouterStrategyTradeQuery { ...@@ -66,19 +66,24 @@ public class ZxinTradeQueryBiz implements IGalaxyRouterStrategyTradeQuery {
return ResponseDto.failure(); return ResponseDto.failure();
} }
@Override
public ResponseDto<GalaxyQueryTransNftInfoRespDto> queryTransNftInfo(GalaxyQueryTransNftInfoReqDto reqDto) {
return null;
}
@Override @Override
public ResponseDto<GalaxyQueryNftTradeListRespDto> queryNftTradeList(GalaxyQueryNftTradeListReqDto reqDto) { public ResponseDto<GalaxyQueryNftTradeListRespDto> queryNftTradeList(GalaxyQueryNftTradeListReqDto reqDto) {
//获取订单信息 // //获取订单信息
GalaxyNftOrderBo nftOrderBo = dataUtils.getNftOrderBo(reqDto.getRouterType(),reqDto.getNftOrderPayId()); // GalaxyNftOrderBo nftOrderBo = dataUtils.getNftOrderBo(reqDto.getRouterType(),reqDto.());
if(StringUtil.isNull(nftOrderBo)){ // if(StringUtil.isNull(nftOrderBo)){
return ResponseDto.failure(GalaxyErrorEnum.NFT_QUERY_FAIL_ORDER_NOT_EXIST.getCode(),GalaxyErrorEnum.NFT_QUERY_FAIL_ORDER_NOT_EXIST.getMessage()); // return ResponseDto.failure(GalaxyErrorEnum.NFT_QUERY_FAIL_ORDER_NOT_EXIST.getCode(),GalaxyErrorEnum.NFT_QUERY_FAIL_ORDER_NOT_EXIST.getMessage());
} // }
if(StringUtil.isEmpty(nftOrderBo.getNftId())){ // if(StringUtil.isEmpty(nftOrderBo.getNftId())){
return ResponseDto.failure(GalaxyErrorEnum.NFT_QUERY_FAIL_NFT_NOT_EXIST.getCode(),GalaxyErrorEnum.NFT_QUERY_FAIL_NFT_NOT_EXIST.getMessage()); // return ResponseDto.failure(GalaxyErrorEnum.NFT_QUERY_FAIL_NFT_NOT_EXIST.getCode(),GalaxyErrorEnum.NFT_QUERY_FAIL_NFT_NOT_EXIST.getMessage());
} // }
Nft039TradeListReqDto nft039TradeListReqDto = Nft039TradeListReqDto.getNew(); Nft039TradeListReqDto nft039TradeListReqDto = Nft039TradeListReqDto.getNew();
nft039TradeListReqDto.setNftId(nftOrderBo.getNftId()); nft039TradeListReqDto.setNftId(reqDto.getNftId());
nft039TradeListReqDto.setLimit(1000l); nft039TradeListReqDto.setLimit(1000l);
ZxlnftResponseDto<Nft039TradeListRespDto> zxlnftResponseDto = zxlnftSdkUtil.nft039TradeList(nft039TradeListReqDto); ZxlnftResponseDto<Nft039TradeListRespDto> zxlnftResponseDto = zxlnftSdkUtil.nft039TradeList(nft039TradeListReqDto);
//查询结果 //查询结果
......
package com.liquidnet.service.galaxy.router.zxin.service; package com.liquidnet.service.galaxy.router.zxin.service;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.galaxy.constant.GalaxyEnum; import com.liquidnet.service.galaxy.constant.GalaxyEnum;
import com.liquidnet.service.galaxy.dto.param.*; import com.liquidnet.service.galaxy.dto.param.*;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyTrade; import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyTrade;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterTradeHandler; import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterTradeHandler;
import com.liquidnet.service.galaxy.router.zxin.biz.ZxinTradeBiz; import com.liquidnet.service.galaxy.router.zxin.biz.ZxinTradeBiz;
import com.liquidnet.service.galaxy.utils.QueueUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -29,17 +26,9 @@ public class GalaxyRouterStrategyZxlTradeImpl implements IGalaxyRouterStrategyTr ...@@ -29,17 +26,9 @@ public class GalaxyRouterStrategyZxlTradeImpl implements IGalaxyRouterStrategyTr
@Autowired @Autowired
private ZxinTradeBiz zxinTradeBiz; private ZxinTradeBiz zxinTradeBiz;
@Autowired
private QueueUtil queueUtil;
@Override @Override
public ResponseDto<GalaxyNftPublishAndBuyRespDto> nftPublishAndBuy(GalaxyNftPublishAndBuyReqDto reqDto) { public ResponseDto<GalaxyNftPublishAndBuyRespDto> nftPublishAndBuy(GalaxyNftPublishAndBuyReqDto reqDto) {
//测试发送队列 return zxinTradeBiz.nftPublishAndBuy(reqDto);
ResponseDto<GalaxyNftPublishAndBuyRespDto> responseDto = zxinTradeBiz.nftPublishAndBuy(reqDto);
if(!responseDto.isSuccess()){
queueUtil.sendMsgByRedis(MQConst.GalaxyQueue.JSON_NFT_PUBLISH_AND_BUY.getKey(), JsonUtils.toJson(reqDto));
}
return ResponseDto.success();
} }
@Deprecated @Deprecated
...@@ -70,4 +59,14 @@ public class GalaxyRouterStrategyZxlTradeImpl implements IGalaxyRouterStrategyTr ...@@ -70,4 +59,14 @@ public class GalaxyRouterStrategyZxlTradeImpl implements IGalaxyRouterStrategyTr
public ResponseDto<GalaxyNftBuyRespDto> nftBuy(GalaxyNftBuyReqDto reqDto) { public ResponseDto<GalaxyNftBuyRespDto> nftBuy(GalaxyNftBuyReqDto reqDto) {
return zxinTradeBiz.nftBuy(reqDto); return zxinTradeBiz.nftBuy(reqDto);
} }
@Override
public ResponseDto<GalaxyNftTransferRespDto> nftTransfer(GalaxyNftTransferReqDto reqDto) {
return null;
}
@Override
public ResponseDto<GalaxyNftTransferQueryRespDto> nftTransferQuery(GalaxyNftTransferQueryReqDto reqDto) {
return null;
}
} }
...@@ -31,6 +31,11 @@ public class GalaxyRouterStrategyZxlTradeQueryImpl implements IGalaxyRouterStrat ...@@ -31,6 +31,11 @@ public class GalaxyRouterStrategyZxlTradeQueryImpl implements IGalaxyRouterStrat
return zxinTradeQueryBiz.queryNftInfo(reqDto); return zxinTradeQueryBiz.queryNftInfo(reqDto);
} }
@Override
public ResponseDto<GalaxyQueryTransNftInfoRespDto> queryTransNftInfo(GalaxyQueryTransNftInfoReqDto reqDto) {
return null;
}
@Override @Override
public ResponseDto<GalaxyQueryNftTradeListRespDto> queryNftTradeList(GalaxyQueryNftTradeListReqDto reqDto) { public ResponseDto<GalaxyQueryNftTradeListRespDto> queryNftTradeList(GalaxyQueryNftTradeListReqDto reqDto) {
return zxinTradeQueryBiz.queryNftTradeList(reqDto); return zxinTradeQueryBiz.queryNftTradeList(reqDto);
......
...@@ -28,6 +28,11 @@ public class GalaxyTradeQueryServiceImpl implements IGalaxyTradeQueryService { ...@@ -28,6 +28,11 @@ public class GalaxyTradeQueryServiceImpl implements IGalaxyTradeQueryService {
return galaxyRouterStrategyContext.getTradeQueryStrategy(reqDto.getRouterType()).queryNftInfo(reqDto); return galaxyRouterStrategyContext.getTradeQueryStrategy(reqDto.getRouterType()).queryNftInfo(reqDto);
} }
@Override
public ResponseDto<GalaxyQueryTransNftInfoRespDto> queryTransNftInfo(GalaxyQueryTransNftInfoReqDto reqDto) {
return galaxyRouterStrategyContext.getTradeQueryStrategy(reqDto.getRouterType()).queryTransNftInfo(reqDto);
}
@Override @Override
public ResponseDto<GalaxyQueryNftTradeListRespDto> queryNftTradeList(GalaxyQueryNftTradeListReqDto reqDto) { public ResponseDto<GalaxyQueryNftTradeListRespDto> queryNftTradeList(GalaxyQueryNftTradeListReqDto reqDto) {
return galaxyRouterStrategyContext.getTradeQueryStrategy(reqDto.getRouterType()).queryNftTradeList(reqDto); return galaxyRouterStrategyContext.getTradeQueryStrategy(reqDto.getRouterType()).queryNftTradeList(reqDto);
......
package com.liquidnet.service.galaxy.service.impl; package com.liquidnet.service.galaxy.service.impl;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.galaxy.dto.param.*; import com.liquidnet.service.galaxy.dto.param.*;
import com.liquidnet.service.galaxy.router.strategy.GalaxyRouterStrategyContext; import com.liquidnet.service.galaxy.router.strategy.GalaxyRouterStrategyContext;
import com.liquidnet.service.galaxy.service.IGalaxyTradeService; import com.liquidnet.service.galaxy.service.IGalaxyTradeService;
import com.liquidnet.service.galaxy.utils.QueueUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -20,6 +23,9 @@ import org.springframework.stereotype.Service; ...@@ -20,6 +23,9 @@ import org.springframework.stereotype.Service;
@Slf4j @Slf4j
@Service("galaxyTradeServiceImpl") @Service("galaxyTradeServiceImpl")
public class GalaxyTradeServiceImpl implements IGalaxyTradeService { public class GalaxyTradeServiceImpl implements IGalaxyTradeService {
@Autowired
private QueueUtil queueUtil;
@Autowired @Autowired
private GalaxyRouterStrategyContext galaxyRouterStrategyContext; private GalaxyRouterStrategyContext galaxyRouterStrategyContext;
...@@ -31,7 +37,11 @@ public class GalaxyTradeServiceImpl implements IGalaxyTradeService { ...@@ -31,7 +37,11 @@ public class GalaxyTradeServiceImpl implements IGalaxyTradeService {
@Override @Override
public ResponseDto<GalaxyNftPublishAndBuyRespDto> nftPublishAndBuy(GalaxyNftPublishAndBuyReqDto reqDto) { public ResponseDto<GalaxyNftPublishAndBuyRespDto> nftPublishAndBuy(GalaxyNftPublishAndBuyReqDto reqDto) {
return galaxyRouterStrategyContext.getTradeStrategy(reqDto.getRouterType()).nftPublishAndBuy(reqDto); ResponseDto<GalaxyNftPublishAndBuyRespDto> responseDto = galaxyRouterStrategyContext.getTradeStrategy(reqDto.getRouterType()).nftPublishAndBuy(reqDto);
if(!responseDto.isSuccess()){
queueUtil.sendMsgByRedis(MQConst.GalaxyQueue.JSON_NFT_PUBLISH_AND_BUY.getKey(), JsonUtils.toJson(reqDto));
}
return ResponseDto.success();
} }
@Override @Override
...@@ -56,4 +66,14 @@ public class GalaxyTradeServiceImpl implements IGalaxyTradeService { ...@@ -56,4 +66,14 @@ public class GalaxyTradeServiceImpl implements IGalaxyTradeService {
// return galaxyRouterStrategyContext.getTradeStrategy(reqDto.getRouterType()).nftPublishAndBuyResultBatchQuery(reqDto); // return galaxyRouterStrategyContext.getTradeStrategy(reqDto.getRouterType()).nftPublishAndBuyResultBatchQuery(reqDto);
return null; return null;
} }
@Override
public ResponseDto<GalaxyNftTransferRespDto> nftTransfer(GalaxyNftTransferReqDto reqDto) {
return galaxyRouterStrategyContext.getTradeStrategy(reqDto.getRouterType()).nftTransfer(reqDto);
}
@Override
public ResponseDto<GalaxyNftTransferQueryRespDto> nftTransferQuery(GalaxyNftTransferQueryReqDto reqDto) {
return galaxyRouterStrategyContext.getTradeStrategy(reqDto.getRouterType()).nftTransferQuery(reqDto);
}
} }
...@@ -16,6 +16,7 @@ import io.swagger.annotations.ApiImplicitParam; ...@@ -16,6 +16,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -97,4 +98,11 @@ public class GoblinNFTUserController { ...@@ -97,4 +98,11 @@ public class GoblinNFTUserController {
goblinRedisUtils.setOpenAccountInfo(CurrentUtil.getCurrentUid(), nftAccInfoVo);*/ goblinRedisUtils.setOpenAccountInfo(CurrentUtil.getCurrentUid(), nftAccInfoVo);*/
return ResponseDto.success(goblinRedisUtils.getOpenAccountInfo(CurrentUtil.getCurrentUid())); return ResponseDto.success(goblinRedisUtils.getOpenAccountInfo(CurrentUtil.getCurrentUid()));
} }
@ApiOperationSupport(order = 12)
@ApiOperation(value = "业务账号开通信息-指定UID")
@GetMapping(value = "open/account/info2")
public ResponseDto<GoblinUserNftAccInfoVo> openAccountInfoByUid(@RequestParam String uid) {
return ResponseDto.success(StringUtils.isBlank(uid) ? null : goblinRedisUtils.getOpenAccountInfo(uid));
}
} }
...@@ -2,6 +2,7 @@ package com.liquidnet.service.goblin.controller.Inner; ...@@ -2,6 +2,7 @@ package com.liquidnet.service.goblin.controller.Inner;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.service.impl.inner.GoblinQueBizArtworkClqService; import com.liquidnet.service.goblin.service.impl.inner.GoblinQueBizArtworkClqService;
import com.liquidnet.service.goblin.service.impl.inner.GoblinQueBizArtworkTransQueryService;
import com.liquidnet.service.goblin.service.impl.inner.GoblinQueBizArtworkUplService; import com.liquidnet.service.goblin.service.impl.inner.GoblinQueBizArtworkUplService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
...@@ -27,22 +28,33 @@ public class GoblinQueBizArtworkController { ...@@ -27,22 +28,33 @@ public class GoblinQueBizArtworkController {
private GoblinQueBizArtworkUplService goblinQueBizArtworkUplService; private GoblinQueBizArtworkUplService goblinQueBizArtworkUplService;
@Autowired @Autowired
private GoblinQueBizArtworkClqService goblinQueBizArtworkClqService; private GoblinQueBizArtworkClqService goblinQueBizArtworkClqService;
@Autowired
private GoblinQueBizArtworkTransQueryService goblinQueBizArtworkTransQueryService;
@PostMapping("upl") @PostMapping("upl")
@ApiOperation("藏品上传声明") @ApiOperation("藏品上传声明")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "skuId", value = "藏品ID", example = "1"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "skuId", value = "藏品SKUID", example = "1"),
}) })
public ResponseDto<String> bizArtworkUpl(@NotBlank(message = "藏品ID不能为空") @RequestParam String skuId) { public ResponseDto<String> bizArtworkUpl(@NotBlank(message = "藏品SKUID不能为空") @RequestParam String skuId) {
return goblinQueBizArtworkUplService.bizArtworkUplProcessing(skuId); return goblinQueBizArtworkUplService.bizArtworkUplProcessing(skuId);
} }
@PostMapping("clq") @PostMapping("clq")
@ApiOperation("藏品声明查询") @ApiOperation("藏品声明查询")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "skuId", value = "藏品ID", example = "1"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "skuId", value = "藏品SKUID", example = "1"),
}) })
public ResponseDto<String> bizArtworkClq(@NotBlank(message = "藏品ID不能为空") @RequestParam String skuId) { public ResponseDto<String> bizArtworkClq(@NotBlank(message = "藏品SKUID不能为空") @RequestParam String skuId) {
return goblinQueBizArtworkClqService.bizArtworkClqProcessing(skuId); return goblinQueBizArtworkClqService.bizArtworkClqProcessing(skuId);
} }
@PostMapping("transQuery")
@ApiOperation("藏品转赠结果查询")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "artworkId", value = "藏品ID", example = "1"),
})
public ResponseDto<String> bizArtworkTransQuery(@NotBlank(message = "藏品转赠订单号不能为空") @RequestParam String artworkId) {
return goblinQueBizArtworkTransQueryService.bizArtworkTransQueryProcessing(artworkId);
}
} }
...@@ -153,6 +153,8 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService { ...@@ -153,6 +153,8 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
String listId = (String) map.get("listId"); String listId = (String) map.get("listId");
LocalDateTime baseSaleStartTime = (LocalDateTime) map.get("baseSaleStartTime"); LocalDateTime baseSaleStartTime = (LocalDateTime) map.get("baseSaleStartTime");
LocalDateTime nextSaleStartTime = (LocalDateTime) map.get("nextSaleStartTime"); LocalDateTime nextSaleStartTime = (LocalDateTime) map.get("nextSaleStartTime");
LocalDateTime firstSaleStartTime = (LocalDateTime) map.get("firstSaleStartTime");
LocalDateTime firstSaleEndTime = (LocalDateTime) map.get("firstSaleEndTime");
if (goblinRedisUtils.getSkuAllStatusShow(skuInfoVo)) { if (goblinRedisUtils.getSkuAllStatusShow(skuInfoVo)) {
//获取预约相关 //获取预约相关
AnticipateValueVo anticipateValueVo = goblinGoodsAnticipateMgService.getAnticipateValueBySkuId(skuId, 1); AnticipateValueVo anticipateValueVo = goblinGoodsAnticipateMgService.getAnticipateValueBySkuId(skuId, 1);
...@@ -184,6 +186,8 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService { ...@@ -184,6 +186,8 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
nftGoodsSkuInfoVo.setListId(listId); nftGoodsSkuInfoVo.setListId(listId);
nftGoodsSkuInfoVo.setBaseSaleStartTime(baseSaleStartTime); nftGoodsSkuInfoVo.setBaseSaleStartTime(baseSaleStartTime);
nftGoodsSkuInfoVo.setNextSaleStartTime(nextSaleStartTime); nftGoodsSkuInfoVo.setNextSaleStartTime(nextSaleStartTime);
nftGoodsSkuInfoVo.setFirstSaleEndTime(firstSaleEndTime);
nftGoodsSkuInfoVo.setFirstSaleStartTime(firstSaleStartTime);
// 是否开启兑换 // 是否开启兑换
nftGoodsSkuInfoVo.setIsExchange(goblinRedisUtils.getIsExchange(skuId)); nftGoodsSkuInfoVo.setIsExchange(goblinRedisUtils.getIsExchange(skuId));
// 待支付订单数量 // 待支付订单数量
......
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