记得上下班打卡 | 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
571330b5
Commit
571330b5
authored
Mar 23, 2022
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化相关策略实现
parent
3bbee149
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
68 additions
and
30 deletions
+68
-30
GalaxyErrorEnum.java
...om/liquidnet/service/galaxy/constant/GalaxyErrorEnum.java
+4
-3
GalaxySeriesInfoBo.java
...m/liquidnet/service/galaxy/dto/bo/GalaxySeriesInfoBo.java
+4
-0
liquidnet-service-galaxy-dev.yml
...-config/liquidnet-config/liquidnet-service-galaxy-dev.yml
+3
-1
GalaxyRouterStrategyContext.java
...e/galaxy/router/strategy/GalaxyRouterStrategyContext.java
+9
-9
GalaxyEnumBiz.java
...net/service/galaxy/router/strategy/biz/GalaxyEnumBiz.java
+2
-2
ZxinArtworkBiz.java
...uidnet/service/galaxy/router/zxin/biz/ZxinArtworkBiz.java
+40
-9
ZxinPublishBiz.java
...uidnet/service/galaxy/router/zxin/biz/ZxinPublishBiz.java
+3
-3
ZxinTradeBiz.java
...iquidnet/service/galaxy/router/zxin/biz/ZxinTradeBiz.java
+3
-3
No files found.
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/constant/GalaxyError
Code
Enum.java
→
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/constant/GalaxyErrorEnum.java
View file @
571330b5
...
@@ -9,17 +9,18 @@ package com.liquidnet.service.galaxy.constant;
...
@@ -9,17 +9,18 @@ package com.liquidnet.service.galaxy.constant;
* @Copyright: LightNet @ Copyright (c) 2022
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/8 11:25
* @date 2022/3/8 11:25
*/
*/
public
enum
GalaxyError
Code
Enum
{
public
enum
GalaxyErrorEnum
{
SERIES_CLAIM_ERROR
(
"NFT0010001"
,
"NFT系列声明失败"
),
SERIES_CLAIM_ERROR
(
"NFT0010001"
,
"NFT系列声明失败"
),
SERIES_CLAIM_ERROR_FIVE_TIMES
(
"NFT0010002"
,
"NFT系列声明失败,任务查询超过5次"
),
SERIES_CLAIM_ERROR_FIVE_TIMES
(
"NFT0010002"
,
"NFT系列声明失败,任务查询超过5次"
),
PUBLISH_FAIL
(
"NFT0010003"
,
"NFT发行失败,未获取nft"
),
PUBLISH_FAIL
(
"NFT0010003"
,
"NFT发行失败,未获取nft"
),
PUBLISH_BUY_FAIL
(
"NFT0010004"
,
"NFT发行购买失败,未发起购买"
),
PUBLISH_BUY_FAIL
(
"NFT0010004"
,
"NFT发行购买失败,未发起购买"
),
PUBLISH_FAIL_ALREADY_EXIST
(
"NFT0010005"
,
"NFT发行失败,该订单已经发行过指定nft!"
),
PUBLISH_FAIL_ALREADY_EXIST
(
"NFT0010005"
,
"NFT发行失败,该订单已经发行过指定nft!"
),
ROUTER_NOT_EXIST
(
"NFT0010006"
,
"路由类型不存在"
);
ROUTER_NOT_EXIST
(
"NFT0010006"
,
"路由类型不存在"
),
SERIES_NOT_EXIST
(
"NFT0010007"
,
"没有查询到该sku对应系列声明"
);
private
String
code
;
private
String
code
;
private
String
message
;
private
String
message
;
GalaxyError
Code
Enum
(
String
code
,
String
message
)
{
GalaxyErrorEnum
(
String
code
,
String
message
)
{
this
.
code
=
code
;
this
.
code
=
code
;
this
.
message
=
message
;
this
.
message
=
message
;
}
}
...
...
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/bo/GalaxySeriesInfoBo.java
View file @
571330b5
...
@@ -45,6 +45,10 @@ public class GalaxySeriesInfoBo implements Serializable,Cloneable {
...
@@ -45,6 +45,10 @@ public class GalaxySeriesInfoBo implements Serializable,Cloneable {
* nft显示素材原始地址
* nft显示素材原始地址
*/
*/
private
String
originalDisplayUrl
;
private
String
originalDisplayUrl
;
/**
* 系列声明任务ID
*/
private
String
seriesClaimTaskId
;
/**
/**
* 系列发布状态
* 系列发布状态
*/
*/
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-galaxy-dev.yml
View file @
571330b5
...
@@ -19,4 +19,6 @@ liquidnet:
...
@@ -19,4 +19,6 @@ liquidnet:
sslEnabled
:
false
sslEnabled
:
false
database
:
dev_ln_scene
database
:
dev_ln_scene
galaxy
:
galaxy
:
temp-file-path
:
/data/galaxy/tempFilePath
# temp-file-path: /data/galaxy/tempFilePath
temp-file-path
:
/Users/anjiabin/mdsky_gitlab/galaxy/tempFilePath
router
:
zxinchain,eth
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/GalaxyRouterStrategyContext.java
View file @
571330b5
...
@@ -2,7 +2,7 @@ package com.liquidnet.service.galaxy.router.strategy;
...
@@ -2,7 +2,7 @@ package com.liquidnet.service.galaxy.router.strategy;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.service.galaxy.constant.GalaxyError
Code
Enum
;
import
com.liquidnet.service.galaxy.constant.GalaxyErrorEnum
;
import
com.liquidnet.service.galaxy.router.strategy.config.GalaxyConfig
;
import
com.liquidnet.service.galaxy.router.strategy.config.GalaxyConfig
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -32,10 +32,10 @@ public class GalaxyRouterStrategyContext {
...
@@ -32,10 +32,10 @@ public class GalaxyRouterStrategyContext {
public
IGalaxyRouterStrategyArtwork
getArtworkStrategy
(
String
type
)
{
public
IGalaxyRouterStrategyArtwork
getArtworkStrategy
(
String
type
)
{
if
(!
this
.
isActived
(
type
)){
if
(!
this
.
isActived
(
type
)){
throw
new
LiquidnetServiceException
(
GalaxyError
CodeEnum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyErrorCode
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
throw
new
LiquidnetServiceException
(
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
}
}
IGalaxyRouterStrategyArtwork
obj
=
artworkHandlerMap
.
get
(
type
);
IGalaxyRouterStrategyArtwork
obj
=
artworkHandlerMap
.
get
(
type
);
if
(
StringUtil
.
isNull
(
obj
))
throw
new
LiquidnetServiceException
(
GalaxyError
CodeEnum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyErrorCode
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
if
(
StringUtil
.
isNull
(
obj
))
throw
new
LiquidnetServiceException
(
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
return
obj
;
return
obj
;
}
}
...
@@ -45,10 +45,10 @@ public class GalaxyRouterStrategyContext {
...
@@ -45,10 +45,10 @@ public class GalaxyRouterStrategyContext {
public
IGalaxyRouterStrategyUser
getUserStrategy
(
String
type
)
{
public
IGalaxyRouterStrategyUser
getUserStrategy
(
String
type
)
{
if
(!
this
.
isActived
(
type
)){
if
(!
this
.
isActived
(
type
)){
throw
new
LiquidnetServiceException
(
GalaxyError
CodeEnum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyErrorCode
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
throw
new
LiquidnetServiceException
(
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
}
}
IGalaxyRouterStrategyUser
obj
=
userHandlerMap
.
get
(
type
);
IGalaxyRouterStrategyUser
obj
=
userHandlerMap
.
get
(
type
);
if
(
StringUtil
.
isNull
(
obj
))
throw
new
LiquidnetServiceException
(
GalaxyError
CodeEnum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyErrorCode
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
if
(
StringUtil
.
isNull
(
obj
))
throw
new
LiquidnetServiceException
(
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
return
obj
;
return
obj
;
}
}
...
@@ -58,10 +58,10 @@ public class GalaxyRouterStrategyContext {
...
@@ -58,10 +58,10 @@ public class GalaxyRouterStrategyContext {
public
IGalaxyRouterStrategyPublish
getPublishStrategy
(
String
type
)
{
public
IGalaxyRouterStrategyPublish
getPublishStrategy
(
String
type
)
{
if
(!
this
.
isActived
(
type
)){
if
(!
this
.
isActived
(
type
)){
throw
new
LiquidnetServiceException
(
GalaxyError
CodeEnum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyErrorCode
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
throw
new
LiquidnetServiceException
(
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
}
}
IGalaxyRouterStrategyPublish
obj
=
publishHandlerMap
.
get
(
type
);
IGalaxyRouterStrategyPublish
obj
=
publishHandlerMap
.
get
(
type
);
if
(
StringUtil
.
isNull
(
obj
))
throw
new
LiquidnetServiceException
(
GalaxyError
CodeEnum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyErrorCode
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
if
(
StringUtil
.
isNull
(
obj
))
throw
new
LiquidnetServiceException
(
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
return
obj
;
return
obj
;
}
}
...
@@ -71,10 +71,10 @@ public class GalaxyRouterStrategyContext {
...
@@ -71,10 +71,10 @@ public class GalaxyRouterStrategyContext {
public
IGalaxyRouterStrategyTrade
getTradeStrategy
(
String
type
)
{
public
IGalaxyRouterStrategyTrade
getTradeStrategy
(
String
type
)
{
if
(!
this
.
isActived
(
type
)){
if
(!
this
.
isActived
(
type
)){
throw
new
LiquidnetServiceException
(
GalaxyError
CodeEnum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyErrorCode
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
throw
new
LiquidnetServiceException
(
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
}
}
IGalaxyRouterStrategyTrade
obj
=
tradeHandlerMap
.
get
(
type
);
IGalaxyRouterStrategyTrade
obj
=
tradeHandlerMap
.
get
(
type
);
if
(
StringUtil
.
isNull
(
obj
))
throw
new
LiquidnetServiceException
(
GalaxyError
CodeEnum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyErrorCode
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
if
(
StringUtil
.
isNull
(
obj
))
throw
new
LiquidnetServiceException
(
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getCode
(),
GalaxyError
Enum
.
ROUTER_NOT_EXIST
.
getMessage
());
return
obj
;
return
obj
;
}
}
...
...
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/biz/GalaxyEnumBiz.java
View file @
571330b5
...
@@ -21,9 +21,9 @@ public class GalaxyEnumBiz {
...
@@ -21,9 +21,9 @@ public class GalaxyEnumBiz {
* @param code
* @param code
* @return
* @return
*/
*/
public
static
GalaxyEnum
.
TaskStatusEnum
getTaskStatusEnum
(
GalaxyEnum
.
RouterTypeEnum
routerTypeEnum
,
String
code
){
public
static
GalaxyEnum
.
TaskStatusEnum
getTaskStatusEnum
(
String
routerType
,
String
code
){
GalaxyEnum
.
TaskStatusEnum
taskStatusEnum
=
null
;
GalaxyEnum
.
TaskStatusEnum
taskStatusEnum
=
null
;
switch
(
routerType
Enum
.
getCode
()
){
switch
(
routerType
){
case
"zxinchain"
:
case
"zxinchain"
:
if
(
code
.
equalsIgnoreCase
(
ZxlnftEnum
.
TaskStatusEnum
.
PROCESSING
.
getCode
())){
if
(
code
.
equalsIgnoreCase
(
ZxlnftEnum
.
TaskStatusEnum
.
PROCESSING
.
getCode
())){
taskStatusEnum
=
GalaxyEnum
.
TaskStatusEnum
.
PROCESSING
;
taskStatusEnum
=
GalaxyEnum
.
TaskStatusEnum
.
PROCESSING
;
...
...
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/zxin/biz/ZxinArtworkBiz.java
View file @
571330b5
...
@@ -17,10 +17,11 @@ import com.liquidnet.commons.lang.util.StringUtil;
...
@@ -17,10 +17,11 @@ import com.liquidnet.commons.lang.util.StringUtil;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.constant.GalaxyConstant
;
import
com.liquidnet.service.galaxy.constant.GalaxyConstant
;
import
com.liquidnet.service.galaxy.constant.GalaxyEnum
;
import
com.liquidnet.service.galaxy.constant.GalaxyEnum
;
import
com.liquidnet.service.galaxy.constant.GalaxyError
Code
Enum
;
import
com.liquidnet.service.galaxy.constant.GalaxyErrorEnum
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxySeriesInfoBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxySeriesInfoBo
;
import
com.liquidnet.service.galaxy.dto.param.*
;
import
com.liquidnet.service.galaxy.dto.param.*
;
import
com.liquidnet.service.galaxy.router.strategy.biz.GalaxyCommonBiz
;
import
com.liquidnet.service.galaxy.router.strategy.biz.GalaxyCommonBiz
;
import
com.liquidnet.service.galaxy.router.strategy.biz.GalaxyEnumBiz
;
import
com.liquidnet.service.galaxy.utils.DataUtils
;
import
com.liquidnet.service.galaxy.utils.DataUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -86,6 +87,20 @@ public class ZxinArtworkBiz {
...
@@ -86,6 +87,20 @@ public class ZxinArtworkBiz {
galaxyNftUploadRespDto
.
setOriginalNftUrl
(
reqDto
.
getOriginalNftUrl
());
galaxyNftUploadRespDto
.
setOriginalNftUrl
(
reqDto
.
getOriginalNftUrl
());
galaxyNftUploadRespDto
.
setDisplayUrl
(
this
.
getFullFilePath
(
seriesName
,
originalDisplayUrl
));
galaxyNftUploadRespDto
.
setDisplayUrl
(
this
.
getFullFilePath
(
seriesName
,
originalDisplayUrl
));
galaxyNftUploadRespDto
.
setOriginalDisplayUrl
(
reqDto
.
getOriginalDisplayUrl
());
galaxyNftUploadRespDto
.
setOriginalDisplayUrl
(
reqDto
.
getOriginalDisplayUrl
());
/**
* 系列缓存初始化
*/
//获取任务ID
GalaxySeriesInfoBo
seriesInfoBo
=
dataUtils
.
getSeriesInfoBo
(
reqDto
.
getRouterType
(),
reqDto
.
getSkuId
());
if
(
StringUtil
.
isNotNull
(
seriesInfoBo
)){
return
ResponseDto
.
failure
(
"素材已经上传过!"
);
}
seriesInfoBo
=
this
.
buildSeriesInfoBo
(
false
,
reqDto
.
getSkuId
(),
seriesName
,
null
,
null
,
0
l
,
originalNftUrl
,
originalDisplayUrl
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
);
dataUtils
.
setSeriesInfoBo
(
reqDto
.
getRouterType
(),
reqDto
.
getSkuId
(),
seriesInfoBo
);
return
ResponseDto
.
success
(
galaxyNftUploadRespDto
);
return
ResponseDto
.
success
(
galaxyNftUploadRespDto
);
// 1.4.4调用查询素材地址接口 -- 非必需
// 1.4.4调用查询素材地址接口 -- 非必需
...
@@ -172,11 +187,11 @@ public class ZxinArtworkBiz {
...
@@ -172,11 +187,11 @@ public class ZxinArtworkBiz {
break
;
break
;
}
else
if
(
nft031RespDtoTemp
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_FAIL
.
getCode
())){
}
else
if
(
nft031RespDtoTemp
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_FAIL
.
getCode
())){
log
.
info
(
"任务执行失败!taskId:{}"
,
nft031ReqDto
.
getTaskId
());
log
.
info
(
"任务执行失败!taskId:{}"
,
nft031ReqDto
.
getTaskId
());
return
ResponseDto
.
failure
(
GalaxyError
CodeEnum
.
SERIES_CLAIM_ERROR
.
getCode
(),
GalaxyErrorCode
Enum
.
SERIES_CLAIM_ERROR
.
getMessage
());
return
ResponseDto
.
failure
(
GalaxyError
Enum
.
SERIES_CLAIM_ERROR
.
getCode
(),
GalaxyError
Enum
.
SERIES_CLAIM_ERROR
.
getMessage
());
}
}
if
(
count
==
5
){
if
(
count
==
5
){
log
.
info
(
"=======查询共5次,跳出循环!taskId:{}"
,
nft031ReqDto
.
getTaskId
());
log
.
info
(
"=======查询共5次,跳出循环!taskId:{}"
,
nft031ReqDto
.
getTaskId
());
return
ResponseDto
.
failure
(
GalaxyError
CodeEnum
.
SERIES_CLAIM_ERROR_FIVE_TIMES
.
getCode
(),
GalaxyErrorCode
Enum
.
SERIES_CLAIM_ERROR_FIVE_TIMES
.
getMessage
());
return
ResponseDto
.
failure
(
GalaxyError
Enum
.
SERIES_CLAIM_ERROR_FIVE_TIMES
.
getCode
(),
GalaxyError
Enum
.
SERIES_CLAIM_ERROR_FIVE_TIMES
.
getMessage
());
}
}
}
}
...
@@ -191,22 +206,33 @@ public class ZxinArtworkBiz {
...
@@ -191,22 +206,33 @@ public class ZxinArtworkBiz {
//构造缓存数据
//构造缓存数据
if
(
seriesInfoBo
==
null
){
if
(
seriesInfoBo
==
null
){
seriesInfoBo
=
this
.
buildSeriesInfoBo
(
false
,
skuId
,
seriesName
,
seriesId
,
totalCount
,
0
l
,
seriesInfoBo
=
this
.
buildSeriesInfoBo
(
false
,
skuId
,
seriesName
,
seriesId
,
totalCount
,
0
l
author
,
nftName
,
nftUrl
,
displayUrl
,
nftDesc
,
nftFlag
,
sellCount
,
coverUrl
,
seriesDesc
);
,
null
,
null
,
null
,
author
,
nftName
,
nftUrl
,
displayUrl
,
nftDesc
,
nftFlag
,
sellCount
,
coverUrl
,
seriesDesc
);
dataUtils
.
setSeriesInfoBo
(
reqDto
.
getRouterType
(),
reqDto
.
getSkuId
(),
seriesInfoBo
);
dataUtils
.
setSeriesInfoBo
(
reqDto
.
getRouterType
(),
reqDto
.
getSkuId
(),
seriesInfoBo
);
}
}
return
ResponseDto
.
success
(
seriesClaimRespDto
);
return
ResponseDto
.
success
(
seriesClaimRespDto
);
}
}
public
ResponseDto
<
GalaxyArtSeriesClaimResultQueryRespDto
>
seriesClaimResultQuery
(
GalaxyArtSeriesClaimResultQueryReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyArtSeriesClaimResultQueryRespDto
>
seriesClaimResultQuery
(
GalaxyArtSeriesClaimResultQueryReqDto
reqDto
)
{
//获取任务ID
GalaxySeriesInfoBo
seriesInfoBo
=
dataUtils
.
getSeriesInfoBo
(
reqDto
.
getRouterType
(),
reqDto
.
getSkuId
());
if
(
StringUtil
.
isNull
(
seriesInfoBo
)||
StringUtil
.
isEmpty
(
seriesInfoBo
.
getSeriesClaimTaskId
())){
return
ResponseDto
.
failure
(
GalaxyErrorEnum
.
SERIES_NOT_EXIST
.
getCode
(),
GalaxyErrorEnum
.
SERIES_NOT_EXIST
.
getMessage
());
}
//查询NFT系列声明结果
Nft031SeriesClaimResultReqDto
nft031SeriesClaimResultReqDto
=
Nft031SeriesClaimResultReqDto
.
getNew
();
Nft031SeriesClaimResultReqDto
nft031SeriesClaimResultReqDto
=
Nft031SeriesClaimResultReqDto
.
getNew
();
nft031SeriesClaimResultReqDto
.
setTaskId
(
seriesInfoBo
.
getSeriesClaimTaskId
());
nft031SeriesClaimResultReqDto
.
setPlatformPubKey
(
zxlnftConfig
.
getNftPlatformPubKey
());
ZxlnftResponseDto
<
Nft031SeriesClaimResultRespDto
>
resp
=
zxlnftSdkUtil
.
nft031SeriesClaimResult
(
nft031SeriesClaimResultReqDto
);
ZxlnftResponseDto
<
Nft031SeriesClaimResultRespDto
>
resp
=
zxlnftSdkUtil
.
nft031SeriesClaimResult
(
nft031SeriesClaimResultReqDto
);
if
(
resp
.
isSuccess
()){
if
(
resp
.
isSuccess
()){
GalaxyArtSeriesClaimResultQueryRespDto
resultQueryRespDto
=
GalaxyArtSeriesClaimResultQueryRespDto
.
getNew
();
GalaxyArtSeriesClaimResultQueryRespDto
resultQueryRespDto
=
GalaxyArtSeriesClaimResultQueryRespDto
.
getNew
();
BeanUtil
.
copy
(
resp
.
getData
(),
resultQueryRespDto
);
BeanUtil
.
copy
(
resp
.
getData
(),
resultQueryRespDto
);
resultQueryRespDto
.
setTaskStatus
(
Integer
.
valueOf
(
GalaxyEnumBiz
.
getTaskStatusEnum
(
reqDto
.
getRouterType
(),
resp
.
getData
().
getTaskStatus
().
toString
()).
getCode
()));
return
ResponseDto
.
success
(
resultQueryRespDto
);
return
ResponseDto
.
success
(
resultQueryRespDto
);
}
else
{
}
else
{
return
ResponseDto
.
failure
(
GalaxyError
CodeEnum
.
SERIES_CLAIM_ERROR
.
getCode
(),
GalaxyErrorCode
Enum
.
SERIES_CLAIM_ERROR
.
getMessage
());
return
ResponseDto
.
failure
(
GalaxyError
Enum
.
SERIES_CLAIM_ERROR
.
getCode
(),
GalaxyError
Enum
.
SERIES_CLAIM_ERROR
.
getMessage
());
}
}
}
}
...
@@ -268,8 +294,11 @@ public class ZxinArtworkBiz {
...
@@ -268,8 +294,11 @@ public class ZxinArtworkBiz {
}
}
private
GalaxySeriesInfoBo
buildSeriesInfoBo
(
boolean
isInit
,
String
skuId
,
String
seriesName
,
String
seriesId
,
Long
totalCount
,
Long
crtCount
private
GalaxySeriesInfoBo
buildSeriesInfoBo
(
,
String
author
,
String
nftName
,
String
nftUrl
,
String
displayUrl
,
String
nftDesc
,
String
nftFlag
,
String
sellCount
,
String
coverUrl
,
String
seriesDesc
){
boolean
isInit
,
String
skuId
,
String
seriesName
,
String
seriesId
,
Long
totalCount
,
Long
crtCount
,
String
originalNftUrl
,
String
originalDisplayUrl
,
String
seriesClaimTaskId
,
String
author
,
String
nftName
,
String
nftUrl
,
String
displayUrl
,
String
nftDesc
,
String
nftFlag
,
String
sellCount
,
String
coverUrl
,
String
seriesDesc
){
GalaxySeriesInfoBo
seriesInfoBo
=
GalaxySeriesInfoBo
.
getNew
();
GalaxySeriesInfoBo
seriesInfoBo
=
GalaxySeriesInfoBo
.
getNew
();
seriesInfoBo
.
setSkuId
(
skuId
);
seriesInfoBo
.
setSkuId
(
skuId
);
...
@@ -277,7 +306,9 @@ public class ZxinArtworkBiz {
...
@@ -277,7 +306,9 @@ public class ZxinArtworkBiz {
seriesInfoBo
.
setSeriesId
(
seriesId
);
seriesInfoBo
.
setSeriesId
(
seriesId
);
seriesInfoBo
.
setTotalCount
(
totalCount
);
seriesInfoBo
.
setTotalCount
(
totalCount
);
seriesInfoBo
.
setCrtCount
(
crtCount
);
seriesInfoBo
.
setCrtCount
(
crtCount
);
seriesInfoBo
.
setNftUrl
(
nftUrl
);
seriesInfoBo
.
setOriginalNftUrl
(
originalNftUrl
);
seriesInfoBo
.
setOriginalDisplayUrl
(
originalDisplayUrl
);
seriesInfoBo
.
setSeriesClaimTaskId
(
seriesClaimTaskId
);
seriesInfoBo
.
setPublishStatus
(
GalaxyEnum
.
SeriesClaimStatusEnum
.
SERIES_INIT
.
getCode
());
seriesInfoBo
.
setPublishStatus
(
GalaxyEnum
.
SeriesClaimStatusEnum
.
SERIES_INIT
.
getCode
());
if
(!
isInit
){
if
(!
isInit
){
if
(
StringUtil
.
isEmpty
(
seriesId
)){
if
(
StringUtil
.
isEmpty
(
seriesId
)){
...
...
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/zxin/biz/ZxinPublishBiz.java
View file @
571330b5
...
@@ -9,7 +9,7 @@ import com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil;
...
@@ -9,7 +9,7 @@ import com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.constant.GalaxyError
Code
Enum
;
import
com.liquidnet.service.galaxy.constant.GalaxyErrorEnum
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxySeriesInfoBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxySeriesInfoBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxyUserInfoBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxyUserInfoBo
;
...
@@ -56,7 +56,7 @@ public class ZxinPublishBiz {
...
@@ -56,7 +56,7 @@ public class ZxinPublishBiz {
//获取订单信息
//获取订单信息
GalaxyNftOrderBo
nftOrderBo
=
dataUtils
.
getNftOrderBo
(
reqDto
.
getRouterType
(),
reqDto
.
getNftOrderPayId
());
GalaxyNftOrderBo
nftOrderBo
=
dataUtils
.
getNftOrderBo
(
reqDto
.
getRouterType
(),
reqDto
.
getNftOrderPayId
());
if
(
StringUtil
.
isNotNull
(
nftOrderBo
)&&
StringUtil
.
isNotEmpty
(
nftOrderBo
.
getNftId
())){
if
(
StringUtil
.
isNotNull
(
nftOrderBo
)&&
StringUtil
.
isNotEmpty
(
nftOrderBo
.
getNftId
())){
return
ResponseDto
.
failure
(
GalaxyError
CodeEnum
.
PUBLISH_FAIL_ALREADY_EXIST
.
getCode
(),
GalaxyErrorCode
Enum
.
PUBLISH_FAIL_ALREADY_EXIST
.
getMessage
());
return
ResponseDto
.
failure
(
GalaxyError
Enum
.
PUBLISH_FAIL_ALREADY_EXIST
.
getCode
(),
GalaxyError
Enum
.
PUBLISH_FAIL_ALREADY_EXIST
.
getMessage
());
}
}
//获取用户信息
//获取用户信息
...
@@ -162,7 +162,7 @@ public class ZxinPublishBiz {
...
@@ -162,7 +162,7 @@ public class ZxinPublishBiz {
if
(
StringUtil
.
isEmpty
(
nftId
)){
if
(
StringUtil
.
isEmpty
(
nftId
)){
return
ResponseDto
.
failure
(
GalaxyError
CodeEnum
.
PUBLISH_FAIL
.
getCode
(),
GalaxyErrorCode
Enum
.
PUBLISH_FAIL
.
getMessage
());
return
ResponseDto
.
failure
(
GalaxyError
Enum
.
PUBLISH_FAIL
.
getCode
(),
GalaxyError
Enum
.
PUBLISH_FAIL
.
getMessage
());
}
}
GalaxyNftPublishRespDto
nftPublishRespDto
=
GalaxyNftPublishRespDto
.
getNew
();
GalaxyNftPublishRespDto
nftPublishRespDto
=
GalaxyNftPublishRespDto
.
getNew
();
...
...
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/zxin/biz/ZxinTradeBiz.java
View file @
571330b5
...
@@ -10,7 +10,7 @@ import com.liquidnet.commons.lang.util.BeanUtil;
...
@@ -10,7 +10,7 @@ import com.liquidnet.commons.lang.util.BeanUtil;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.constant.GalaxyError
Code
Enum
;
import
com.liquidnet.service.galaxy.constant.GalaxyErrorEnum
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxySeriesInfoBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxySeriesInfoBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxyUserInfoBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxyUserInfoBo
;
...
@@ -73,7 +73,7 @@ public class ZxinTradeBiz {
...
@@ -73,7 +73,7 @@ public class ZxinTradeBiz {
GalaxyNftBuyRespDto
nftBuyRespDto
=
this
.
nftBuyBusiness
(
nftId
,
userInfoBo
,
seriesInfoBo
);
GalaxyNftBuyRespDto
nftBuyRespDto
=
this
.
nftBuyBusiness
(
nftId
,
userInfoBo
,
seriesInfoBo
);
return
ResponseDto
.
success
(
nftBuyRespDto
);
return
ResponseDto
.
success
(
nftBuyRespDto
);
}
else
{
}
else
{
return
ResponseDto
.
failure
(
GalaxyError
CodeEnum
.
PUBLISH_BUY_FAIL
.
getCode
(),
GalaxyErrorCode
Enum
.
PUBLISH_BUY_FAIL
.
getMessage
());
return
ResponseDto
.
failure
(
GalaxyError
Enum
.
PUBLISH_BUY_FAIL
.
getCode
(),
GalaxyError
Enum
.
PUBLISH_BUY_FAIL
.
getMessage
());
}
}
}
}
...
@@ -212,7 +212,7 @@ public class ZxinTradeBiz {
...
@@ -212,7 +212,7 @@ public class ZxinTradeBiz {
BeanUtil
.
copy
(
nftBuyRespDto
,
nftPublishAndBuyRespDto
);
BeanUtil
.
copy
(
nftBuyRespDto
,
nftPublishAndBuyRespDto
);
return
ResponseDto
.
success
(
nftPublishAndBuyRespDto
);
return
ResponseDto
.
success
(
nftPublishAndBuyRespDto
);
}
else
{
}
else
{
return
ResponseDto
.
failure
(
GalaxyError
CodeEnum
.
PUBLISH_FAIL
.
getCode
(),
GalaxyErrorCode
Enum
.
PUBLISH_FAIL
.
getMessage
());
return
ResponseDto
.
failure
(
GalaxyError
Enum
.
PUBLISH_FAIL
.
getCode
(),
GalaxyError
Enum
.
PUBLISH_FAIL
.
getMessage
());
}
}
}
}
...
...
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