记得上下班打卡 | 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
5616cdb6
Commit
5616cdb6
authored
Mar 16, 2022
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实现zxtnft购买功能
parent
66476459
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
9 deletions
+51
-9
GalaxyErrorCodeEnum.java
...iquidnet/service/galaxy/constant/GalaxyErrorCodeEnum.java
+2
-1
GalaxyArtSeriesClaimRespDto.java
...service/galaxy/dto/param/GalaxyArtSeriesClaimRespDto.java
+37
-2
ZxinArtworkBiz.java
...uidnet/service/galaxy/router/zxin/biz/ZxinArtworkBiz.java
+12
-6
No files found.
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/constant/GalaxyErrorCodeEnum.java
View file @
5616cdb6
...
...
@@ -10,7 +10,8 @@ package com.liquidnet.service.galaxy.constant;
* @date 2022/3/8 11:25
*/
public
enum
GalaxyErrorCodeEnum
{
TRADE_PAY_WAY_ERROR
(
"PAY0010001"
,
"错误的支付方式"
);
SERIES_CLAIM_ERROR
(
"NFT0010001"
,
"NFT系列声明失败"
),
SERIES_CLAIM_ERROR_FIVE_TIMES
(
"NFT0010002"
,
"NFT系列声明失败,任务查询超过5次"
);
private
String
code
;
private
String
message
;
...
...
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/param/GalaxyArtSeriesClaimRespDto.java
View file @
5616cdb6
package
com
.
liquidnet
.
service
.
galaxy
.
dto
.
param
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
...
...
@@ -9,5 +16,33 @@ package com.liquidnet.service.galaxy.dto.param;
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/14 11:21
*/
public
class
GalaxyArtSeriesClaimRespDto
{
}
@ApiModel
(
value
=
"GalaxyArtSeriesClaimRespDto"
,
description
=
"NFT系列声明返回结果"
)
@Data
public
class
GalaxyArtSeriesClaimRespDto
implements
Serializable
,
Cloneable
{
@ApiModelProperty
(
position
=
1
,
required
=
true
,
value
=
"skuId"
)
private
String
skuId
;
@ApiModelProperty
(
position
=
2
,
required
=
true
,
value
=
"素材访问地址"
)
private
String
materialAccessUrl
;
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"系列在区块链上唯一ID"
)
private
String
seriesId
;
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"系列在区块链上的名称"
)
private
String
seriesName
;
@Override
public
String
toString
(){
return
JsonUtils
.
toJson
(
this
);
}
private
static
final
GalaxyArtSeriesClaimRespDto
obj
=
new
GalaxyArtSeriesClaimRespDto
();
public
static
GalaxyArtSeriesClaimRespDto
getNew
()
{
try
{
return
(
GalaxyArtSeriesClaimRespDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GalaxyArtSeriesClaimRespDto
();
}
}
}
\ No newline at end of file
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/zxin/biz/ZxinArtworkBiz.java
View file @
5616cdb6
...
...
@@ -16,6 +16,7 @@ import com.liquidnet.commons.lang.util.IDGenerator;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.constant.GalaxyConstant
;
import
com.liquidnet.service.galaxy.constant.GalaxyErrorCodeEnum
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxySeriesInfoBo
;
import
com.liquidnet.service.galaxy.dto.param.*
;
import
com.liquidnet.service.galaxy.utils.DataUtils
;
...
...
@@ -191,18 +192,23 @@ public class ZxinArtworkBiz {
break
;
}
else
if
(
nft031RespDtoTemp
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_FAIL
.
getCode
())){
log
.
info
(
"任务执行失败!taskId:{}"
,
nft031ReqDto
.
getTaskId
());
break
;
return
ResponseDto
.
failure
(
GalaxyErrorCodeEnum
.
SERIES_CLAIM_ERROR
.
getCode
(),
GalaxyErrorCodeEnum
.
SERIES_CLAIM_ERROR
.
getMessage
())
;
}
if
(
count
==
6
){
log
.
info
(
"=======查询共6次,跳出循环!taskId:{}"
,
nft031ReqDto
.
getTaskId
());
break
;
if
(
count
==
5
){
log
.
info
(
"=======查询共5次,跳出循环!taskId:{}"
,
nft031ReqDto
.
getTaskId
());
return
ResponseDto
.
failure
(
GalaxyErrorCodeEnum
.
SERIES_CLAIM_ERROR_FIVE_TIMES
.
getCode
(),
GalaxyErrorCodeEnum
.
SERIES_CLAIM_ERROR_FIVE_TIMES
.
getMessage
());
}
}
log
.
info
(
"系列声明结果查询 seriesId :{}"
,
seriesId
);
}
GalaxyArtSeriesClaimRespDto
seriesClaimRespDto
=
GalaxyArtSeriesClaimRespDto
.
getNew
();
seriesClaimRespDto
.
setSkuId
(
skuId
);
seriesClaimRespDto
.
setMaterialAccessUrl
(
nftUrl
);
seriesClaimRespDto
.
setSeriesId
(
seriesId
);
seriesClaimRespDto
.
setSeriesName
(
seriesName
);
GalaxySeriesInfoBo
seriesInfoBo
=
GalaxySeriesInfoBo
.
getNew
();
//构造缓存数据
if
(
seriesInfoBo
==
null
){
...
...
@@ -216,7 +222,7 @@ public class ZxinArtworkBiz {
seriesInfoBo
.
setNftUrl
(
nftUrl
);
dataUtils
.
setSeriesInfoBo
(
reqDto
.
getRouteType
(),
reqDto
.
getSkuId
(),
seriesInfoBo
);
}
return
null
;
return
ResponseDto
.
success
(
seriesClaimRespDto
)
;
}
...
...
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