记得上下班打卡 | 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
9131e43f
Commit
9131e43f
authored
Apr 06, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~NFT交易查询接口;
parent
f516c849
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
GoblinGalaxyService.java
...ervice/goblin/service/impl/inner/GoblinGalaxyService.java
+8
-9
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/inner/GoblinGalaxyService.java
View file @
9131e43f
package
com
.
liquidnet
.
service
.
goblin
.
service
.
impl
.
inner
;
package
com
.
liquidnet
.
service
.
goblin
.
service
.
impl
.
inner
;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.fasterxml.jackson.databind.node.ObjectNode
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.HttpUtil
;
import
com.liquidnet.commons.lang.util.HttpUtil
;
...
@@ -89,20 +90,18 @@ public class GoblinGalaxyService {
...
@@ -89,20 +90,18 @@ public class GoblinGalaxyService {
* @return
* @return
*/
*/
public
List
<
String
>
checkNftTradeResult
(
String
uid
,
String
orderId
,
String
routerType
)
{
public
List
<
String
>
checkNftTradeResult
(
String
uid
,
String
orderId
,
String
routerType
)
{
LinkedMultiValueMap
<
String
,
String
>
paramsMap
=
CollectionUtil
.
linkedMultiValueMapStringString
();
ObjectNode
postBodyNode
=
JsonUtils
.
OM
().
createObjectNode
();
p
aramsMap
.
add
(
"userId"
,
uid
);
p
ostBodyNode
.
put
(
"userId"
,
uid
);
p
aramsMap
.
add
(
"nftOrderPayId"
,
orderId
);
// TODO: 2022/3/31 ==zhanggb
p
ostBodyNode
.
put
(
"nftOrderPayId"
,
orderId
);
p
aramsMap
.
add
(
"routerType"
,
routerType
);
p
ostBodyNode
.
put
(
"routerType"
,
routerType
);
// String postUrl = sevGalaxyUrl + "/user/register", blockChainAddress;// TODO: 2022/3/31 ==zhanggb
// String postUrl = sevGalaxyUrl + "/user/register", blockChainAddress;// TODO: 2022/3/31 ==zhanggb
String
postUrl
=
"https://ENVgalaxy.zhengzai.tv/galaxy/nftTrade/nftPublishAndBuyResultQuery"
.
replace
(
"ENV"
,
env
.
getProperty
(
CurrentUtil
.
CK_ENV_ACTIVE
)),
blockChainAddress
;
String
postUrl
=
"https://ENVgalaxy.zhengzai.tv/galaxy/nftTrade/nftPublishAndBuyResultQuery"
.
replace
(
"ENV"
,
env
.
getProperty
(
CurrentUtil
.
CK_ENV_ACTIVE
)),
blockChainAddress
;
try
{
try
{
LinkedMultiValueMap
<
String
,
String
>
headerMap
=
CollectionUtil
.
linkedMultiValueMapStringString
();
String
postRespStr
=
HttpUtil
.
postRaw
(
postUrl
,
postBodyNode
.
toString
(),
null
);
headerMap
.
add
(
"Accept"
,
MediaType
.
APPLICATION_JSON_VALUE
);
String
postRespStr
=
HttpUtil
.
post
(
postUrl
,
paramsMap
,
headerMap
);
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发行购买结果查询:查询失败[p
aramsMap={},postRespStr={}]"
,
paramsMap
,
postRespStr
);
log
.
warn
(
"#NFT发行购买结果查询:查询失败[p
ostBody={},postRespStr={}]"
,
postBodyNode
,
postRespStr
);
return
null
;
return
null
;
}
}
JsonNode
postRespDataJNode
=
postRespJNode
.
get
(
"data"
);
JsonNode
postRespDataJNode
=
postRespJNode
.
get
(
"data"
);
...
@@ -115,7 +114,7 @@ public class GoblinGalaxyService {
...
@@ -115,7 +114,7 @@ public class GoblinGalaxyService {
respDataList
.
add
(
postRespDataJNode
.
get
(
"nftBuyTxHash"
).
asText
());
respDataList
.
add
(
postRespDataJNode
.
get
(
"nftBuyTxHash"
).
asText
());
return
respDataList
;
return
respDataList
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"Ex.NFT发行购买结果查询:请求异常[
UID={},url={},paramsMap={}],ex:{}"
,
uid
,
postUrl
,
paramsMap
,
e
.
getMessage
());
log
.
error
(
"Ex.NFT发行购买结果查询:请求异常[
url={},postBody={}],ex:{}"
,
postUrl
,
postBodyNode
,
e
.
getMessage
());
return
null
;
return
null
;
}
}
}
}
...
...
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