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

Commit 3e8e99b1 authored by anjiabin's avatar anjiabin

调试至信链NFt购买接口

parent b93c122c
package com.liquidnet.common.third.zxlnft.dto;
import com.liquidnet.common.third.zxlnft.dto.nft.Nft032SeriesResp;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
......@@ -16,6 +17,10 @@ import java.io.Serializable;
*/
@Data
public class Nft032SeriesRespDto implements Serializable {
private Nft032SeriesResp.SeriesInfo seriesInfo;
@Data
public class SeriesInfo{
/**
* 系列ID
*/
......@@ -52,6 +57,7 @@ public class Nft032SeriesRespDto implements Serializable {
* 创建时间戳
*/
private String createTimeStamp;
}
private static final Nft032SeriesRespDto obj = new Nft032SeriesRespDto();
public static Nft032SeriesRespDto getNew() {
......
......@@ -16,6 +16,10 @@ import java.io.Serializable;
*/
@Data
public class Nft032SeriesResp implements Serializable {
private SeriesInfo seriesInfo;
@Data
public class SeriesInfo{
/**
* 系列ID
*/
......@@ -52,6 +56,7 @@ public class Nft032SeriesResp implements Serializable {
* 创建时间戳
*/
private String createTimeStamp;
}
private static final Nft032SeriesResp obj = new Nft032SeriesResp();
public static Nft032SeriesResp getNew() {
......
......@@ -49,7 +49,7 @@ public class Nft043BuyReq implements Serializable {
*/
private String signature;
/**
* 要购买的nftId
* 平台方的私钥签名
*/
private String platformSignature;
private static final Nft043BuyReq obj = new Nft043BuyReq();
......
......@@ -891,6 +891,24 @@ public class ZxlnftSdkUtil {
Nft043BuyReq req = Nft043BuyReq.getNew();
BeanUtil.copy(reqDto,req);
//设置平台公钥
req.setPlatformPubKey(zxlnftConfig.getNftPlatformPubKey());
/**
* 接收人的私钥签名,签名对象是(platformPubKey_receiverPubKey_pointReceiverAddr_applyScore_接口名_nftId_offerCount_operateId)
* 接口名:buy_nft
*/
String signMetaData = req.getPlatformPubKey()
.concat("_").concat(req.getReceiverPubKey())
.concat("_").concat(req.getPointReceiverAddr())
.concat("_").concat(req.getApplyScore().toString())
.concat("_").concat("buy_nft")
.concat("_").concat(req.getNftId())
.concat("_").concat(req.getOfferCount().toString())
.concat("_").concat(req.getOperateId());
String signature = zxlnftBiz.createSign(zxlnftConfig.getNftPlatformPriKey(),signMetaData);
req.setPlatformSignature(signature);
Nft043BuyRespDto respDto = Nft043BuyRespDto.getNew();
try{
Nft043BuyResp resp = zxlnftSdkService.nft043Buy(req);
......@@ -908,6 +926,9 @@ public class ZxlnftSdkUtil {
Nft044BuyResultReq req = Nft044BuyResultReq.getNew();
BeanUtil.copy(reqDto,req);
//设置平台公钥
req.setPlatformPubKey(zxlnftConfig.getNftPlatformPubKey());
Nft044BuyResultRespDto respDto = Nft044BuyResultRespDto.getNew();
try{
Nft044BuyResultResp resp = zxlnftSdkService.nft044BuyResult(req);
......@@ -925,6 +946,9 @@ public class ZxlnftSdkUtil {
Nft045BuyPayResultReq req = Nft045BuyPayResultReq.getNew();
BeanUtil.copy(reqDto,req);
//设置平台公钥
req.setPlatformPubKey(zxlnftConfig.getNftPlatformPubKey());
Nft045BuyPayResultRespDto respDto = Nft045BuyPayResultRespDto.getNew();
try{
Nft045BuyPayResultResp resp = zxlnftSdkService.nft045BuyPayResult(req);
......
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