记得上下班打卡 | 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
ea968f06
Commit
ea968f06
authored
Apr 06, 2022
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nft修改购买异常逻辑
parent
a1dce53f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
ZxinTradeCommonBiz.java
...et/service/galaxy/router/zxin/biz/ZxinTradeCommonBiz.java
+6
-6
GalaxyTradeController.java
...dnet/service/galaxy/controller/GalaxyTradeController.java
+4
-4
ZxinTradeBiz.java
...iquidnet/service/galaxy/router/zxin/biz/ZxinTradeBiz.java
+3
-3
No files found.
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-common/src/main/java/com/liquidnet/service/galaxy/router/zxin/biz/ZxinTradeCommonBiz.java
View file @
ea968f06
...
...
@@ -208,7 +208,7 @@ public class ZxinTradeCommonBiz {
log
.
info
(
"任务执行失败!taskId:{}"
,
nft035ReqDto
.
getTaskId
());
nftPublishStatus
=
nft035RespDtoTemp
.
getData
().
getTaskStatus
();
//发行失败
throw
new
GalaxyNftPublishException
(
GalaxyErrorEnum
.
PUBLISH_FAIL
.
getCode
(),
"
ERR_1
:"
+
GalaxyErrorEnum
.
PUBLISH_FAIL
.
getMessage
());
throw
new
GalaxyNftPublishException
(
GalaxyErrorEnum
.
PUBLISH_FAIL
.
getCode
(),
"
nft035PublishResult_resp
:"
+
GalaxyErrorEnum
.
PUBLISH_FAIL
.
getMessage
());
}
else
if
(
nft035RespDtoTemp
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
PROCESSING
.
getCode
())){
log
.
info
(
"任务执行中!taskId:{}"
,
nft035ReqDto
.
getTaskId
());
nftPublishStatus
=
nft035RespDtoTemp
.
getData
().
getTaskStatus
();
...
...
@@ -229,11 +229,11 @@ public class ZxinTradeCommonBiz {
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
//发行失败
throw
new
GalaxyNftPublishException
(
GalaxyErrorEnum
.
NFT_PUBLISH_ERROR
.
getCode
(),
"
ERR_2
:"
+
e
.
getMessage
());
throw
new
GalaxyNftPublishException
(
GalaxyErrorEnum
.
NFT_PUBLISH_ERROR
.
getCode
(),
"
nft035PublishResult_exception
:"
+
e
.
getMessage
());
}
}
else
{
//发行失败
throw
new
GalaxyNftPublishException
(
GalaxyErrorEnum
.
NFT_PUBLISH_ERROR
.
getCode
(),
"
ERR_3
:"
+
nft034RespDto
.
getMessage
());
throw
new
GalaxyNftPublishException
(
GalaxyErrorEnum
.
NFT_PUBLISH_ERROR
.
getCode
(),
"
nft034Publish_resp
:"
+
nft034RespDto
.
getMessage
());
}
}
catch
(
GalaxyNftPublishException
e
)
{
failDesc
=
e
.
getMessage
();
...
...
@@ -386,7 +386,7 @@ public class ZxinTradeCommonBiz {
nftBuyStatus
=
nft044RespDto
.
getData
().
getTaskStatus
();
//购买失败
throw
new
GalaxyNftBuyException
(
GalaxyErrorEnum
.
NFT_BUY_FAIL
.
getCode
(),
"
ERR_1
:"
+
GalaxyErrorEnum
.
NFT_BUY_FAIL
.
getMessage
());
throw
new
GalaxyNftBuyException
(
GalaxyErrorEnum
.
NFT_BUY_FAIL
.
getCode
(),
"
nft044BuyResult_resp
:"
+
GalaxyErrorEnum
.
NFT_BUY_FAIL
.
getMessage
());
}
else
if
(
nft044RespDto
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
PROCESSING
.
getCode
())){
log
.
info
(
"任务执行中!taskId:{}"
,
nft044ReqDto
.
getTaskId
());
nftBuyStatus
=
nft044RespDto
.
getData
().
getTaskStatus
();
...
...
@@ -409,7 +409,7 @@ public class ZxinTradeCommonBiz {
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
//发行失败
throw
new
GalaxyNftBuyException
(
GalaxyErrorEnum
.
NFT_BUY_ERROR
.
getCode
(),
"
ERR_2
:"
+
e
.
getMessage
());
throw
new
GalaxyNftBuyException
(
GalaxyErrorEnum
.
NFT_BUY_ERROR
.
getCode
(),
"
nft044BuyResult_exception
:"
+
e
.
getMessage
());
}
//更新订单缓存数据状态
...
...
@@ -431,7 +431,7 @@ public class ZxinTradeCommonBiz {
dataUtils
.
updateNftOrderBuyInfo
(
routerType
,
nftOrderBo
.
getNftOrderPayId
(),
nftOrderBo
);
}
else
{
//购买失败
throw
new
GalaxyNftBuyException
(
GalaxyErrorEnum
.
NFT_BUY_ERROR
.
getCode
(),
"
ERR_3
:"
+
nft043RespDto
.
getMessage
());
throw
new
GalaxyNftBuyException
(
GalaxyErrorEnum
.
NFT_BUY_ERROR
.
getCode
(),
"
nft043Buy_resp
:"
+
nft043RespDto
.
getMessage
());
}
GalaxyNftBuyRespDto
nftBuyRespDto
=
GalaxyNftBuyRespDto
.
getNew
();
nftBuyRespDto
.
setUserId
(
userInfoBo
.
getUserId
());
...
...
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/controller/GalaxyTradeController.java
View file @
ea968f06
...
...
@@ -75,7 +75,8 @@ public class GalaxyTradeController {
@PostMapping
(
value
=
{
"nftPublishAndBuyResultBatchQuery"
})
public
ResponseDto
<
GalaxyNftPublishAndBuyResultBatchQueryRespDto
>
nftPublishAndBuyResultBatchQuery
(
@Valid
@RequestBody
GalaxyNftPublishAndBuyResultBatchQueryReqDto
reqDto
){
//定义返回结果
List
<
GalaxyNftPublishAndBuyRouterBatchQueryRespDto
>
routerBuyInfoList
=
new
ArrayList
<>();
List
<
GalaxyNftPublishAndBuyRouterBatchQueryRespDto
>
batchQueryRespDtosList
=
new
ArrayList
<>();
//获取请求信息
List
<
GalaxyNftPublishAndBuyResultBatchQueryReqDto
.
RouterOrderInfo
>
routerOrderInfoList
=
reqDto
.
getRouterOrderInfoList
();
routerOrderInfoList
.
forEach
(
routerOrderInfo
->
{
GalaxyNftPublishAndBuyRouterBatchQueryReqDto
batchQueryReqDto
=
GalaxyNftPublishAndBuyRouterBatchQueryReqDto
.
getNew
();
...
...
@@ -84,13 +85,12 @@ public class GalaxyTradeController {
batchQueryReqDto
.
setNftOrderPayIdList
(
routerOrderInfo
.
getNftOrderPayIdList
());
ResponseDto
<
GalaxyNftPublishAndBuyRouterBatchQueryRespDto
>
responseDtoTemp
=
galaxyTradeService
.
nftPublishAndBuyResultBatchQuery
(
batchQueryReqDto
);
if
(
responseDtoTemp
.
isSuccess
()){
GalaxyNftPublishAndBuyRouterBatchQueryRespDto
routerBatchQueryRespDto
=
GalaxyNftPublishAndBuyRouterBatchQueryRespDto
.
getNew
();
routerBuyInfoList
.
add
(
routerBatchQueryRespDto
);
batchQueryRespDtosList
.
add
(
responseDtoTemp
.
getData
());
}
});
GalaxyNftPublishAndBuyResultBatchQueryRespDto
respDto
=
GalaxyNftPublishAndBuyResultBatchQueryRespDto
.
getNew
();
respDto
.
setUserId
(
reqDto
.
getUserId
());
respDto
.
setRouterBuyInfoList
(
routerBuyInfo
List
);
respDto
.
setRouterBuyInfoList
(
batchQueryRespDtos
List
);
return
ResponseDto
.
success
(
respDto
);
}
...
...
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/zxin/biz/ZxinTradeBiz.java
View file @
ea968f06
...
...
@@ -189,16 +189,16 @@ public class ZxinTradeBiz {
public
ResponseDto
<
GalaxyNftPublishAndBuyRouterBatchQueryRespDto
>
nftPublishAndBuyResultBatchQuery
(
GalaxyNftPublishAndBuyRouterBatchQueryReqDto
reqDto
)
{
List
<
String
>
nftOrderPayIdList
=
reqDto
.
getNftOrderPayIdList
();
List
<
GalaxyNftPublishAndBuyResultQueryRespDto
>
buyInfoList
=
new
ArrayList
<>();
nftOrderPayIdList
.
stream
().
forEach
(
nftOrderPayId
->
{
for
(
int
i
=
0
;
i
<
nftOrderPayIdList
.
size
();
i
++)
{
GalaxyNftPublishAndBuyResultQueryReqDto
resultQueryReqDto
=
GalaxyNftPublishAndBuyResultQueryReqDto
.
getNew
();
resultQueryReqDto
.
setUserId
(
reqDto
.
getUserId
());
resultQueryReqDto
.
setNftOrderPayId
(
nftOrderPayId
);
resultQueryReqDto
.
setNftOrderPayId
(
nftOrderPayId
List
.
get
(
i
)
);
resultQueryReqDto
.
setRouterType
(
reqDto
.
getRouterType
());
ResponseDto
<
GalaxyNftPublishAndBuyResultQueryRespDto
>
resultQueryRespDto
=
this
.
nftPublishAndBuyResultQuery
(
resultQueryReqDto
);
if
(
resultQueryRespDto
.
isSuccess
()){
buyInfoList
.
add
(
resultQueryRespDto
.
getData
());
}
}
);
}
GalaxyNftPublishAndBuyRouterBatchQueryRespDto
routerBatchQueryRespDto
=
GalaxyNftPublishAndBuyRouterBatchQueryRespDto
.
getNew
();
routerBatchQueryRespDto
.
setUserId
(
reqDto
.
getUserId
());
routerBatchQueryRespDto
.
setRouterType
(
reqDto
.
getRouterType
());
...
...
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