记得上下班打卡 | git大法好,push需谨慎

Commit dd872d53 authored by anjiabin's avatar anjiabin

更新购买逻辑修复购买失败记录

parent 51882d78
......@@ -345,7 +345,13 @@ public class ZxinTradeCommonBiz {
String nftBuyTradeHash = null;
String nftBuyPayTaskId = null;
// 3.2.2调用购买NFT接口
//如果购买任务不为空,则直接进行购买任务查询
if(StringUtil.isNotEmpty(nftOrderBo.getNftBuyTaskId())){
nftBuyTaskId = nftOrderBo.getNftBuyTaskId();
}
if(StringUtil.isEmpty(nftBuyTaskId)){
// 3.2.2调用购买NFT接口
Nft043BuyReqDto nft043BuyReqDto = Nft043BuyReqDto.getNew();
nft043BuyReqDto.setNftId(nftId);
nft043BuyReqDto.setApplyScore(seriesNftInfoBo.getSellCount().intValue());
......@@ -380,10 +386,14 @@ public class ZxinTradeCommonBiz {
ZxlnftResponseDto<Nft043BuyRespDto> nft043RespDto = zxlnftSdkUtil.nft043Buy(nft043BuyReqDto);
if(nft043RespDto.isSuccess()){
try{
nftBuyTaskId = nft043RespDto.getData().getTaskId();
nftOrderBo.setNftBuyTaskId(nftBuyTaskId);
}
}
//如果购买任务id不为空
if(StringUtil.isNotEmpty(nftBuyTaskId)){
try{
//3.2.4查询NFT购买结果
Nft044BuyResultReqDto nft044ReqDto = Nft044BuyResultReqDto.getNew();
nft044ReqDto.setTaskId(nftBuyTaskId);
......@@ -445,11 +455,11 @@ public class ZxinTradeCommonBiz {
nftOrderBo.setNftBuyTradeHash(nftBuyTradeHash);
nftOrderBo.setNftBuyPayTaskId(nftBuyPayTaskId);
nftOrderBo.setUpdatedAt(LocalDateTime.now());
//先更新nft发行数据
//先更新nft购买数据
dataUtils.updateNftOrderBuyInfo(routerType,nftOrderBo.getNftOrderPayId(),nftOrderBo);
}else{
//购买失败
throw new GalaxyNftBuyException(GalaxyErrorEnum.NFT_BUY_ERROR.getCode(),"nft043Buy_resp:"+nft043RespDto.getMessage());
throw new GalaxyNftBuyException(GalaxyErrorEnum.NFT_BUY_ERROR.getCode(),"nft043Buy_resp: nftBuyTaskId:"+nftBuyTaskId);
}
GalaxyNftBuyRespDto nftBuyRespDto = GalaxyNftBuyRespDto.getNew();
nftBuyRespDto.setUserId(userInfoBo.getUserId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment