记得上下班打卡 | 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
dd9c2b2b
Commit
dd9c2b2b
authored
Jul 27, 2022
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
百度链购买查询优化
parent
e6352427
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
35 deletions
+91
-35
XuperSdkUtil.java
...a/com/liquidnet/common/third/xuper/util/XuperSdkUtil.java
+17
-17
XuperTradeCommonBiz.java
.../service/galaxy/router/xuper/biz/XuperTradeCommonBiz.java
+2
-0
XuperTradeBiz.java
...uidnet/service/galaxy/router/xuper/biz/XuperTradeBiz.java
+72
-18
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 @
dd9c2b2b
...
@@ -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-service/liquidnet-service-goblin/liquidnet-service-goblin-common/src/main/java/com/liquidnet/service/galaxy/router/xuper/biz/XuperTradeCommonBiz.java
View file @
dd9c2b2b
...
@@ -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-impl/src/main/java/com/liquidnet/service/galaxy/router/xuper/biz/XuperTradeBiz.java
View file @
dd9c2b2b
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
());
}
}
}
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