记得上下班打卡 | 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
8528af95
Commit
8528af95
authored
Jul 27, 2022
by
anjiabin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_xuper_check_errro_20220725' into bak220720_merge
parents
f954804b
ce38602c
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
291 additions
and
263 deletions
+291
-263
XuperSdkUtil.java
...a/com/liquidnet/common/third/xuper/util/XuperSdkUtil.java
+17
-17
ZxlnftBiz.java
...java/com/liquidnet/common/third/zxlnft/biz/ZxlnftBiz.java
+16
-1
ZxlnftSdkServiceImpl.java
...ommon/third/zxlnft/service/impl/ZxlnftSdkServiceImpl.java
+6
-205
ZxlnftSdkUtil.java
...com/liquidnet/common/third/zxlnft/util/ZxlnftSdkUtil.java
+103
-1
liquidnet-service-consumer-nft.yml
...onfig/liquidnet-config/liquidnet-service-consumer-nft.yml
+2
-2
XuperTradeCommonBiz.java
.../service/galaxy/router/xuper/biz/XuperTradeCommonBiz.java
+2
-0
ZxinTradeCommonBiz.java
...et/service/galaxy/router/zxin/biz/ZxinTradeCommonBiz.java
+10
-0
XuperTradeBiz.java
...uidnet/service/galaxy/router/xuper/biz/XuperTradeBiz.java
+72
-18
ZxinTradeBiz.java
...iquidnet/service/galaxy/router/zxin/biz/ZxinTradeBiz.java
+51
-15
GalaxyRouterStrategyZxlTradeImpl.java
...router/zxin/service/GalaxyRouterStrategyZxlTradeImpl.java
+4
-0
GalaxyTradeServiceImpl.java
...t/service/galaxy/service/impl/GalaxyTradeServiceImpl.java
+8
-4
No files found.
liquidnet-bus-common/liquidnet-common-third/liquidnet-common-third-xuper/src/main/java/com/liquidnet/common/third/xuper/util/XuperSdkUtil.java
View file @
8528af95
...
@@ -68,7 +68,7 @@ public class XuperSdkUtil {
...
@@ -68,7 +68,7 @@ public class XuperSdkUtil {
log
.
debug
(
"xuperUploadFile resp : "
+
JsonUtils
.
toJson
(
respDto
));
log
.
debug
(
"xuperUploadFile resp : "
+
JsonUtils
.
toJson
(
respDto
));
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
"error msg "
+
e
.
getMessage
(),
e
);
log
.
error
(
"error msg "
+
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -91,7 +91,7 @@ public class XuperSdkUtil {
...
@@ -91,7 +91,7 @@ public class XuperSdkUtil {
log
.
debug
(
"xuper000CreateAccount resp : "
+
JsonUtils
.
toJson
(
respDto
));
log
.
debug
(
"xuper000CreateAccount resp : "
+
JsonUtils
.
toJson
(
respDto
));
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -118,7 +118,7 @@ public class XuperSdkUtil {
...
@@ -118,7 +118,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
"error msg "
+
e
.
getMessage
(),
e
);
log
.
error
(
"error msg "
+
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -164,7 +164,7 @@ public class XuperSdkUtil {
...
@@ -164,7 +164,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -212,7 +212,7 @@ public class XuperSdkUtil {
...
@@ -212,7 +212,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -241,7 +241,7 @@ public class XuperSdkUtil {
...
@@ -241,7 +241,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -265,7 +265,7 @@ public class XuperSdkUtil {
...
@@ -265,7 +265,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -296,7 +296,7 @@ public class XuperSdkUtil {
...
@@ -296,7 +296,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -331,7 +331,7 @@ public class XuperSdkUtil {
...
@@ -331,7 +331,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -366,7 +366,7 @@ public class XuperSdkUtil {
...
@@ -366,7 +366,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -396,7 +396,7 @@ public class XuperSdkUtil {
...
@@ -396,7 +396,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -422,7 +422,7 @@ public class XuperSdkUtil {
...
@@ -422,7 +422,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -450,7 +450,7 @@ public class XuperSdkUtil {
...
@@ -450,7 +450,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -478,7 +478,7 @@ public class XuperSdkUtil {
...
@@ -478,7 +478,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -506,7 +506,7 @@ public class XuperSdkUtil {
...
@@ -506,7 +506,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -532,7 +532,7 @@ public class XuperSdkUtil {
...
@@ -532,7 +532,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
@@ -556,7 +556,7 @@ public class XuperSdkUtil {
...
@@ -556,7 +556,7 @@ public class XuperSdkUtil {
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
XupterException
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
XuperResponseDto
.
failure
(
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getCode
(),
XuperErrorEnum
.
SERVER_INNER_ERROR
.
getMsg
());
}
}
return
XuperResponseDto
.
success
(
respDto
);
return
XuperResponseDto
.
success
(
respDto
);
}
}
...
...
liquidnet-bus-common/liquidnet-common-third/liquidnet-common-third-zxlnft/src/main/java/com/liquidnet/common/third/zxlnft/biz/ZxlnftBiz.java
View file @
8528af95
...
@@ -2,6 +2,7 @@ package com.liquidnet.common.third.zxlnft.biz;
...
@@ -2,6 +2,7 @@ package com.liquidnet.common.third.zxlnft.biz;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
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.dto.wallet.*
;
import
com.liquidnet.common.third.zxlnft.dto.wallet.*
;
import
com.liquidnet.common.third.zxlnft.exception.ZxlNftException
;
import
com.liquidnet.common.third.zxlnft.exception.ZxlNftException
;
import
com.liquidnet.common.third.zxlnft.service.WalletSdkService
;
import
com.liquidnet.common.third.zxlnft.service.WalletSdkService
;
...
@@ -83,7 +84,21 @@ public class ZxlnftBiz {
...
@@ -83,7 +84,21 @@ public class ZxlnftBiz {
}
}
public
<
T
>
T
buildNftRespObj
(
String
response
,
Class
<
T
>
tClass
){
public
<
T
>
T
buildNftRespObj
(
String
response
,
Class
<
T
>
tClass
){
return
this
.
buildNftRespObj
(
response
,
tClass
,
true
);
T
resp
=
null
;
try
{
/**
* 构造返回结果
*/
resp
=
this
.
buildNftRespObj
(
response
,
tClass
,
true
);
log
.
info
(
tClass
.
getName
()+
"--->>> return result : {} "
,
resp
.
toString
());
}
catch
(
ZxlNftException
e
){
log
.
error
(
"buildNftRespObj biz error response: {}"
,
JsonUtils
.
toJson
(
response
),
e
);
throw
new
ZxlNftException
(
e
.
getCode
(),
e
.
getMsg
());
}
catch
(
Exception
e
)
{
log
.
error
(
"buildNftRespObj sys error response: {}"
,
JsonUtils
.
toJson
(
response
),
e
);
throw
new
ZxlNftException
(
ZxlErrorEnum
.
SYSTEM_ERROR
.
getCode
(),
e
.
getMessage
());
}
return
resp
;
}
}
public
<
T
>
T
buildNftRespObj
(
String
response
,
Class
<
T
>
tClass
,
boolean
isJson
){
public
<
T
>
T
buildNftRespObj
(
String
response
,
Class
<
T
>
tClass
,
boolean
isJson
){
...
...
liquidnet-bus-common/liquidnet-common-third/liquidnet-common-third-zxlnft/src/main/java/com/liquidnet/common/third/zxlnft/service/impl/ZxlnftSdkServiceImpl.java
View file @
8528af95
This diff is collapsed.
Click to expand it.
liquidnet-bus-common/liquidnet-common-third/liquidnet-common-third-zxlnft/src/main/java/com/liquidnet/common/third/zxlnft/util/ZxlnftSdkUtil.java
View file @
8528af95
This diff is collapsed.
Click to expand it.
liquidnet-bus-config/liquidnet-config/liquidnet-service-consumer-nft.yml
View file @
8528af95
...
@@ -65,9 +65,9 @@ spring:
...
@@ -65,9 +65,9 @@ spring:
password
:
${liquidnet.redis.goblin.password}
password
:
${liquidnet.redis.goblin.password}
lettuce
:
lettuce
:
pool
:
pool
:
max-active
:
2
0
max-active
:
8
0
max-wait
:
-1
max-wait
:
-1
max-idle
:
8
max-idle
:
40
min-idle
:
0
min-idle
:
0
data
:
data
:
mongodb
:
mongodb
:
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-common/src/main/java/com/liquidnet/service/galaxy/router/xuper/biz/XuperTradeCommonBiz.java
View file @
8528af95
...
@@ -404,6 +404,8 @@ public class XuperTradeCommonBiz {
...
@@ -404,6 +404,8 @@ public class XuperTradeCommonBiz {
if
(
StringUtil
.
isNotNull
(
xuper007GrantShardRespDto
)&&
xuper007GrantShardRespDto
.
getErrNo
()==
0
){
if
(
StringUtil
.
isNotNull
(
xuper007GrantShardRespDto
)&&
xuper007GrantShardRespDto
.
getErrNo
()==
0
){
nftBuyTaskId
=
String
.
valueOf
(
assetId
);
nftBuyTaskId
=
String
.
valueOf
(
assetId
);
nftOrderBo
.
setNftBuyTaskId
(
nftBuyTaskId
);
nftOrderBo
.
setNftBuyTaskId
(
nftBuyTaskId
);
//更新nftBuyTaskId
dataUtils
.
updateNftOrderBuyInfo
(
routerType
,
nftOrderBo
.
getNftOrderPayId
(),
nftOrderBo
);
}
}
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-common/src/main/java/com/liquidnet/service/galaxy/router/zxin/biz/ZxinTradeCommonBiz.java
View file @
8528af95
...
@@ -2,8 +2,10 @@ package com.liquidnet.service.galaxy.router.zxin.biz;
...
@@ -2,8 +2,10 @@ package com.liquidnet.service.galaxy.router.zxin.biz;
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.ZxlnftEnum
;
import
com.liquidnet.common.third.zxlnft.constant.ZxlnftEnum
;
import
com.liquidnet.common.third.zxlnft.dto.*
;
import
com.liquidnet.common.third.zxlnft.dto.*
;
import
com.liquidnet.common.third.zxlnft.exception.ZxlNftException
;
import
com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil
;
import
com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
...
@@ -233,6 +235,9 @@ public class ZxinTradeCommonBiz {
...
@@ -233,6 +235,9 @@ public class ZxinTradeCommonBiz {
Thread
.
sleep
(
500
l
);
Thread
.
sleep
(
500
l
);
count
++;
count
++;
ZxlnftResponseDto
<
Nft035PublishResultRespDto
>
nft035RespDtoTemp
=
zxlnftSdkUtil
.
nft035PublishResult
(
nft035ReqDto
);
ZxlnftResponseDto
<
Nft035PublishResultRespDto
>
nft035RespDtoTemp
=
zxlnftSdkUtil
.
nft035PublishResult
(
nft035ReqDto
);
if
(!
nft035RespDtoTemp
.
isSuccess
()){
throw
new
ZxlNftException
(
ZxlErrorEnum
.
SYSTEM_ERROR
.
getCode
(),
ZxlErrorEnum
.
SYSTEM_ERROR
.
getMsg
());
}
log
.
info
(
"=======执行第{}次查询,taskId:{}"
,
count
,
nft035ReqDto
.
getTaskId
());
log
.
info
(
"=======执行第{}次查询,taskId:{}"
,
count
,
nft035ReqDto
.
getTaskId
());
if
(
nft035RespDtoTemp
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_SUCCESS
.
getCode
()))
{
if
(
nft035RespDtoTemp
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_SUCCESS
.
getCode
()))
{
nftIdBegin
=
nft035RespDtoTemp
.
getData
().
getNftIdBegin
();
nftIdBegin
=
nft035RespDtoTemp
.
getData
().
getNftIdBegin
();
...
@@ -414,6 +419,8 @@ public class ZxinTradeCommonBiz {
...
@@ -414,6 +419,8 @@ public class ZxinTradeCommonBiz {
if
(
nft043RespDto
.
isSuccess
()){
if
(
nft043RespDto
.
isSuccess
()){
nftBuyTaskId
=
nft043RespDto
.
getData
().
getTaskId
();
nftBuyTaskId
=
nft043RespDto
.
getData
().
getTaskId
();
nftOrderBo
.
setNftBuyTaskId
(
nftBuyTaskId
);
nftOrderBo
.
setNftBuyTaskId
(
nftBuyTaskId
);
//更新nftBuyTaskId
dataUtils
.
updateNftOrderBuyInfo
(
routerType
,
nftOrderBo
.
getNftOrderPayId
(),
nftOrderBo
);
}
}
}
}
...
@@ -432,6 +439,9 @@ public class ZxinTradeCommonBiz {
...
@@ -432,6 +439,9 @@ public class ZxinTradeCommonBiz {
count
++;
count
++;
log
.
info
(
"=======执行第{}次查询,taskId:{}"
,
count
,
nft044ReqDto
.
getTaskId
());
log
.
info
(
"=======执行第{}次查询,taskId:{}"
,
count
,
nft044ReqDto
.
getTaskId
());
ZxlnftResponseDto
<
Nft044BuyResultRespDto
>
nft044RespDto
=
zxlnftSdkUtil
.
nft044BuyResult
(
nft044ReqDto
);
ZxlnftResponseDto
<
Nft044BuyResultRespDto
>
nft044RespDto
=
zxlnftSdkUtil
.
nft044BuyResult
(
nft044ReqDto
);
if
(!
nft044RespDto
.
isSuccess
()){
throw
new
ZxlNftException
(
ZxlErrorEnum
.
SYSTEM_ERROR
.
getCode
(),
ZxlErrorEnum
.
SYSTEM_ERROR
.
getMsg
());
}
if
(
nft044RespDto
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_SUCCESS
.
getCode
())){
if
(
nft044RespDto
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_SUCCESS
.
getCode
())){
nftBuyPayTaskId
=
nft044RespDto
.
getData
().
getPayTaskId
();
nftBuyPayTaskId
=
nft044RespDto
.
getData
().
getPayTaskId
();
nftBuyChainTimestamp
=
nft044RespDto
.
getData
().
getChainTimestamp
();
nftBuyChainTimestamp
=
nft044RespDto
.
getData
().
getChainTimestamp
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/galaxy/router/xuper/biz/XuperTradeBiz.java
View file @
8528af95
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
xuper
.
biz
;
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
xuper
.
biz
;
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.dto.Xuper010QuerySdsReqDto
;
import
com.liquidnet.common.third.xuper.dto.Xuper010QuerySdsRespDto
;
import
com.liquidnet.common.third.xuper.dto.XuperResponseDto
;
import
com.liquidnet.common.third.xuper.exception.XupterException
;
import
com.liquidnet.common.third.xuper.util.XuperSdkUtil
;
import
com.liquidnet.common.third.xuper.util.XuperSdkUtil
;
import
com.liquidnet.commons.lang.util.BeanUtil
;
import
com.liquidnet.commons.lang.util.BeanUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.commons.lang.util.StringUtil
;
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.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.GalaxyNftOrderBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBo
;
import
com.liquidnet.service.galaxy.dto.param.*
;
import
com.liquidnet.service.galaxy.dto.param.*
;
import
com.liquidnet.service.galaxy.utils.GalaxyDataUtils
;
import
com.liquidnet.service.galaxy.utils.GalaxyDataUtils
;
...
@@ -16,6 +25,9 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -16,6 +25,9 @@ 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
java.time.LocalDateTime
;
import
java.util.Date
;
/**
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @version V1.0
...
@@ -31,21 +43,12 @@ public class XuperTradeBiz {
...
@@ -31,21 +43,12 @@ public class XuperTradeBiz {
@Autowired
@Autowired
private
XuperSdkUtil
xuperSdkUtil
;
private
XuperSdkUtil
xuperSdkUtil
;
@Autowired
private
XuperConfig
xuperConfig
;
@Autowired
@Autowired
private
GalaxyDataUtils
dataUtils
;
private
GalaxyDataUtils
dataUtils
;
@Autowired
private
GalaxyBeanTransferBiz
galaxyBeanTransferBiz
;
@Autowired
@Autowired
private
XuperTradeCommonBiz
xuperTradeCommonBiz
;
private
XuperTradeCommonBiz
xuperTradeCommonBiz
;
@Autowired
private
QueueUtil
queueUtil
;
@Autowired
@Autowired
private
XuperPublishBiz
xuperPublishBiz
;
private
XuperPublishBiz
xuperPublishBiz
;
...
@@ -86,10 +89,6 @@ public class XuperTradeBiz {
...
@@ -86,10 +89,6 @@ public class XuperTradeBiz {
nftPublishResultQueryReqDto
.
setNftOrderPayId
(
reqDto
.
getNftOrderPayId
());
nftPublishResultQueryReqDto
.
setNftOrderPayId
(
reqDto
.
getNftOrderPayId
());
nftPublishResultQueryReqDto
.
setRouterType
(
reqDto
.
getRouterType
());
nftPublishResultQueryReqDto
.
setRouterType
(
reqDto
.
getRouterType
());
ResponseDto
<
GalaxyNftPublishResultQueryRespDto
>
publishResultQueryRespDto
=
xuperPublishBiz
.
nftPublishResultQuery
(
nftPublishResultQueryReqDto
);
ResponseDto
<
GalaxyNftPublishResultQueryRespDto
>
publishResultQueryRespDto
=
xuperPublishBiz
.
nftPublishResultQuery
(
nftPublishResultQueryReqDto
);
if
(
publishResultQueryRespDto
.
isSuccess
()){
GalaxyNftPublishResultQueryRespDto
nftPublishResultQueryRespDtoTemp
=
publishResultQueryRespDto
.
getData
();
BeanUtil
.
copy
(
nftPublishResultQueryRespDtoTemp
,
nftOrderBo
);
}
}
else
if
(
StringUtil
.
isNotEmpty
(
nftOrderBo
.
getNftBuyStatus
())
}
else
if
(
StringUtil
.
isNotEmpty
(
nftOrderBo
.
getNftBuyStatus
())
&&
(
GalaxyEnum
.
TaskStatusEnum
.
INIT
.
getCode
().
equalsIgnoreCase
(
nftOrderBo
.
getNftBuyStatus
())
&&
(
GalaxyEnum
.
TaskStatusEnum
.
INIT
.
getCode
().
equalsIgnoreCase
(
nftOrderBo
.
getNftBuyStatus
())
||
GalaxyEnum
.
TaskStatusEnum
.
PROCESSING
.
getCode
().
equalsIgnoreCase
(
nftOrderBo
.
getNftBuyStatus
()))){
||
GalaxyEnum
.
TaskStatusEnum
.
PROCESSING
.
getCode
().
equalsIgnoreCase
(
nftOrderBo
.
getNftBuyStatus
()))){
...
@@ -101,11 +100,7 @@ public class XuperTradeBiz {
...
@@ -101,11 +100,7 @@ public class XuperTradeBiz {
GalaxyNftBuyResultQueryReqDto
nftBuyResultQueryReqDto
=
GalaxyNftBuyResultQueryReqDto
.
getNew
();
GalaxyNftBuyResultQueryReqDto
nftBuyResultQueryReqDto
=
GalaxyNftBuyResultQueryReqDto
.
getNew
();
nftBuyResultQueryReqDto
.
setNftOrderPayId
(
reqDto
.
getNftOrderPayId
());
nftBuyResultQueryReqDto
.
setNftOrderPayId
(
reqDto
.
getNftOrderPayId
());
nftBuyResultQueryReqDto
.
setRouterType
(
reqDto
.
getRouterType
());
nftBuyResultQueryReqDto
.
setRouterType
(
reqDto
.
getRouterType
());
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
buyResultQueryRespDto
=
xuperTradeCommonBiz
.
nftBuyResultQuery
(
nftBuyResultQueryReqDto
,
nftOrderBo
);
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
buyResultQueryRespDto
=
this
.
nftBuyResultQuery
(
nftBuyResultQueryReqDto
,
nftOrderBo
);
if
(
buyResultQueryRespDto
.
isSuccess
()){
GalaxyNftBuyResultQueryRespDto
nftBuyResultQueryRespDtoTemp
=
buyResultQueryRespDto
.
getData
();
BeanUtil
.
copy
(
nftBuyResultQueryRespDtoTemp
,
nftOrderBo
);
}
}
}
GalaxyNftPublishAndBuyResultQueryRespDto
resultQueryRespDto
=
GalaxyNftPublishAndBuyResultQueryRespDto
.
getNew
();
GalaxyNftPublishAndBuyResultQueryRespDto
resultQueryRespDto
=
GalaxyNftPublishAndBuyResultQueryRespDto
.
getNew
();
...
@@ -116,4 +111,63 @@ public class XuperTradeBiz {
...
@@ -116,4 +111,63 @@ public class XuperTradeBiz {
}
}
return
ResponseDto
.
failure
(
GalaxyErrorEnum
.
NFT_PUBLISH_AND_BUY_QUERY_FAIL
.
getCode
(),
GalaxyErrorEnum
.
NFT_PUBLISH_AND_BUY_QUERY_FAIL
.
getMessage
(),
resultQueryRespDto
);
return
ResponseDto
.
failure
(
GalaxyErrorEnum
.
NFT_PUBLISH_AND_BUY_QUERY_FAIL
.
getCode
(),
GalaxyErrorEnum
.
NFT_PUBLISH_AND_BUY_QUERY_FAIL
.
getMessage
(),
resultQueryRespDto
);
}
}
private
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
nftBuyResultQuery
(
GalaxyNftBuyResultQueryReqDto
reqDto
,
GalaxyNftOrderBo
nftOrderBo
)
{
//获取订单信息
// GalaxyNftOrderBo nftOrderBo = dataUtils.getNftOrderBo(reqDto.getRouterType(),reqDto.getNftOrderPayId());
// if(StringUtil.isNull(nftOrderBo)){
// return ResponseDto.failure(GalaxyErrorEnum.PUBLISH_ORDER_NOT_EXIST.getCode(), GalaxyErrorEnum.PUBLISH_ORDER_NOT_EXIST.getMessage());
// }
if
(
StringUtil
.
isEmpty
(
nftOrderBo
.
getNftBuyTaskId
())){
return
ResponseDto
.
failure
(
GalaxyErrorEnum
.
NFT_BUY_TASK_NOT_EXIST
.
getCode
(),
GalaxyErrorEnum
.
NFT_BUY_TASK_NOT_EXIST
.
getMessage
());
}
try
{
//执行资产碎片授予查询
Xuper010QuerySdsReqDto
xuper010QuerySdsReqDto
=
Xuper010QuerySdsReqDto
.
getNew
();
// 定义返回结果对象
Xuper010QuerySdsRespDto
xuper010QuerySdsRespDto
=
null
;
long
shardId
=
-
1
l
;
GalaxyNftOrderBindBo
nftOrderBindBo
=
dataUtils
.
getGalaxyNftOrderBindBo
(
reqDto
.
getRouterType
(),
nftOrderBo
.
getNftOrderPayId
());
if
(
StringUtil
.
isNotNull
(
nftOrderBindBo
)){
shardId
=
nftOrderBindBo
.
getNftIdIndex
().
longValue
();
}
xuper010QuerySdsReqDto
.
setAssetId
(
Long
.
parseLong
(
nftOrderBo
.
getSeriesId
()));
xuper010QuerySdsReqDto
.
setShardId
(
shardId
);
XuperResponseDto
<
Xuper010QuerySdsRespDto
>
xuperResponseDto
=
xuperSdkUtil
.
xuper010QuerySds
(
xuper010QuerySdsReqDto
);
log
.
info
(
"xuper010QuerySds resp : "
+
JsonUtils
.
toJson
(
xuperResponseDto
));
if
(
xuperResponseDto
.
isSuccess
()){
xuper010QuerySdsRespDto
=
xuperResponseDto
.
getParseData
(
Xuper010QuerySdsRespDto
.
class
);
if
(
String
.
valueOf
(
xuper010QuerySdsRespDto
.
getErrNo
()).
equalsIgnoreCase
(
ErrorCode
.
SUCCESS
.
getCode
())){
//更新订单缓存数据状态
String
nowTimeStr
=
DateUtil
.
getNowTime
();
//转换任务状态
Integer
taskStatus
=
Integer
.
valueOf
(
GalaxyEnumBiz
.
getGrantStatusEnum
(
reqDto
.
getRouterType
(),
String
.
valueOf
(
xuper010QuerySdsRespDto
.
getMeta
().
getStatus
())).
getCode
());
//设置时间
String
nftBuyChainTimestampStr
=
DateUtil
.
format
(
new
Date
(),
DateUtil
.
Formatter
.
yyyyMMddHHmmss
);
nftOrderBo
.
setNftBuyChainTimestamp
(
nftBuyChainTimestampStr
);
nftOrderBo
.
setNftBuyStatus
(
taskStatus
.
toString
());
nftOrderBo
.
setNftBuyTradeHash
(
xuper010QuerySdsRespDto
.
getMeta
().
getTxId
());
nftOrderBo
.
setNftBuyPayTaskId
(
nftOrderBo
.
getNftBuyTaskId
());
nftOrderBo
.
setUpdatedAt
(
LocalDateTime
.
now
());
//先更新nft购买数据
dataUtils
.
updateNftOrderBuyInfo
(
nftOrderBo
.
getRouterType
(),
nftOrderBo
.
getNftOrderPayId
(),
nftOrderBo
);
GalaxyNftBuyResultQueryRespDto
resultQueryRespDto
=
GalaxyNftBuyResultQueryRespDto
.
getNew
();
resultQueryRespDto
.
setTaskStatus
(
taskStatus
);
resultQueryRespDto
.
setChainTimestamp
(
nowTimeStr
);
resultQueryRespDto
.
setPayTaskId
(
xuper010QuerySdsRespDto
.
getMeta
().
getTxId
());
resultQueryRespDto
.
setTxHash
(
xuper010QuerySdsRespDto
.
getMeta
().
getTxId
());
return
ResponseDto
.
success
(
resultQueryRespDto
);
}
}
}
catch
(
XupterException
e
)
{
log
.
error
(
"biz error msg "
+
e
.
getMessage
(),
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
"sys error msg "
+
e
.
getMessage
(),
e
);
}
return
ResponseDto
.
failure
(
GalaxyErrorEnum
.
NFT_PUBLISH_AND_BUY_QUERY_FAIL
.
getCode
(),
GalaxyErrorEnum
.
NFT_PUBLISH_AND_BUY_QUERY_FAIL
.
getMessage
());
}
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/galaxy/router/zxin/biz/ZxinTradeBiz.java
View file @
8528af95
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.galaxy.router.zxin.biz;
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.galaxy.router.zxin.biz;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
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.ZxlnftEnum
;
import
com.liquidnet.common.third.zxlnft.dto.*
;
import
com.liquidnet.common.third.zxlnft.dto.*
;
import
com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil
;
import
com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.commons.lang.util.*
;
...
@@ -22,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -22,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -108,13 +110,55 @@ public class ZxinTradeBiz {
...
@@ -108,13 +110,55 @@ public class ZxinTradeBiz {
ZxlnftResponseDto
<
Nft044BuyResultRespDto
>
nft044RespDto
=
zxlnftSdkUtil
.
nft044BuyResult
(
nft044ReqDto
);
ZxlnftResponseDto
<
Nft044BuyResultRespDto
>
nft044RespDto
=
zxlnftSdkUtil
.
nft044BuyResult
(
nft044ReqDto
);
GalaxyNftBuyResultQueryRespDto
resultQueryRespDto
=
GalaxyNftBuyResultQueryRespDto
.
getNew
();
GalaxyNftBuyResultQueryRespDto
resultQueryRespDto
=
GalaxyNftBuyResultQueryRespDto
.
getNew
();
BeanUtil
.
copy
(
nft044RespDto
.
getData
(),
resultQueryRespDto
);
if
(
nft044RespDto
.
isSuccess
()){
String
nowTimeStr
=
DateUtil
.
format
(
new
Date
(
nft044RespDto
.
getData
().
getChainTimestamp
().
longValue
()*
1000
),
DateUtil
.
Formatter
.
yyyyMMddHHmmss
);
if
(
nft044RespDto
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_SUCCESS
.
getCode
())){
//转换任务状态
Long
nftBuyChainTimestamp
=
nft044RespDto
.
getData
().
getChainTimestamp
();
Integer
taskStatus
=
Integer
.
valueOf
(
GalaxyEnumBiz
.
getTaskStatusEnum
(
reqDto
.
getRouterType
(),
nft044RespDto
.
getData
().
getTaskStatus
().
toString
()).
getCode
());
Integer
nftBuyStatus
=
nft044RespDto
.
getData
().
getTaskStatus
();
resultQueryRespDto
.
setTaskStatus
(
taskStatus
);
String
nftBuyTradeHash
=
nft044RespDto
.
getData
().
getTxHash
();;
resultQueryRespDto
.
setChainTimestamp
(
nowTimeStr
);
String
nftBuyPayTaskId
=
nft044RespDto
.
getData
().
getPayTaskId
();
return
ResponseDto
.
success
(
resultQueryRespDto
);
//更新订单缓存数据状态
if
(
StringUtil
.
isNotNull
(
nftBuyChainTimestamp
)&&
nftBuyChainTimestamp
!=
0
){
//设置时间
String
nftBuyChainTimestampStr
=
DateUtil
.
format
(
new
Date
(
nftBuyChainTimestamp
*
1000
),
DateUtil
.
Formatter
.
yyyyMMddHHmmss
);
nftOrderBo
.
setNftBuyChainTimestamp
(
nftBuyChainTimestampStr
);
}
if
(
StringUtil
.
isNotNull
(
nftBuyStatus
)){
//转换任务状态
String
nftBuyStatusStr
=
GalaxyEnumBiz
.
getTaskStatusEnum
(
nftOrderBo
.
getRouterType
(),
nftBuyStatus
.
toString
()).
getCode
();
nftOrderBo
.
setNftBuyStatus
(
nftBuyStatusStr
);
}
nftOrderBo
.
setNftBuyTradeHash
(
nftBuyTradeHash
);
nftOrderBo
.
setNftBuyPayTaskId
(
nftBuyPayTaskId
);
nftOrderBo
.
setUpdatedAt
(
LocalDateTime
.
now
());
//先更新nft购买数据
dataUtils
.
updateNftOrderBuyInfo
(
nftOrderBo
.
getRouterType
(),
nftOrderBo
.
getNftOrderPayId
(),
nftOrderBo
);
}
else
if
(
nft044RespDto
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_FAIL
.
getCode
())){
Long
nftBuyChainTimestamp
=
nft044RespDto
.
getData
().
getChainTimestamp
();
Integer
nftBuyStatus
=
nft044RespDto
.
getData
().
getTaskStatus
();
//更新订单缓存数据状态
if
(
StringUtil
.
isNotNull
(
nftBuyChainTimestamp
)&&
nftBuyChainTimestamp
!=
0
){
//设置时间
String
nftBuyChainTimestampStr
=
DateUtil
.
format
(
new
Date
(
nftBuyChainTimestamp
*
1000
),
DateUtil
.
Formatter
.
yyyyMMddHHmmss
);
nftOrderBo
.
setNftBuyChainTimestamp
(
nftBuyChainTimestampStr
);
}
if
(
StringUtil
.
isNotNull
(
nftBuyStatus
)){
//转换任务状态
String
nftBuyStatusStr
=
GalaxyEnumBiz
.
getTaskStatusEnum
(
nftOrderBo
.
getRouterType
(),
nftBuyStatus
.
toString
()).
getCode
();
nftOrderBo
.
setNftBuyStatus
(
nftBuyStatusStr
);
}
nftOrderBo
.
setUpdatedAt
(
LocalDateTime
.
now
());
//先更新nft购买数据
dataUtils
.
updateNftOrderBuyInfo
(
nftOrderBo
.
getRouterType
(),
nftOrderBo
.
getNftOrderPayId
(),
nftOrderBo
);
}
resultQueryRespDto
.
setTaskStatus
(
Integer
.
parseInt
(
nftOrderBo
.
getNftBuyStatus
()));
resultQueryRespDto
.
setChainTimestamp
(
nftOrderBo
.
getNftBuyChainTimestamp
());
return
ResponseDto
.
success
(
resultQueryRespDto
);
}
else
{
return
ResponseDto
.
failure
(
GalaxyErrorEnum
.
NFT_PUBLISH_AND_BUY_QUERY_FAIL
.
getCode
(),
GalaxyErrorEnum
.
NFT_PUBLISH_AND_BUY_QUERY_FAIL
.
getMessage
());
}
}
}
public
ResponseDto
<
GalaxyNftBuyPayResultQueryRespDto
>
nftBuyPayResultQuery
(
GalaxyNftBuyPayResultQueryReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftBuyPayResultQueryRespDto
>
nftBuyPayResultQuery
(
GalaxyNftBuyPayResultQueryReqDto
reqDto
)
{
...
@@ -168,10 +212,6 @@ public class ZxinTradeBiz {
...
@@ -168,10 +212,6 @@ public class ZxinTradeBiz {
nftPublishResultQueryReqDto
.
setNftOrderPayId
(
reqDto
.
getNftOrderPayId
());
nftPublishResultQueryReqDto
.
setNftOrderPayId
(
reqDto
.
getNftOrderPayId
());
nftPublishResultQueryReqDto
.
setRouterType
(
reqDto
.
getRouterType
());
nftPublishResultQueryReqDto
.
setRouterType
(
reqDto
.
getRouterType
());
ResponseDto
<
GalaxyNftPublishResultQueryRespDto
>
publishResultQueryRespDto
=
zxinPublishBiz
.
nftPublishResultQuery
(
nftPublishResultQueryReqDto
);
ResponseDto
<
GalaxyNftPublishResultQueryRespDto
>
publishResultQueryRespDto
=
zxinPublishBiz
.
nftPublishResultQuery
(
nftPublishResultQueryReqDto
);
if
(
publishResultQueryRespDto
.
isSuccess
()){
GalaxyNftPublishResultQueryRespDto
nftPublishResultQueryRespDtoTemp
=
publishResultQueryRespDto
.
getData
();
BeanUtil
.
copy
(
nftPublishResultQueryRespDtoTemp
,
nftOrderBo
);
}
}
else
if
(
StringUtil
.
isNotEmpty
(
nftOrderBo
.
getNftBuyStatus
())
}
else
if
(
StringUtil
.
isNotEmpty
(
nftOrderBo
.
getNftBuyStatus
())
&&
(
GalaxyEnum
.
TaskStatusEnum
.
INIT
.
getCode
().
equalsIgnoreCase
(
nftOrderBo
.
getNftBuyStatus
())
&&
(
GalaxyEnum
.
TaskStatusEnum
.
INIT
.
getCode
().
equalsIgnoreCase
(
nftOrderBo
.
getNftBuyStatus
())
||
GalaxyEnum
.
TaskStatusEnum
.
PROCESSING
.
getCode
().
equalsIgnoreCase
(
nftOrderBo
.
getNftBuyStatus
()))){
||
GalaxyEnum
.
TaskStatusEnum
.
PROCESSING
.
getCode
().
equalsIgnoreCase
(
nftOrderBo
.
getNftBuyStatus
()))){
...
@@ -184,10 +224,6 @@ public class ZxinTradeBiz {
...
@@ -184,10 +224,6 @@ public class ZxinTradeBiz {
nftBuyResultQueryReqDto
.
setNftOrderPayId
(
reqDto
.
getNftOrderPayId
());
nftBuyResultQueryReqDto
.
setNftOrderPayId
(
reqDto
.
getNftOrderPayId
());
nftBuyResultQueryReqDto
.
setRouterType
(
reqDto
.
getRouterType
());
nftBuyResultQueryReqDto
.
setRouterType
(
reqDto
.
getRouterType
());
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
buyResultQueryRespDto
=
this
.
nftBuyResultQuery
(
nftBuyResultQueryReqDto
);
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
buyResultQueryRespDto
=
this
.
nftBuyResultQuery
(
nftBuyResultQueryReqDto
);
if
(
buyResultQueryRespDto
.
isSuccess
()){
GalaxyNftBuyResultQueryRespDto
nftBuyResultQueryRespDtoTemp
=
buyResultQueryRespDto
.
getData
();
BeanUtil
.
copy
(
nftBuyResultQueryRespDtoTemp
,
nftOrderBo
);
}
}
}
//判断是否需要二次购买
//判断是否需要二次购买
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/galaxy/router/zxin/service/GalaxyRouterStrategyZxlTradeImpl.java
View file @
8528af95
...
@@ -42,11 +42,13 @@ public class GalaxyRouterStrategyZxlTradeImpl implements IGalaxyRouterStrategyTr
...
@@ -42,11 +42,13 @@ public class GalaxyRouterStrategyZxlTradeImpl implements IGalaxyRouterStrategyTr
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
}
@Deprecated
@Override
@Override
public
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
nftBuyResultQuery
(
GalaxyNftBuyResultQueryReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
nftBuyResultQuery
(
GalaxyNftBuyResultQueryReqDto
reqDto
)
{
return
zxinTradeBiz
.
nftBuyResultQuery
(
reqDto
);
return
zxinTradeBiz
.
nftBuyResultQuery
(
reqDto
);
}
}
@Deprecated
@Override
@Override
public
ResponseDto
<
GalaxyNftBuyPayResultQueryRespDto
>
nftBuyPayResultQuery
(
GalaxyNftBuyPayResultQueryReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftBuyPayResultQueryRespDto
>
nftBuyPayResultQuery
(
GalaxyNftBuyPayResultQueryReqDto
reqDto
)
{
return
zxinTradeBiz
.
nftBuyPayResultQuery
(
reqDto
);
return
zxinTradeBiz
.
nftBuyPayResultQuery
(
reqDto
);
...
@@ -57,11 +59,13 @@ public class GalaxyRouterStrategyZxlTradeImpl implements IGalaxyRouterStrategyTr
...
@@ -57,11 +59,13 @@ public class GalaxyRouterStrategyZxlTradeImpl implements IGalaxyRouterStrategyTr
return
zxinTradeBiz
.
nftPublishAndBuyResultQuery
(
reqDto
);
return
zxinTradeBiz
.
nftPublishAndBuyResultQuery
(
reqDto
);
}
}
@Deprecated
@Override
@Override
public
ResponseDto
<
GalaxyNftPublishAndBuyRouterBatchQueryRespDto
>
nftPublishAndBuyResultBatchQuery
(
GalaxyNftPublishAndBuyRouterBatchQueryReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftPublishAndBuyRouterBatchQueryRespDto
>
nftPublishAndBuyResultBatchQuery
(
GalaxyNftPublishAndBuyRouterBatchQueryReqDto
reqDto
)
{
return
zxinTradeBiz
.
nftPublishAndBuyResultBatchQuery
(
reqDto
);
return
zxinTradeBiz
.
nftPublishAndBuyResultBatchQuery
(
reqDto
);
}
}
@Deprecated
@Override
@Override
public
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
)
{
return
zxinTradeBiz
.
nftBuy
(
reqDto
);
return
zxinTradeBiz
.
nftBuy
(
reqDto
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/galaxy/service/impl/GalaxyTradeServiceImpl.java
View file @
8528af95
...
@@ -25,7 +25,8 @@ public class GalaxyTradeServiceImpl implements IGalaxyTradeService {
...
@@ -25,7 +25,8 @@ public class GalaxyTradeServiceImpl implements IGalaxyTradeService {
@Override
@Override
public
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
)
{
return
galaxyRouterStrategyContext
.
getTradeStrategy
(
reqDto
.
getRouterType
()).
nftBuy
(
reqDto
);
// return galaxyRouterStrategyContext.getTradeStrategy(reqDto.getRouterType()).nftBuy(reqDto);
return
null
;
}
}
@Override
@Override
...
@@ -35,12 +36,14 @@ public class GalaxyTradeServiceImpl implements IGalaxyTradeService {
...
@@ -35,12 +36,14 @@ public class GalaxyTradeServiceImpl implements IGalaxyTradeService {
@Override
@Override
public
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
nftBuyResultQuery
(
GalaxyNftBuyResultQueryReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
nftBuyResultQuery
(
GalaxyNftBuyResultQueryReqDto
reqDto
)
{
return
galaxyRouterStrategyContext
.
getTradeStrategy
(
reqDto
.
getRouterType
()).
nftBuyResultQuery
(
reqDto
);
// return galaxyRouterStrategyContext.getTradeStrategy(reqDto.getRouterType()).nftBuyResultQuery(reqDto);
return
null
;
}
}
@Override
@Override
public
ResponseDto
<
GalaxyNftBuyPayResultQueryRespDto
>
nftBuyPayResultQuery
(
GalaxyNftBuyPayResultQueryReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftBuyPayResultQueryRespDto
>
nftBuyPayResultQuery
(
GalaxyNftBuyPayResultQueryReqDto
reqDto
)
{
return
galaxyRouterStrategyContext
.
getTradeStrategy
(
reqDto
.
getRouterType
()).
nftBuyPayResultQuery
(
reqDto
);
// return galaxyRouterStrategyContext.getTradeStrategy(reqDto.getRouterType()).nftBuyPayResultQuery(reqDto);
return
null
;
}
}
@Override
@Override
...
@@ -50,6 +53,7 @@ public class GalaxyTradeServiceImpl implements IGalaxyTradeService {
...
@@ -50,6 +53,7 @@ public class GalaxyTradeServiceImpl implements IGalaxyTradeService {
@Override
@Override
public
ResponseDto
<
GalaxyNftPublishAndBuyRouterBatchQueryRespDto
>
nftPublishAndBuyResultBatchQuery
(
GalaxyNftPublishAndBuyRouterBatchQueryReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftPublishAndBuyRouterBatchQueryRespDto
>
nftPublishAndBuyResultBatchQuery
(
GalaxyNftPublishAndBuyRouterBatchQueryReqDto
reqDto
)
{
return
galaxyRouterStrategyContext
.
getTradeStrategy
(
reqDto
.
getRouterType
()).
nftPublishAndBuyResultBatchQuery
(
reqDto
);
// return galaxyRouterStrategyContext.getTradeStrategy(reqDto.getRouterType()).nftPublishAndBuyResultBatchQuery(reqDto);
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