记得上下班打卡 | 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
f9e52db0
Commit
f9e52db0
authored
Mar 31, 2022
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nft修改购买逻辑
parent
ef5a6c77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
13 deletions
+34
-13
ZxinTradeBiz.java
...iquidnet/service/galaxy/router/zxin/biz/ZxinTradeBiz.java
+34
-13
No files found.
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/zxin/biz/ZxinTradeBiz.java
View file @
f9e52db0
...
...
@@ -9,6 +9,7 @@ import com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.service.base.ResponseDto
;
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.GalaxySeriesNftInfoBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxyUserInfoBo
;
...
...
@@ -95,6 +96,26 @@ public class ZxinTradeBiz {
//初始化订单数据
if
(
nftOrderBo
==
null
){
nftOrderBo
=
zxinCommonBiz
.
buildNftOrderBo
(
reqDto
.
getNftOrderPayId
(),
userInfoBo
,
seriesNftInfoBo
);
dataUtils
.
setNftOrderBo
(
reqDto
.
getRouterType
(),
reqDto
.
getNftOrderPayId
(),
nftOrderBo
);
}
/**
* 获取订单和nft绑定信息
*/
GalaxyNftOrderBindBo
nftOrderBindBo
=
dataUtils
.
getGalaxyNftOrderBindBo
(
reqDto
.
getRouterType
(),
reqDto
.
getNftOrderPayId
());
if
(
StringUtil
.
isNull
(
nftOrderBindBo
)){
//获取发行索引
long
nftIdNo
=
dataUtils
.
incrNftIdNo
(
reqDto
.
getRouterType
(),
reqDto
.
getSkuId
());
nftOrderBindBo
=
GalaxyNftOrderBindBo
.
getNew
();
nftOrderBindBo
.
setNftOrderPayId
(
reqDto
.
getNftOrderPayId
());
nftOrderBindBo
.
setSeriesId
(
seriesNftInfoBo
.
getSeriesId
());
nftOrderBindBo
.
setSeriesCode
(
seriesNftInfoBo
.
getSeriesCode
());
nftOrderBindBo
.
setNftIdIndex
(
Integer
.
valueOf
(
String
.
valueOf
(
nftIdNo
)));
nftOrderBindBo
.
setRouterType
(
reqDto
.
getRouterType
());
String
nowTimeStr
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
LocalDateTime
.
now
());
nftOrderBindBo
.
setCreatedAt
(
nowTimeStr
);
dataUtils
.
setGalaxyNftOrderBindBo
(
reqDto
.
getRouterType
(),
reqDto
.
getNftOrderPayId
(),
nftOrderBindBo
);
}
...
...
@@ -108,7 +129,7 @@ public class ZxinTradeBiz {
//发行个数
Long
publishCount
=
1L
;
//开始索引
Integer
seriesBeginIndex
=
0
;
Integer
seriesBeginIndex
=
nftOrderBindBo
.
getNftIdIndex
()
;
//发行金额
Long
sellCount
=
seriesNftInfoBo
.
getSellCount
().
longValue
();
//积分
/**
...
...
@@ -123,18 +144,18 @@ public class ZxinTradeBiz {
String
nftPublishTradeHash
=
null
;
//查询系列信息
Nft032SeriesReqDto
nft032ReqDto
=
Nft032SeriesReqDto
.
getNew
();
nft032ReqDto
.
setSeriesId
(
seriesId
);
ZxlnftResponseDto
<
Nft032SeriesRespDto
>
resp
=
zxlnftSdkUtil
.
nft032Series
(
nft032ReqDto
);
if
(
resp
.
isSuccess
()){
//该系列已经发行多少个nft
Long
crtCount
=
resp
.
getData
().
getSeriesInfo
().
getCrtCount
();
log
.
info
(
"系列:{} 已发行 :{}"
,
seriesId
,
crtCount
);
//设置开始索引
seriesBeginIndex
=
Integer
.
parseInt
(
String
.
valueOf
(
crtCount
.
longValue
()
+
1
));
}
// //查询系列信息(暂时不通过系列查询获取发行序列号)
//
Nft032SeriesReqDto nft032ReqDto = Nft032SeriesReqDto.getNew();
//
nft032ReqDto.setSeriesId(seriesId);
//
ZxlnftResponseDto<Nft032SeriesRespDto> resp = zxlnftSdkUtil.nft032Series(nft032ReqDto);
//
//
if(resp.isSuccess()){
//
//该系列已经发行多少个nft
//
Long crtCount = resp.getData().getSeriesInfo().getCrtCount();
//
log.info("系列:{} 已发行 :{}", seriesId, crtCount);
//
//设置开始索引
//
seriesBeginIndex = Integer.parseInt(String.valueOf(crtCount.longValue() + 1));
//
}
//3.1.2调用NFT发行接口
/**
...
...
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