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

Commit ea968f06 authored by anjiabin's avatar anjiabin

nft修改购买异常逻辑

parent a1dce53f
......@@ -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());
......
......@@ -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(routerBuyInfoList);
respDto.setRouterBuyInfoList(batchQueryRespDtosList);
return ResponseDto.success(respDto);
}
......
......@@ -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(nftOrderPayIdList.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());
......
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