记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
b653ca18
Commit
b653ca18
authored
Jul 01, 2022
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实现xuper发行购买功能
parent
cc81eb1e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
11 deletions
+15
-11
XuperTradeCommonBiz.java
.../service/galaxy/router/xuper/biz/XuperTradeCommonBiz.java
+1
-1
AbstractDataUtils.java
...com/liquidnet/service/galaxy/utils/AbstractDataUtils.java
+1
-1
XuperArtworkBiz.java
...dnet/service/galaxy/router/xuper/biz/XuperArtworkBiz.java
+9
-6
TestXuperSdkUtil.java
...liquidnet/service/goblin/test/xuper/TestXuperSdkUtil.java
+4
-3
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-common/src/main/java/com/liquidnet/service/galaxy/router/xuper/biz/XuperTradeCommonBiz.java
View file @
b653ca18
...
@@ -151,7 +151,7 @@ public class XuperTradeCommonBiz {
...
@@ -151,7 +151,7 @@ public class XuperTradeCommonBiz {
int
count
=
0
;
int
count
=
0
;
while
(
nftBuyPayTaskId
==
null
){
while
(
nftBuyPayTaskId
==
null
){
Thread
.
sleep
(
5
00
l
);
Thread
.
sleep
(
10
00
l
);
count
++;
count
++;
log
.
info
(
"=======执行nft购买第{}次查询,taskId:{}"
,
count
,
nft044ReqDto
.
getTaskId
());
log
.
info
(
"=======执行nft购买第{}次查询,taskId:{}"
,
count
,
nft044ReqDto
.
getTaskId
());
//执行nft购买结果查询
//执行nft购买结果查询
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-common/src/main/java/com/liquidnet/service/galaxy/utils/AbstractDataUtils.java
View file @
b653ca18
...
@@ -114,7 +114,7 @@ public abstract class AbstractDataUtils {
...
@@ -114,7 +114,7 @@ public abstract class AbstractDataUtils {
try
{
try
{
this
.
getQueueUtil
().
sendMySqlRedis
(
this
.
getQueueUtil
().
sendMySqlRedis
(
SqlMapping
.
get
(
"galaxy_series_info.insert"
),
SqlMapping
.
get
(
"galaxy_series_info.insert"
),
new
Object
[]{
seriesInfoBo
.
getSeriesInfoId
(),
seriesInfoBo
.
getSeriesName
(),
seriesCode
,
null
,
seriesInfoBo
.
getTotalCount
()
new
Object
[]{
seriesInfoBo
.
getSeriesInfoId
(),
seriesInfoBo
.
getSeriesName
(),
seriesCode
,
seriesInfoBo
.
getSeriesId
()
,
seriesInfoBo
.
getTotalCount
()
,
seriesInfoBo
.
getCrtCount
(),
seriesInfoBo
.
getSeriesClaimTaskId
(),
seriesInfoBo
.
getSeriesClaimStatus
(),
seriesInfoBo
.
getCoverUrl
(),
seriesInfoBo
.
getSeriesDesc
()
,
seriesInfoBo
.
getCrtCount
(),
seriesInfoBo
.
getSeriesClaimTaskId
(),
seriesInfoBo
.
getSeriesClaimStatus
(),
seriesInfoBo
.
getCoverUrl
(),
seriesInfoBo
.
getSeriesDesc
()
,
nftCount
,
seriesInfoBo
.
getTradeHash
(),
seriesInfoBo
.
getRouterType
(),
LocalDateTime
.
now
(),
null
,
nftCount
,
seriesInfoBo
.
getTradeHash
(),
seriesInfoBo
.
getRouterType
(),
LocalDateTime
.
now
(),
null
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/galaxy/router/xuper/biz/XuperArtworkBiz.java
View file @
b653ca18
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.galaxy.router.xuper.biz;
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.galaxy.router.xuper.biz;
import
com.baidu.xasset.auth.Crypto
;
import
com.baidu.xasset.auth.Crypto
;
import
com.baidu.xasset.client.base.Base
;
import
com.baidu.xasset.client.base.Base
;
import
com.baidu.xuper.api.Account
;
import
com.baidu.xuper.api.Account
;
import
com.liquidnet.common.exception.constant.ErrorCode
;
import
com.liquidnet.common.third.xuper.config.XuperConfig
;
import
com.liquidnet.common.third.xuper.config.XuperConfig
;
import
com.liquidnet.common.third.xuper.constant.XuperEnum
;
import
com.liquidnet.common.third.xuper.constant.XuperEnum
;
import
com.liquidnet.common.third.xuper.dto.*
;
import
com.liquidnet.common.third.xuper.dto.*
;
...
@@ -266,6 +267,11 @@ public class XuperArtworkBiz {
...
@@ -266,6 +267,11 @@ public class XuperArtworkBiz {
return
ResponseDto
.
success
(
seriesClaimRespDto
);
return
ResponseDto
.
success
(
seriesClaimRespDto
);
}
}
/**
* 系列声明结果查询
* @param reqDto
* @return
*/
public
ResponseDto
<
GalaxyArtSeriesClaimResultQueryRespDto
>
seriesClaimResultQuery
(
GalaxyArtSeriesClaimResultQueryReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyArtSeriesClaimResultQueryRespDto
>
seriesClaimResultQuery
(
GalaxyArtSeriesClaimResultQueryReqDto
reqDto
)
{
//根据skuId获取系列nft信息
//根据skuId获取系列nft信息
GalaxySeriesNftInfoBo
seriesNftInfoBo
=
dataUtils
.
getSeriesNftInfoBo
(
reqDto
.
getRouterType
(),
reqDto
.
getSkuId
());
GalaxySeriesNftInfoBo
seriesNftInfoBo
=
dataUtils
.
getSeriesNftInfoBo
(
reqDto
.
getRouterType
(),
reqDto
.
getSkuId
());
...
@@ -314,14 +320,12 @@ public class XuperArtworkBiz {
...
@@ -314,14 +320,12 @@ public class XuperArtworkBiz {
log
.
error
(
"sys error msg "
+
e
.
getMessage
(),
e
);
log
.
error
(
"sys error msg "
+
e
.
getMessage
(),
e
);
}
}
log
.
info
(
"seriesClaimResultQuery resp : "
+
JsonUtils
.
toJson
(
respDto
));
log
.
info
(
"seriesClaimResultQuery resp : "
+
JsonUtils
.
toJson
(
respDto
));
if
(
respDto
.
getErrNo
()
==
0
){
if
(
respDto
.
getErrNo
()
==
Integer
.
parseInt
(
ErrorCode
.
SUCCESS
.
getCode
())){
if
(
respDto
.
getMeta
().
getStatus
()
==
Integer
.
parseInt
(
XuperEnum
.
AssetPublishStatusEnum
.
INIT
.
getCode
())
if
(
respDto
.
getMeta
().
getStatus
()
==
Integer
.
parseInt
(
XuperEnum
.
AssetPublishStatusEnum
.
INIT
.
getCode
())){
||
respDto
.
getMeta
().
getStatus
()
==
Integer
.
parseInt
(
XuperEnum
.
AssetPublishStatusEnum
.
PUBLISH_SUCCESS
.
getCode
())){
//设置系列声明状态
//设置系列声明状态
seriesInfoBo
.
setSeriesClaimStatus
(
GalaxyEnum
.
SeriesClaimStatusEnum
.
SUCCESS
.
getCode
());
seriesInfoBo
.
setSeriesClaimStatus
(
GalaxyEnum
.
SeriesClaimStatusEnum
.
SUCCESS
.
getCode
());
String
nowTimeStr
=
DateUtil
.
getNowTime
();
String
nowTimeStr
=
DateUtil
.
getNowTime
();
seriesInfoBo
.
setChainTimestamp
(
nowTimeStr
);
seriesInfoBo
.
setChainTimestamp
(
nowTimeStr
);
seriesInfoBo
.
setTradeHash
(
respDto
.
getMeta
().
getTxId
());
seriesInfoBo
.
setSeriesId
(
String
.
valueOf
(
respDto
.
getMeta
().
getAssetId
()));
seriesInfoBo
.
setSeriesId
(
String
.
valueOf
(
respDto
.
getMeta
().
getAssetId
()));
seriesInfoBo
.
setUpdatedAt
(
LocalDateTime
.
now
());
seriesInfoBo
.
setUpdatedAt
(
LocalDateTime
.
now
());
...
@@ -335,8 +339,7 @@ public class XuperArtworkBiz {
...
@@ -335,8 +339,7 @@ public class XuperArtworkBiz {
GalaxyArtSeriesClaimResultQueryRespDto
resultQueryRespDto
=
this
.
buildGalaxyArtSeriesClaimResultQueryRespDto
(
reqDto
,
seriesInfoBo
,
XuperEnum
.
AssetPublishStatusEnum
.
INIT
.
getCode
());
GalaxyArtSeriesClaimResultQueryRespDto
resultQueryRespDto
=
this
.
buildGalaxyArtSeriesClaimResultQueryRespDto
(
reqDto
,
seriesInfoBo
,
XuperEnum
.
AssetPublishStatusEnum
.
INIT
.
getCode
());
return
ResponseDto
.
success
(
resultQueryRespDto
);
return
ResponseDto
.
success
(
resultQueryRespDto
);
}
else
if
(
respDto
.
getMeta
().
getStatus
()
!=
Integer
.
parseInt
(
XuperEnum
.
AssetPublishStatusEnum
.
INIT
.
getCode
())
}
else
{
&&
respDto
.
getMeta
().
getStatus
()
!=
Integer
.
parseInt
(
XuperEnum
.
AssetPublishStatusEnum
.
PUBLISH_SUCCESS
.
getCode
())){
seriesInfoBo
.
setSeriesClaimStatus
(
GalaxyEnum
.
SeriesClaimStatusEnum
.
FAIL
.
getCode
());
seriesInfoBo
.
setSeriesClaimStatus
(
GalaxyEnum
.
SeriesClaimStatusEnum
.
FAIL
.
getCode
());
seriesInfoBo
.
setUpdatedAt
(
LocalDateTime
.
now
());
seriesInfoBo
.
setUpdatedAt
(
LocalDateTime
.
now
());
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/test/java/com/liquidnet/service/goblin/test/xuper/TestXuperSdkUtil.java
View file @
b653ca18
...
@@ -449,9 +449,10 @@ public class TestXuperSdkUtil {
...
@@ -449,9 +449,10 @@ public class TestXuperSdkUtil {
Xuper010QuerySdsReqDto
reqDto
=
Xuper010QuerySdsReqDto
.
getNew
();
Xuper010QuerySdsReqDto
reqDto
=
Xuper010QuerySdsReqDto
.
getNew
();
// 定义返回结果对象
// 定义返回结果对象
Xuper010QuerySdsRespDto
respDto
=
null
;
Xuper010QuerySdsRespDto
respDto
=
null
;
// long assetId = 171095615845019437l;
long
assetId
=
171095615845019437
l
;
long
assetId
=
477060752401870637
l
;
// assetId = 477060752401870637l;
long
shardId
=
4
l
;
assetId
=
2203931451566698285
l
;
long
shardId
=
1
l
;
try
{
try
{
reqDto
.
setAssetId
(
assetId
);
reqDto
.
setAssetId
(
assetId
);
reqDto
.
setShardId
(
shardId
);
reqDto
.
setShardId
(
shardId
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment