记得上下班打卡 | 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
0fdd01d3
Commit
0fdd01d3
authored
Mar 18, 2022
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化相关策略实现
parent
f0c3603b
Changes
48
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
1558 additions
and
226 deletions
+1558
-226
GalaxyConstant.java
...com/liquidnet/service/galaxy/constant/GalaxyConstant.java
+134
-0
GalaxyNftOrderBo.java
...com/liquidnet/service/galaxy/dto/bo/GalaxyNftOrderBo.java
+10
-0
GalaxyArtSeriesClaimResultQueryReqDto.java
...laxy/dto/param/GalaxyArtSeriesClaimResultQueryReqDto.java
+43
-0
GalaxyArtSeriesClaimResultQueryRespDto.java
...axy/dto/param/GalaxyArtSeriesClaimResultQueryRespDto.java
+62
-0
GalaxyNftBuyPayResultQueryReqDto.java
...ce/galaxy/dto/param/GalaxyNftBuyPayResultQueryReqDto.java
+46
-0
GalaxyNftBuyPayResultQueryRespDto.java
...e/galaxy/dto/param/GalaxyNftBuyPayResultQueryRespDto.java
+61
-0
GalaxyNftBuyResultQueryReqDto.java
...rvice/galaxy/dto/param/GalaxyNftBuyResultQueryReqDto.java
+47
-0
GalaxyNftBuyResultQueryRespDto.java
...vice/galaxy/dto/param/GalaxyNftBuyResultQueryRespDto.java
+62
-0
GalaxyNftPublishResultQueryReqDto.java
...e/galaxy/dto/param/GalaxyNftPublishResultQueryReqDto.java
+46
-0
GalaxyNftPublishResultQueryRespDto.java
.../galaxy/dto/param/GalaxyNftPublishResultQueryRespDto.java
+64
-0
GalaxyUserBindStatusQueryReqDto.java
...ice/galaxy/dto/param/GalaxyUserBindStatusQueryReqDto.java
+46
-0
GalaxyUserBindStatusQueryRespDto.java
...ce/galaxy/dto/param/GalaxyUserBindStatusQueryRespDto.java
+43
-0
IGalaxyArtworkService.java
...quidnet/service/galaxy/service/IGalaxyArtworkService.java
+2
-0
IGalaxyPublishService.java
...quidnet/service/galaxy/service/IGalaxyPublishService.java
+4
-0
IGalaxyTradeService.java
...liquidnet/service/galaxy/service/IGalaxyTradeService.java
+5
-4
IGalaxyUserService.java
.../liquidnet/service/galaxy/service/IGalaxyUserService.java
+5
-0
FixedSizeThreadPool.java
.../com/liquidnet/commons/lang/util/FixedSizeThreadPool.java
+132
-0
GalaxyRouterStrategyEthArtworkImpl.java
...outer/eth/service/GalaxyRouterStrategyEthArtworkImpl.java
+22
-0
GalaxyRouterStrategyEthPublishImpl.java
...outer/eth/service/GalaxyRouterStrategyEthPublishImpl.java
+23
-0
GalaxyRouterStrategyEthTradeImpl.java
.../router/eth/service/GalaxyRouterStrategyEthTradeImpl.java
+23
-0
GalaxyRouterStrategyEthUserImpl.java
...y/router/eth/service/GalaxyRouterStrategyEthUserImpl.java
+23
-0
GalaxyRouterStrategyContext.java
...e/galaxy/router/strategy/GalaxyRouterStrategyContext.java
+32
-5
GalaxyRouterStrategyListener.java
.../galaxy/router/strategy/GalaxyRouterStrategyListener.java
+30
-5
IGalaxyRouterStrategyArtwork.java
.../galaxy/router/strategy/IGalaxyRouterStrategyArtwork.java
+5
-13
IGalaxyRouterStrategyPublish.java
.../galaxy/router/strategy/IGalaxyRouterStrategyPublish.java
+17
-0
IGalaxyRouterStrategyTrade.java
...ce/galaxy/router/strategy/IGalaxyRouterStrategyTrade.java
+20
-0
IGalaxyRouterStrategyUser.java
...ice/galaxy/router/strategy/IGalaxyRouterStrategyUser.java
+17
-0
StrategyGalaxyRouterArtworkHandler.java
...rategy/annotation/StrategyGalaxyRouterArtworkHandler.java
+22
-0
StrategyGalaxyRouterPublishHandler.java
...rategy/annotation/StrategyGalaxyRouterPublishHandler.java
+22
-0
StrategyGalaxyRouterTradeHandler.java
...strategy/annotation/StrategyGalaxyRouterTradeHandler.java
+22
-0
StrategyGalaxyRouterUserHandler.java
.../strategy/annotation/StrategyGalaxyRouterUserHandler.java
+2
-2
AbstractGalaxyRouterStrategyArtwork.java
...er/strategy/impl/AbstractGalaxyRouterStrategyArtwork.java
+30
-0
AbstractGalaxyRouterStrategyImpl.java
...outer/strategy/impl/AbstractGalaxyRouterStrategyImpl.java
+0
-18
AbstractGalaxyRouterStrategyPublish.java
...er/strategy/impl/AbstractGalaxyRouterStrategyPublish.java
+23
-0
AbstractGalaxyRouterStrategyTrade.java
...uter/strategy/impl/AbstractGalaxyRouterStrategyTrade.java
+29
-0
AbstractGalaxyRouterStrategyUser.java
...outer/strategy/impl/AbstractGalaxyRouterStrategyUser.java
+23
-0
ZxinPublishBiz.java
...uidnet/service/galaxy/router/zxin/biz/ZxinPublishBiz.java
+2
-141
ZxinTradeBiz.java
...iquidnet/service/galaxy/router/zxin/biz/ZxinTradeBiz.java
+147
-1
GalaxyRouterStrategyZxlArtworkImpl.java
...uter/zxin/service/GalaxyRouterStrategyZxlArtworkImpl.java
+43
-0
GalaxyRouterStrategyZxlPublishImpl.java
...uter/zxin/service/GalaxyRouterStrategyZxlPublishImpl.java
+34
-0
GalaxyRouterStrategyZxlTradeImpl.java
...router/zxin/service/GalaxyRouterStrategyZxlTradeImpl.java
+41
-0
GalaxyRouterStrategyZxlUserImpl.java
.../router/zxin/service/GalaxyRouterStrategyZxlUserImpl.java
+34
-0
GalaxyArtworkServiceImpl.java
...service/galaxy/service/impl/GalaxyArtworkServiceImpl.java
+8
-3
GalaxyPublishServiceImpl.java
...service/galaxy/service/impl/GalaxyPublishServiceImpl.java
+6
-1
GalaxyTradeServiceImpl.java
...t/service/galaxy/service/impl/GalaxyTradeServiceImpl.java
+13
-6
GalaxyUserServiceImpl.java
...et/service/galaxy/service/impl/GalaxyUserServiceImpl.java
+8
-1
bootstrap-dev.yml
...-service-galaxy-impl/src/main/resources/bootstrap-dev.yml
+2
-2
TestZxlnftSdkUtil.java
.../java/com/liquidnet/service/galaxy/TestZxlnftSdkUtil.java
+23
-24
No files found.
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/constant/GalaxyConstant.java
View file @
0fdd01d3
...
@@ -91,6 +91,140 @@ public class GalaxyConstant {
...
@@ -91,6 +91,140 @@ public class GalaxyConstant {
}
}
}
}
/**
* 注册类型
*/
public
enum
RegisterTypeEnum
{
PERSON
(
"1"
,
"企业"
),
COMPANY
(
"2"
,
"个人"
);
private
String
code
;
private
String
message
;
RegisterTypeEnum
(
String
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
RegisterTypeEnum
getEnumByCode
(
String
code
){
RegisterTypeEnum
[]
arry
=
RegisterTypeEnum
.
values
();
for
(
int
i
=
0
;
i
<
arry
.
length
;
i
++)
{
if
(
arry
[
i
].
getCode
().
equals
(
code
))
{
return
arry
[
i
];
}
}
return
null
;
}
public
String
getCode
()
{
return
code
;
}
}
public
enum
CardTypeEnum
{
// 1-身份证 2-护照 3-港澳通行证 4-台湾通行证 5-外国人永居身份证 6-港澳台居民居住证 7-其它
ID_CARD
(
"1"
,
"身份证"
),
ID_CARD_PP
(
"2"
,
"护照"
),
ID_CARD_HM
(
"3"
,
"港澳通行证"
),
ID_CARD_TW
(
"4"
,
"台湾通行证"
),
ID_CARD_FOR
(
"5"
,
"外国人永居身份证"
),
ID_CARD_HMTW
(
"6"
,
"港澳台居民居住证"
),
ID_CARD_OTHER
(
"7"
,
"其它"
);
private
String
code
;
private
String
message
;
CardTypeEnum
(
String
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
CardTypeEnum
getEnumByCode
(
String
code
){
CardTypeEnum
[]
arry
=
CardTypeEnum
.
values
();
for
(
int
i
=
0
;
i
<
arry
.
length
;
i
++)
{
if
(
arry
[
i
].
getCode
().
equals
(
code
))
{
return
arry
[
i
];
}
}
return
null
;
}
public
String
getCode
()
{
return
code
;
}
}
/**
* 标记任务状态
*/
public
enum
TaskStatusEnum
{
PROCESSING
(
"0"
,
"任务执行中"
),
TASK_SUCCESS
(
"1"
,
"任务成功"
),
TASK_FAIL
(
"2"
,
"任务失败"
);
private
String
code
;
private
String
message
;
TaskStatusEnum
(
String
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
TaskStatusEnum
getEnumByCode
(
String
code
){
TaskStatusEnum
[]
arry
=
TaskStatusEnum
.
values
();
for
(
int
i
=
0
;
i
<
arry
.
length
;
i
++)
{
if
(
arry
[
i
].
getCode
().
equals
(
code
))
{
return
arry
[
i
];
}
}
return
null
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getMessage
(){
return
message
;
}
}
/**
* 标记任务状态
*/
public
enum
UserBindStatusEnum
{
BIND_PROCESSING
(
"0"
,
"绑定中"
),
BIND_SUCCESS
(
"1"
,
"已绑定"
),
BIND_FAIL
(
"2"
,
"绑定失败"
),
BIND_CANNOT_QUERY
(
"3"
,
"未发起过绑定(未查询到)"
);
private
String
code
;
private
String
message
;
UserBindStatusEnum
(
String
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
UserBindStatusEnum
getEnumByCode
(
String
code
){
UserBindStatusEnum
[]
arry
=
UserBindStatusEnum
.
values
();
for
(
int
i
=
0
;
i
<
arry
.
length
;
i
++)
{
if
(
arry
[
i
].
getCode
().
equals
(
code
))
{
return
arry
[
i
];
}
}
return
null
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getMessage
(){
return
message
;
}
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
Integer
aaa
=
1
;
Integer
aaa
=
1
;
if
(
aaa
.
toString
().
equals
(
RouterTypeEnum
.
ZXINCHAIN
.
getCode
())){
if
(
aaa
.
toString
().
equals
(
RouterTypeEnum
.
ZXINCHAIN
.
getCode
())){
...
...
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/bo/GalaxyNftOrderBo.java
View file @
0fdd01d3
...
@@ -52,6 +52,16 @@ public class GalaxyNftOrderBo implements Serializable,Cloneable {
...
@@ -52,6 +52,16 @@ public class GalaxyNftOrderBo implements Serializable,Cloneable {
*/
*/
private
String
toAddress
;
private
String
toAddress
;
/**
* nft发行任务ID
*/
private
String
nftPublishTaskId
;
/**
* nft购买
* @return
*/
@Override
@Override
public
String
toString
(){
public
String
toString
(){
return
JsonUtils
.
toJson
(
this
);
return
JsonUtils
.
toJson
(
this
);
...
...
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/param/GalaxyArtSeriesClaimResultQueryReqDto.java
0 → 100644
View file @
0fdd01d3
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
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyArtSeriesClaimResultQueryReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 10:51
*/
@ApiModel
(
value
=
"GalaxyArtSeriesClaimResultQueryReqDto"
,
description
=
"NFT系列声明结果查询"
)
@Data
public
class
GalaxyArtSeriesClaimResultQueryReqDto
extends
GalaxyBaseReqDto
implements
Serializable
,
Cloneable
{
@ApiModelProperty
(
position
=
1
,
required
=
true
,
value
=
"系列唯一id标识,不超过20个字符"
)
@NotBlank
(
message
=
"skuId不能为空!"
)
@Size
(
min
=
2
,
max
=
20
,
message
=
"skuId限制2-20位且不能包含特殊字符"
)
private
String
skuId
;
@Override
public
String
toString
(){
return
JsonUtils
.
toJson
(
this
);
}
private
static
final
GalaxyArtSeriesClaimResultQueryReqDto
obj
=
new
GalaxyArtSeriesClaimResultQueryReqDto
();
public
static
GalaxyArtSeriesClaimResultQueryReqDto
getNew
()
{
try
{
return
(
GalaxyArtSeriesClaimResultQueryReqDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GalaxyArtSeriesClaimResultQueryReqDto
();
}
}
}
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/param/GalaxyArtSeriesClaimResultQueryRespDto.java
0 → 100644
View file @
0fdd01d3
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
* @Description: TODO
* @class: GalaxyArtSeriesClaimResultQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 10:51
*/
@ApiModel
(
value
=
"GalaxyArtSeriesClaimResultQueryRespDto"
,
description
=
"NFT系列声明返回结果"
)
@Data
public
class
GalaxyArtSeriesClaimResultQueryRespDto
implements
Serializable
,
Cloneable
{
/**
* 标记任务状态,2:任务执行中 7:任务成功 10:任务失败
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"标记任务状态,0:任务执行中 1:任务成功 2:任务失败"
)
private
Integer
taskStatus
;
/**
* 失败情况下会有提示信息
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"失败情况下会有提示信息"
)
private
String
taskMsg
;
/**
* 系列ID,后面用于查询系列信息
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"系列ID,后面用于查询系列信息"
)
private
String
seriesId
;
/**
* 交易hash
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"交易hash"
)
private
String
txHash
;
/**
* 链上交易时间戳
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"chainTimestamp"
)
private
Long
chainTimestamp
;
@Override
public
String
toString
()
{
return
JsonUtils
.
toJson
(
this
);
}
private
static
final
GalaxyArtSeriesClaimResultQueryRespDto
obj
=
new
GalaxyArtSeriesClaimResultQueryRespDto
();
public
static
GalaxyArtSeriesClaimResultQueryRespDto
getNew
()
{
try
{
return
(
GalaxyArtSeriesClaimResultQueryRespDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GalaxyArtSeriesClaimResultQueryRespDto
();
}
}
}
\ No newline at end of file
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/param/GalaxyNftBuyPayResultQueryReqDto.java
0 → 100644
View file @
0fdd01d3
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
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftBuyPayResultQueryReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 11:23
*/
@ApiModel
(
value
=
"GalaxyNftBuyPayResultQueryReqDto"
,
description
=
"NFT购买支付结果查询"
)
@Data
public
class
GalaxyNftBuyPayResultQueryReqDto
extends
GalaxyBaseReqDto
implements
Serializable
,
Cloneable
{
/**
* nftOrderPayId
*/
@ApiModelProperty
(
position
=
1
,
required
=
true
,
value
=
"nft订单支付id(保证唯一),不超过30个字符"
)
@NotBlank
(
message
=
"nft订单支付id不能为空"
)
@Size
(
min
=
2
,
max
=
30
,
message
=
"nft订单支付id限制2-30位且不能包含特殊字符"
)
private
String
nftOrderPayId
;
@Override
public
String
toString
(){
return
JsonUtils
.
toJson
(
this
);
}
private
static
final
GalaxyNftBuyPayResultQueryReqDto
obj
=
new
GalaxyNftBuyPayResultQueryReqDto
();
public
static
GalaxyNftBuyPayResultQueryReqDto
getNew
()
{
try
{
return
(
GalaxyNftBuyPayResultQueryReqDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GalaxyNftBuyPayResultQueryReqDto
();
}
}
}
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/param/GalaxyNftBuyPayResultQueryRespDto.java
0 → 100644
View file @
0fdd01d3
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
* @Description: TODO
* @class: GalaxyNftBuyPayResultQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 11:23
*/
@ApiModel
(
value
=
"GalaxyNftBuyPayResultQueryRespDto"
,
description
=
"NFT购买支付结果查询"
)
@Data
public
class
GalaxyNftBuyPayResultQueryRespDto
implements
Serializable
,
Cloneable
{
/**
* 标记任务状态,0:任务执行中 1:任务成功 2:任务失败
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"标记任务状态,0:任务执行中 1:任务成功 2:任务失败"
)
private
Integer
taskStatus
;
/**
* 失败情况下会有提示信息
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"失败情况下会有提示信息"
)
private
String
taskMsg
;
/**
* 交易hash
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"交易hash"
)
private
String
txHash
;
/**
* 链上交易时间戳
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"chainTimestamp"
)
private
Long
chainTimestamp
;
@Override
public
String
toString
()
{
return
JsonUtils
.
toJson
(
this
);
}
private
static
final
GalaxyNftBuyPayResultQueryRespDto
obj
=
new
GalaxyNftBuyPayResultQueryRespDto
();
public
static
GalaxyNftBuyPayResultQueryRespDto
getNew
()
{
try
{
return
(
GalaxyNftBuyPayResultQueryRespDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GalaxyNftBuyPayResultQueryRespDto
();
}
}
}
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/param/GalaxyNftBuyResultQueryReqDto.java
0 → 100644
View file @
0fdd01d3
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
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftBuyResultQueryReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 11:22
*/
@ApiModel
(
value
=
"GalaxyNftBuyResultQueryReqDto"
,
description
=
"NFT购买结果查询"
)
@Data
public
class
GalaxyNftBuyResultQueryReqDto
extends
GalaxyBaseReqDto
implements
Serializable
,
Cloneable
{
/**
* nftOrderPayId
*/
@ApiModelProperty
(
position
=
1
,
required
=
true
,
value
=
"nft订单支付id(保证唯一),不超过30个字符"
)
@NotBlank
(
message
=
"nft订单支付id不能为空"
)
@Size
(
min
=
2
,
max
=
30
,
message
=
"nft订单支付id限制2-30位且不能包含特殊字符"
)
private
String
nftOrderPayId
;
@Override
public
String
toString
(){
return
JsonUtils
.
toJson
(
this
);
}
private
static
final
GalaxyNftBuyResultQueryReqDto
obj
=
new
GalaxyNftBuyResultQueryReqDto
();
public
static
GalaxyNftBuyResultQueryReqDto
getNew
()
{
try
{
return
(
GalaxyNftBuyResultQueryReqDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GalaxyNftBuyResultQueryReqDto
();
}
}
}
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/param/GalaxyNftBuyResultQueryRespDto.java
0 → 100644
View file @
0fdd01d3
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
* @Description: TODO
* @class: GalaxyNftBuyResultQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 11:23
*/
@ApiModel
(
value
=
"GalaxyNftBuyResultQueryRespDto"
,
description
=
"NFT购买结果查询"
)
@Data
public
class
GalaxyNftBuyResultQueryRespDto
implements
Serializable
,
Cloneable
{
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"标记任务状态,0:任务执行中 1:任务成功 2:任务失败"
)
private
Integer
taskStatus
;
/**
* 失败情况下会有提示信息
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"失败情况下会有提示信息"
)
private
String
taskMsg
;
/**
* 交易hash
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"交易hash"
)
private
String
txHash
;
/**
* 链上交易时间戳
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"chainTimestamp"
)
private
Long
chainTimestamp
;
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"支付任务ID"
)
private
String
payTaskId
;
@Override
public
String
toString
()
{
return
JsonUtils
.
toJson
(
this
);
}
private
static
final
GalaxyNftBuyResultQueryRespDto
obj
=
new
GalaxyNftBuyResultQueryRespDto
();
public
static
GalaxyNftBuyResultQueryRespDto
getNew
()
{
try
{
return
(
GalaxyNftBuyResultQueryRespDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GalaxyNftBuyResultQueryRespDto
();
}
}
}
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/param/GalaxyNftPublishResultQueryReqDto.java
0 → 100644
View file @
0fdd01d3
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
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyNftPublishResultQueryReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 11:22
*/
@ApiModel
(
value
=
"GalaxyNftPublishResultQueryReqDto"
,
description
=
"NFT发行结果查询"
)
@Data
public
class
GalaxyNftPublishResultQueryReqDto
extends
GalaxyBaseReqDto
implements
Serializable
,
Cloneable
{
/**
* nftOrderPayId
*/
@ApiModelProperty
(
position
=
1
,
required
=
true
,
value
=
"nft订单支付id(保证唯一),不超过30个字符"
)
@NotBlank
(
message
=
"nft订单支付id不能为空"
)
@Size
(
min
=
2
,
max
=
30
,
message
=
"nft订单支付id限制2-30位且不能包含特殊字符"
)
private
String
nftOrderPayId
;
@Override
public
String
toString
(){
return
JsonUtils
.
toJson
(
this
);
}
private
static
final
GalaxyNftPublishResultQueryReqDto
obj
=
new
GalaxyNftPublishResultQueryReqDto
();
public
static
GalaxyNftPublishResultQueryReqDto
getNew
()
{
try
{
return
(
GalaxyNftPublishResultQueryReqDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GalaxyNftPublishResultQueryReqDto
();
}
}
}
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/param/GalaxyNftPublishResultQueryRespDto.java
0 → 100644
View file @
0fdd01d3
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
* @Description: TODO
* @class: GalaxyNftPublishResultQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 11:22
*/
@ApiModel
(
value
=
"GalaxyNftPublishResultQueryRespDto"
,
description
=
"NFT发行结果查询"
)
@Data
public
class
GalaxyNftPublishResultQueryRespDto
implements
Serializable
,
Cloneable
{
/**
* nftId格式,发行人公钥hash_系列_系列索引id,申请多少个,最后一段计算出来即可,
* 比如申请10个,nftIdBegin位xx_xx_1,那么就可以推导出x_xx_1到x_xx_10
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"nftId格式"
)
private
String
nftIdBegin
;
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"标记任务状态,0:任务执行中 1:任务成功 2:任务失败"
)
private
Integer
taskStatus
;
/**
* 失败情况下会有提示信息
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"失败情况下会有提示信息"
)
private
String
taskMsg
;
/**
* 交易hash
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"交易hash"
)
private
String
txHash
;
/**
* 链上交易时间戳
*/
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"chainTimestamp"
)
private
Long
chainTimestamp
;
@Override
public
String
toString
()
{
return
JsonUtils
.
toJson
(
this
);
}
private
static
final
GalaxyNftPublishResultQueryRespDto
obj
=
new
GalaxyNftPublishResultQueryRespDto
();
public
static
GalaxyNftPublishResultQueryRespDto
getNew
()
{
try
{
return
(
GalaxyNftPublishResultQueryRespDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GalaxyNftPublishResultQueryRespDto
();
}
}
}
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/param/GalaxyUserBindStatusQueryReqDto.java
0 → 100644
View file @
0fdd01d3
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
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyUserBindStatusQueryReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 12:06
*/
@ApiModel
(
value
=
"GalaxyUserBindStatusQueryReqDto"
,
description
=
"用户绑定状态查询"
)
@Data
public
class
GalaxyUserBindStatusQueryReqDto
extends
GalaxyBaseReqDto
implements
Serializable
,
Cloneable
{
/**
* nftOrderPayId
*/
@ApiModelProperty
(
position
=
1
,
required
=
true
,
value
=
"用户区块链地址"
)
@NotBlank
(
message
=
"用户区块链地址不能为空!"
)
@Size
(
min
=
2
,
max
=
100
,
message
=
"用户区块链地址不能超过100个字符"
)
private
String
blockChainAddress
;
@Override
public
String
toString
(){
return
JsonUtils
.
toJson
(
this
);
}
private
static
final
GalaxyUserBindStatusQueryReqDto
obj
=
new
GalaxyUserBindStatusQueryReqDto
();
public
static
GalaxyUserBindStatusQueryReqDto
getNew
()
{
try
{
return
(
GalaxyUserBindStatusQueryReqDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GalaxyUserBindStatusQueryReqDto
();
}
}
}
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/dto/param/GalaxyUserBindStatusQueryRespDto.java
0 → 100644
View file @
0fdd01d3
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
* @Description: TODO
* @class: GalaxyUserBindStatusQueryRespDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 12:06
*/
@ApiModel
(
value
=
"GalaxyUserBindStatusQueryRespDto"
,
description
=
"用户绑定状态查询"
)
@Data
public
class
GalaxyUserBindStatusQueryRespDto
implements
Serializable
,
Cloneable
{
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"用户区块链地址"
)
private
String
blockChainAddress
;
@ApiModelProperty
(
position
=
3
,
required
=
true
,
value
=
"0:绑定中 1:已绑定 2:绑定失败 3:未发起过绑定(未查询到)"
)
private
Integer
userBindStatus
;
@Override
public
String
toString
()
{
return
JsonUtils
.
toJson
(
this
);
}
private
static
final
GalaxyUserBindStatusQueryRespDto
obj
=
new
GalaxyUserBindStatusQueryRespDto
();
public
static
GalaxyUserBindStatusQueryRespDto
getNew
()
{
try
{
return
(
GalaxyUserBindStatusQueryRespDto
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GalaxyUserBindStatusQueryRespDto
();
}
}
}
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/service/IGalaxyArtworkService.java
View file @
0fdd01d3
...
@@ -18,4 +18,6 @@ public interface IGalaxyArtworkService {
...
@@ -18,4 +18,6 @@ public interface IGalaxyArtworkService {
ResponseDto
<
GalaxyNftUploadRespDto
>
nftUpload
(
GalaxyNftUploadReqDto
reqDto
);
ResponseDto
<
GalaxyNftUploadRespDto
>
nftUpload
(
GalaxyNftUploadReqDto
reqDto
);
ResponseDto
<
GalaxyArtSeriesClaimRespDto
>
seriesClaim
(
GalaxyArtSeriesClaimReqDto
reqDto
);
ResponseDto
<
GalaxyArtSeriesClaimRespDto
>
seriesClaim
(
GalaxyArtSeriesClaimReqDto
reqDto
);
ResponseDto
<
GalaxyArtSeriesClaimResultQueryRespDto
>
seriesClaimResultQuery
(
GalaxyArtSeriesClaimResultQueryReqDto
reqDto
);
}
}
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/service/IGalaxyPublishService.java
View file @
0fdd01d3
...
@@ -4,6 +4,8 @@ package com.liquidnet.service.galaxy.service;
...
@@ -4,6 +4,8 @@ package com.liquidnet.service.galaxy.service;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishResultQueryReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishResultQueryRespDto
;
/**
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @author AnJiabin <anjiabin@zhengzai.tv>
...
@@ -16,4 +18,6 @@ import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishRespDto;
...
@@ -16,4 +18,6 @@ import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishRespDto;
*/
*/
public
interface
IGalaxyPublishService
{
public
interface
IGalaxyPublishService
{
ResponseDto
<
GalaxyNftPublishRespDto
>
nftPublish
(
GalaxyNftPublishReqDto
reqDto
);
ResponseDto
<
GalaxyNftPublishRespDto
>
nftPublish
(
GalaxyNftPublishReqDto
reqDto
);
ResponseDto
<
GalaxyNftPublishResultQueryRespDto
>
nftPublishResultQuery
(
GalaxyNftPublishResultQueryReqDto
reqDto
);
}
}
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/service/IGalaxyTradeService.java
View file @
0fdd01d3
...
@@ -2,10 +2,7 @@ package com.liquidnet.service.galaxy.service;
...
@@ -2,10 +2,7 @@ package com.liquidnet.service.galaxy.service;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyReqDto
;
import
com.liquidnet.service.galaxy.dto.param.*
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyRespDto
;
/**
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @author AnJiabin <anjiabin@zhengzai.tv>
...
@@ -20,4 +17,8 @@ public interface IGalaxyTradeService {
...
@@ -20,4 +17,8 @@ public interface IGalaxyTradeService {
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
);
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
);
ResponseDto
<
GalaxyNftPublishAndBuyRespDto
>
nftPublishAndBuy
(
GalaxyNftPublishAndBuyReqDto
reqDto
);
ResponseDto
<
GalaxyNftPublishAndBuyRespDto
>
nftPublishAndBuy
(
GalaxyNftPublishAndBuyReqDto
reqDto
);
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
nftBuyResultQuery
(
GalaxyNftBuyResultQueryReqDto
reqDto
);
ResponseDto
<
GalaxyNftBuyPayResultQueryRespDto
>
nftBuyPayResultQuery
(
GalaxyNftBuyPayResultQueryReqDto
reqDto
);
}
}
liquidnet-bus-api/liquidnet-service-galaxy-api/src/main/java/com/liquidnet/service/galaxy/service/IGalaxyUserService.java
View file @
0fdd01d3
...
@@ -2,6 +2,8 @@ package com.liquidnet.service.galaxy.service;
...
@@ -2,6 +2,8 @@ package com.liquidnet.service.galaxy.service;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserBindStatusQueryReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserBindStatusQueryRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto
;
...
@@ -16,4 +18,7 @@ import com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto;
...
@@ -16,4 +18,7 @@ import com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto;
*/
*/
public
interface
IGalaxyUserService
{
public
interface
IGalaxyUserService
{
ResponseDto
<
GalaxyUserRegisterRespDto
>
userRegister
(
GalaxyUserRegisterReqDto
reqDto
);
ResponseDto
<
GalaxyUserRegisterRespDto
>
userRegister
(
GalaxyUserRegisterReqDto
reqDto
);
ResponseDto
<
GalaxyUserBindStatusQueryRespDto
>
userBindStatusQuery
(
GalaxyUserBindStatusQueryReqDto
reqDto
);
}
}
liquidnet-bus-common/liquidnet-common-base/src/main/java/com/liquidnet/commons/lang/util/FixedSizeThreadPool.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
commons
.
lang
.
util
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.LinkedBlockingQueue
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: TreadUtil
* @Package com.liquidnet.commons.lang.util
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/17 18:52
*/
@Slf4j
public
class
FixedSizeThreadPool
{
//手写线程池需要准备什么?
// 1.需要1个仓库
private
BlockingQueue
<
Runnable
>
blockingQueue
;
// 2.需要一个线程的集合
private
List
<
Thread
>
workers
;
//3. 需要具体干活的线程
public
static
class
Worker
extends
Thread
{
// 图上的卡车
// 1.到我们的仓库中去拿东西(blockingQueue)
//
private
FixedSizeThreadPool
pool
;
// 创建构造方法,声明自己属于哪个线程池
public
Worker
(
FixedSizeThreadPool
pool
)
{
this
.
pool
=
pool
;
}
@Override
public
void
run
()
{
// 开始工作
while
(
this
.
pool
.
isWorking
||
this
.
pool
.
blockingQueue
.
size
()
>
0
)
{
Runnable
task
=
null
;
// 从队列中拿东西的时候,需要的是阻塞
try
{
if
(
this
.
pool
.
isWorking
)
{
task
=
this
.
pool
.
blockingQueue
.
take
();
}
else
{
task
=
this
.
pool
.
blockingQueue
.
poll
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(
task
!=
null
)
{
task
.
run
();
log
.
info
(
"线程:{}执行完毕"
,
Thread
.
currentThread
().
getName
());
// System.out.println("线程:"+Thread.currentThread().getName());
}
}
}
}
// 线程池的初始化,构造函数
public
FixedSizeThreadPool
(
int
poolSize
,
int
taskSize
)
{
if
(
poolSize
<=
0
||
taskSize
<=
0
)
throw
new
IllegalArgumentException
(
"非法参数"
);
this
.
blockingQueue
=
new
LinkedBlockingQueue
<>(
taskSize
);
this
.
workers
=
Collections
.
synchronizedList
(
new
ArrayList
<>());
for
(
int
i
=
0
;
i
<
poolSize
;
i
++)
{
Worker
work
=
new
Worker
(
this
);
work
.
start
();
workers
.
add
(
work
);
}
}
// 把任务提交到仓库中的办法
public
boolean
submit
(
Runnable
task
)
{
if
(
isWorking
)
{
return
this
.
blockingQueue
.
offer
(
task
);
}
else
{
return
false
;
}
}
// 关闭的方法:
//a.仓库停止接收任务
//b.一旦仓库中还有任务就要继续执行
//c. 拿任务就不该阻塞
//d.一旦任务阻塞,我就中断他
private
volatile
boolean
isWorking
=
true
;
public
void
shutDown
()
{
// 执行关闭即可
this
.
isWorking
=
false
;
for
(
Thread
thread
:
workers
)
{
if
(
thread
.
getState
().
equals
(
Thread
.
State
.
BLOCKED
))
{
thread
.
interrupt
();
// 中断线程
}
}
}
public
static
void
main
(
String
[]
args
)
{
FixedSizeThreadPool
fixedSizeThreadPool
=
new
FixedSizeThreadPool
(
3
,
6
);
for
(
int
i
=
0
;
i
<
6
;
i
++)
{
fixedSizeThreadPool
.
submit
(
new
Runnable
()
{
@Override
public
void
run
()
{
System
.
out
.
println
(
"放入线程"
);
try
{
Thread
.
sleep
(
2000L
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
log
.
error
(
"一个线程被中断"
);
}
}
}
);
}
fixedSizeThreadPool
.
shutDown
();
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/eth/service/GalaxyRouterStrategyEthArtworkImpl.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
eth
.
service
;
import
com.liquidnet.service.galaxy.constant.GalaxyConstant
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterArtworkHandler
;
import
com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyArtwork
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyRouterStrategyEthArtworkImpl
* @Package com.liquidnet.service.galaxy.router.eth.service
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 13:49
*/
@Slf4j
@Component
@StrategyGalaxyRouterArtworkHandler
(
GalaxyConstant
.
RouterTypeEnum
.
ETH
)
public
class
GalaxyRouterStrategyEthArtworkImpl
extends
AbstractGalaxyRouterStrategyArtwork
{
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/eth/service/GalaxyRouterStrategyEthPublishImpl.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
eth
.
service
;
import
com.liquidnet.service.galaxy.constant.GalaxyConstant
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterPublishHandler
;
import
com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyPublish
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyRouterStrategyEthArtworkImpl
* @Package com.liquidnet.service.galaxy.router.eth.service
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 13:49
*/
@Slf4j
@Component
@StrategyGalaxyRouterPublishHandler
(
GalaxyConstant
.
RouterTypeEnum
.
ETH
)
public
class
GalaxyRouterStrategyEthPublishImpl
extends
AbstractGalaxyRouterStrategyPublish
{
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/eth/service/GalaxyRouterStrategyEthTradeImpl.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
eth
.
service
;
import
com.liquidnet.service.galaxy.constant.GalaxyConstant
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterTradeHandler
;
import
com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyTrade
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyRouterStrategyEthArtworkImpl
* @Package com.liquidnet.service.galaxy.router.eth.service
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 13:49
*/
@Slf4j
@Component
@StrategyGalaxyRouterTradeHandler
(
GalaxyConstant
.
RouterTypeEnum
.
ETH
)
public
class
GalaxyRouterStrategyEthTradeImpl
extends
AbstractGalaxyRouterStrategyTrade
{
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/eth/service/GalaxyRouterStrategyEthUserImpl.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
eth
.
service
;
import
com.liquidnet.service.galaxy.constant.GalaxyConstant
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterUserHandler
;
import
com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyUser
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyRouterStrategyEthUserImpl
* @Package com.liquidnet.service.galaxy.router.eth.service
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 13:49
*/
@Slf4j
@Component
@StrategyGalaxyRouterUserHandler
(
GalaxyConstant
.
RouterTypeEnum
.
ETH
)
public
class
GalaxyRouterStrategyEthUserImpl
extends
AbstractGalaxyRouterStrategyUser
{
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/GalaxyRouterStrategyContext.java
View file @
0fdd01d3
...
@@ -16,13 +16,40 @@ import java.util.Map;
...
@@ -16,13 +16,40 @@ import java.util.Map;
*/
*/
@Component
@Component
public
class
GalaxyRouterStrategyContext
{
public
class
GalaxyRouterStrategyContext
{
private
final
Map
<
String
,
IGalaxyRouterStrategy
>
handlerMap
=
new
HashMap
<>();
private
final
Map
<
String
,
IGalaxyRouterStrategyArtwork
>
artworkHandlerMap
=
new
HashMap
<>();
private
final
Map
<
String
,
IGalaxyRouterStrategyUser
>
userHandlerMap
=
new
HashMap
<>();
private
final
Map
<
String
,
IGalaxyRouterStrategyPublish
>
publishHandlerMap
=
new
HashMap
<>();
private
final
Map
<
String
,
IGalaxyRouterStrategyTrade
>
tradeHandlerMap
=
new
HashMap
<>();
public
IGalaxyRouterStrategy
get
Strategy
(
String
type
)
{
public
IGalaxyRouterStrategy
Artwork
getArtwork
Strategy
(
String
type
)
{
return
h
andlerMap
.
get
(
type
);
return
artworkH
andlerMap
.
get
(
type
);
}
}
public
void
putStrategy
(
String
code
,
IGalaxyRouterStrategy
strategy
)
{
public
void
putArtworkStrategy
(
String
code
,
IGalaxyRouterStrategyArtwork
strategy
)
{
handlerMap
.
put
(
code
,
strategy
);
artworkHandlerMap
.
put
(
code
,
strategy
);
}
public
IGalaxyRouterStrategyUser
getUserStrategy
(
String
type
)
{
return
userHandlerMap
.
get
(
type
);
}
public
void
putUserStrategy
(
String
code
,
IGalaxyRouterStrategyUser
strategy
)
{
userHandlerMap
.
put
(
code
,
strategy
);
}
public
IGalaxyRouterStrategyPublish
getPublishStrategy
(
String
type
)
{
return
publishHandlerMap
.
get
(
type
);
}
public
void
putPublishStrategy
(
String
code
,
IGalaxyRouterStrategyPublish
strategy
)
{
publishHandlerMap
.
put
(
code
,
strategy
);
}
public
IGalaxyRouterStrategyTrade
getTradeStrategy
(
String
type
)
{
return
tradeHandlerMap
.
get
(
type
);
}
public
void
putTradeStrategy
(
String
code
,
IGalaxyRouterStrategyTrade
strategy
)
{
tradeHandlerMap
.
put
(
code
,
strategy
);
}
}
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/GalaxyRouterStrategyListener.java
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
;
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterHandler
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterArtworkHandler
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterPublishHandler
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterTradeHandler
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterUserHandler
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.context.event.ContextRefreshedEvent
;
import
org.springframework.context.event.ContextRefreshedEvent
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -20,11 +23,33 @@ import java.util.Map;
...
@@ -20,11 +23,33 @@ import java.util.Map;
public
class
GalaxyRouterStrategyListener
implements
ApplicationListener
<
ContextRefreshedEvent
>
{
public
class
GalaxyRouterStrategyListener
implements
ApplicationListener
<
ContextRefreshedEvent
>
{
@Override
@Override
public
void
onApplicationEvent
(
ContextRefreshedEvent
event
)
{
public
void
onApplicationEvent
(
ContextRefreshedEvent
event
)
{
Map
<
String
,
Object
>
beans
=
event
.
getApplicationContext
().
getBeansWithAnnotation
(
StrategyGalaxyRouterHandler
.
class
);
//artwork
GalaxyRouterStrategyContext
strategyContext
=
event
.
getApplicationContext
().
getBean
(
GalaxyRouterStrategyContext
.
class
);
GalaxyRouterStrategyContext
strategyContext
=
event
.
getApplicationContext
().
getBean
(
GalaxyRouterStrategyContext
.
class
);
beans
.
forEach
((
name
,
bean
)
->
{
Map
<
String
,
Object
>
artworkBeans
=
event
.
getApplicationContext
().
getBeansWithAnnotation
(
StrategyGalaxyRouterArtworkHandler
.
class
);
StrategyGalaxyRouterHandler
typeHandler
=
bean
.
getClass
().
getAnnotation
(
StrategyGalaxyRouterHandler
.
class
);
artworkBeans
.
forEach
((
name
,
bean
)
->
{
strategyContext
.
putStrategy
(
typeHandler
.
value
().
getCode
(),
(
IGalaxyRouterStrategy
)
bean
);
StrategyGalaxyRouterArtworkHandler
typeHandler
=
bean
.
getClass
().
getAnnotation
(
StrategyGalaxyRouterArtworkHandler
.
class
);
strategyContext
.
putArtworkStrategy
(
typeHandler
.
value
().
getCode
(),
(
IGalaxyRouterStrategyArtwork
)
bean
);
});
//user
Map
<
String
,
Object
>
userBeans
=
event
.
getApplicationContext
().
getBeansWithAnnotation
(
StrategyGalaxyRouterUserHandler
.
class
);
userBeans
.
forEach
((
name
,
bean
)
->
{
StrategyGalaxyRouterUserHandler
typeHandler
=
bean
.
getClass
().
getAnnotation
(
StrategyGalaxyRouterUserHandler
.
class
);
strategyContext
.
putUserStrategy
(
typeHandler
.
value
().
getCode
(),(
IGalaxyRouterStrategyUser
)
bean
);
});
//publish
Map
<
String
,
Object
>
publisBeans
=
event
.
getApplicationContext
().
getBeansWithAnnotation
(
StrategyGalaxyRouterPublishHandler
.
class
);
publisBeans
.
forEach
((
name
,
bean
)
->
{
StrategyGalaxyRouterPublishHandler
typeHandler
=
bean
.
getClass
().
getAnnotation
(
StrategyGalaxyRouterPublishHandler
.
class
);
strategyContext
.
putPublishStrategy
(
typeHandler
.
value
().
getCode
(),(
IGalaxyRouterStrategyPublish
)
bean
);
});
//trade
Map
<
String
,
Object
>
tradeBeans
=
event
.
getApplicationContext
().
getBeansWithAnnotation
(
StrategyGalaxyRouterTradeHandler
.
class
);
tradeBeans
.
forEach
((
name
,
bean
)
->
{
StrategyGalaxyRouterTradeHandler
typeHandler
=
bean
.
getClass
().
getAnnotation
(
StrategyGalaxyRouterTradeHandler
.
class
);
strategyContext
.
putTradeStrategy
(
typeHandler
.
value
().
getCode
(),(
IGalaxyRouterStrategyTrade
)
bean
);
});
});
}
}
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/IGalaxyRouterStrategy.java
→
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/IGalaxyRouterStrategy
Artwork
.java
View file @
0fdd01d3
...
@@ -6,24 +6,16 @@ import com.liquidnet.service.galaxy.dto.param.*;
...
@@ -6,24 +6,16 @@ import com.liquidnet.service.galaxy.dto.param.*;
/**
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @version V1.0
* @Description:
TODO
* @Description:
艺术品路由策略
* @class:
Test
* @class:
IGalaxyRouterArtworkStrategy
* @Package com.liquidnet.service.galaxy.router.strategy
* @Package com.liquidnet.service.galaxy.router.strategy
* @Copyright: LightNet @ Copyright (c) 202
1
* @Copyright: LightNet @ Copyright (c) 202
2
* @date 2022/3/
8 10
:27
* @date 2022/3/
18 12
:27
*/
*/
public
interface
IGalaxyRouterStrategy
{
public
interface
IGalaxyRouterStrategyArtwork
{
ResponseDto
<
GalaxyUserRegisterRespDto
>
userRegister
(
GalaxyUserRegisterReqDto
reqDto
);
ResponseDto
<
GalaxyNftImageRespDto
>
nftImageCheck
(
GalaxyNftImageReqDto
reqDto
);
ResponseDto
<
GalaxyNftImageRespDto
>
nftImageCheck
(
GalaxyNftImageReqDto
reqDto
);
ResponseDto
<
GalaxyNftUploadRespDto
>
nftUpload
(
GalaxyNftUploadReqDto
reqDto
);
ResponseDto
<
GalaxyNftUploadRespDto
>
nftUpload
(
GalaxyNftUploadReqDto
reqDto
);
ResponseDto
<
GalaxyArtSeriesClaimRespDto
>
seriesClaim
(
GalaxyArtSeriesClaimReqDto
reqDto
);
ResponseDto
<
GalaxyArtSeriesClaimRespDto
>
seriesClaim
(
GalaxyArtSeriesClaimReqDto
reqDto
);
ResponseDto
<
GalaxyNftPublishRespDto
>
nftPublish
(
GalaxyNftPublishReqDto
reqDto
);
ResponseDto
<
GalaxyNftPublishAndBuyRespDto
>
nftPublishAndBuy
(
GalaxyNftPublishAndBuyReqDto
reqDto
);
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
);
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/IGalaxyRouterStrategyPublish.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.dto.param.*
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: IGalaxyRouterPublishStrategy
* @class: IGalaxyRouterArtworkStrategy
* @Package com.liquidnet.service.galaxy.router.strategy
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:27
*/
public
interface
IGalaxyRouterStrategyPublish
{
ResponseDto
<
GalaxyNftPublishRespDto
>
nftPublish
(
GalaxyNftPublishReqDto
reqDto
);
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/IGalaxyRouterStrategyTrade.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.dto.param.*
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 交易路由策略
* @class: IGalaxyRouterTradeStrategy
* @Package com.liquidnet.service.galaxy.router.strategy
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:27
*/
public
interface
IGalaxyRouterStrategyTrade
{
ResponseDto
<
GalaxyNftPublishAndBuyRespDto
>
nftPublishAndBuy
(
GalaxyNftPublishAndBuyReqDto
reqDto
);
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
);
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/IGalaxyRouterStrategyUser.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.dto.param.*
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 用户路由策略
* @class: IGalaxyRouterUserStrategy
* @Package com.liquidnet.service.galaxy.router.strategy
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:27
*/
public
interface
IGalaxyRouterStrategyUser
{
ResponseDto
<
GalaxyUserRegisterRespDto
>
userRegister
(
GalaxyUserRegisterReqDto
reqDto
);
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/annotation/StrategyGalaxyRouterArtworkHandler.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
.
annotation
;
import
com.liquidnet.service.galaxy.constant.GalaxyConstant
;
import
java.lang.annotation.*
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: StrategyGalaxyRouterArtworkHandler
* @Package com.liquidnet.service.galaxy.router.strategy.annotation
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/8 11:31
*/
@Documented
@Inherited
@Target
(
ElementType
.
TYPE
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
StrategyGalaxyRouterArtworkHandler
{
GalaxyConstant
.
RouterTypeEnum
value
();
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/annotation/StrategyGalaxyRouterPublishHandler.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
.
annotation
;
import
com.liquidnet.service.galaxy.constant.GalaxyConstant
;
import
java.lang.annotation.*
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: StrategyGalaxyRouterPublishHandler
* @Package com.liquidnet.service.galaxy.router.strategy.annotation
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/8 11:31
*/
@Documented
@Inherited
@Target
(
ElementType
.
TYPE
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
StrategyGalaxyRouterPublishHandler
{
GalaxyConstant
.
RouterTypeEnum
value
();
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/annotation/StrategyGalaxyRouterTradeHandler.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
.
annotation
;
import
com.liquidnet.service.galaxy.constant.GalaxyConstant
;
import
java.lang.annotation.*
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: StrategyGalaxyRouterTradeHandler
* @Package com.liquidnet.service.galaxy.router.strategy.annotation
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/8 11:31
*/
@Documented
@Inherited
@Target
(
ElementType
.
TYPE
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
StrategyGalaxyRouterTradeHandler
{
GalaxyConstant
.
RouterTypeEnum
value
();
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/annotation/StrategyGalaxyRouterHandler.java
→
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/annotation/StrategyGalaxyRouter
User
Handler.java
View file @
0fdd01d3
...
@@ -8,7 +8,7 @@ import java.lang.annotation.*;
...
@@ -8,7 +8,7 @@ import java.lang.annotation.*;
* @author AnJiabin <anjiabin@zhengzai.tv>
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @version V1.0
* @Description: TODO
* @Description: TODO
* @class: StrategyGalaxyRouterHandler
* @class: StrategyGalaxyRouter
User
Handler
* @Package com.liquidnet.service.galaxy.router.strategy.annotation
* @Package com.liquidnet.service.galaxy.router.strategy.annotation
* @Copyright: LightNet @ Copyright (c) 2021
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/8 11:31
* @date 2022/3/8 11:31
...
@@ -17,6 +17,6 @@ import java.lang.annotation.*;
...
@@ -17,6 +17,6 @@ import java.lang.annotation.*;
@Inherited
@Inherited
@Target
(
ElementType
.
TYPE
)
@Target
(
ElementType
.
TYPE
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
StrategyGalaxyRouterHandler
{
public
@interface
StrategyGalaxyRouter
User
Handler
{
GalaxyConstant
.
RouterTypeEnum
value
();
GalaxyConstant
.
RouterTypeEnum
value
();
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/impl/AbstractGalaxyRouterStrategyArtwork.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
.
impl
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.dto.param.*
;
import
com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyArtwork
;
import
lombok.extern.slf4j.Slf4j
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: AbstractGalaxyRouterArtworkStrategyImpl
* @Package com.liquidnet.service.galaxy.router.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:54
*/
@Slf4j
public
abstract
class
AbstractGalaxyRouterStrategyArtwork
implements
IGalaxyRouterStrategyArtwork
{
public
ResponseDto
<
GalaxyNftImageRespDto
>
nftImageCheck
(
GalaxyNftImageReqDto
reqDto
){
return
null
;
}
public
ResponseDto
<
GalaxyNftUploadRespDto
>
nftUpload
(
GalaxyNftUploadReqDto
reqDto
){
return
null
;
}
public
ResponseDto
<
GalaxyArtSeriesClaimRespDto
>
seriesClaim
(
GalaxyArtSeriesClaimReqDto
reqDto
){
return
null
;
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/impl/AbstractGalaxyRouterStrategyImpl.java
deleted
100644 → 0
View file @
f0c3603b
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
.
impl
;
import
com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategy
;
import
lombok.extern.slf4j.Slf4j
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: AbstractPayChannelStrategyImpl
* @Package com.liquidnet.service.dragon.channel.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/7/16 13:04
*/
@Slf4j
public
abstract
class
AbstractGalaxyRouterStrategyImpl
implements
IGalaxyRouterStrategy
{
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/impl/AbstractGalaxyRouterStrategyPublish.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
.
impl
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishRespDto
;
import
com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyPublish
;
import
lombok.extern.slf4j.Slf4j
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: AbstractGalaxyRouterPublishStrategyImpl
* @Package com.liquidnet.service.galaxy.router.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:54
*/
@Slf4j
public
abstract
class
AbstractGalaxyRouterStrategyPublish
implements
IGalaxyRouterStrategyPublish
{
public
ResponseDto
<
GalaxyNftPublishRespDto
>
nftPublish
(
GalaxyNftPublishReqDto
reqDto
)
{
return
null
;
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/impl/AbstractGalaxyRouterStrategyTrade.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
.
impl
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyRespDto
;
import
com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyTrade
;
import
lombok.extern.slf4j.Slf4j
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: AbstractGalaxyRouterTradeStrategyImpl
* @Package com.liquidnet.service.galaxy.router.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:54
*/
@Slf4j
public
abstract
class
AbstractGalaxyRouterStrategyTrade
implements
IGalaxyRouterStrategyTrade
{
public
ResponseDto
<
GalaxyNftPublishAndBuyRespDto
>
nftPublishAndBuy
(
GalaxyNftPublishAndBuyReqDto
reqDto
){
return
null
;
}
public
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
){
return
null
;
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/strategy/impl/AbstractGalaxyRouterStrategyUser.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
.
impl
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto
;
import
com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyUser
;
import
lombok.extern.slf4j.Slf4j
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: AbstractGalaxyRouterUserStrategyImpl
* @Package com.liquidnet.service.galaxy.router.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:54
*/
@Slf4j
public
abstract
class
AbstractGalaxyRouterStrategyUser
implements
IGalaxyRouterStrategyUser
{
public
ResponseDto
<
GalaxyUserRegisterRespDto
>
userRegister
(
GalaxyUserRegisterReqDto
reqDto
){
return
null
;
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/zxin/biz/ZxinPublishBiz.java
View file @
0fdd01d3
...
@@ -6,7 +6,6 @@ import com.liquidnet.common.third.zxlnft.constant.ZxlnftEnum;
...
@@ -6,7 +6,6 @@ import com.liquidnet.common.third.zxlnft.constant.ZxlnftEnum;
import
com.liquidnet.common.third.zxlnft.dto.*
;
import
com.liquidnet.common.third.zxlnft.dto.*
;
import
com.liquidnet.common.third.zxlnft.util.ZxlWalletSdkUtil
;
import
com.liquidnet.common.third.zxlnft.util.ZxlWalletSdkUtil
;
import
com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil
;
import
com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil
;
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
;
...
@@ -14,7 +13,8 @@ import com.liquidnet.service.galaxy.constant.GalaxyErrorCodeEnum;
...
@@ -14,7 +13,8 @@ import com.liquidnet.service.galaxy.constant.GalaxyErrorCodeEnum;
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
;
import
com.liquidnet.service.galaxy.dto.param.*
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishRespDto
;
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
;
...
@@ -185,143 +185,4 @@ public class ZxinPublishBiz {
...
@@ -185,143 +185,4 @@ public class ZxinPublishBiz {
}
}
return
ResponseDto
.
success
(
nftPublishRespDto
);
return
ResponseDto
.
success
(
nftPublishRespDto
);
}
}
public
ResponseDto
<
GalaxyNftPublishAndBuyRespDto
>
nftPublishAndBuy
(
GalaxyNftPublishAndBuyReqDto
reqDto
)
{
//获取用户信息
GalaxyUserInfoBo
userInfoBo
=
dataUtils
.
getGalaxyUserInfo
(
reqDto
.
getRouteType
(),
reqDto
.
getUserId
());
//获取sku信息
GalaxySeriesInfoBo
seriesInfoBo
=
dataUtils
.
getSeriesInfoBo
(
reqDto
.
getRouteType
(),
reqDto
.
getSkuId
());
String
author
=
seriesInfoBo
.
getAuthor
();
String
nftName
=
seriesInfoBo
.
getNftName
();
String
nftUrl
=
seriesInfoBo
.
getNftUrl
();
String
displayUrl
=
seriesInfoBo
.
getDisplayUrl
();
String
nftDesc
=
seriesInfoBo
.
getNftDesc
();
String
nftFlag
=
seriesInfoBo
.
getNftFlag
();
//发行个数
Long
publishCount
=
1L
;
//开始索引
Integer
seriesBeginIndex
=
0
;
//发行金额
Long
sellCount
=
Long
.
valueOf
(
seriesInfoBo
.
getSellCount
().
multiply
(
BigDecimal
.
valueOf
(
100
l
)).
longValue
());
//积分
/**
* 根据sku获取系列Id
*/
String
seriesId
=
seriesInfoBo
.
getSkuId
();
//返回参数nftId
String
nftId
=
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
));
}
//3.1.2调用NFT发行接口
/**
* 发行无限制系列
*/
Nft034PublishReqDto
nft034ReqDto
=
Nft034PublishReqDto
.
getNew
();
nft034ReqDto
.
setAuthor
(
author
);
nft034ReqDto
.
setName
(
nftName
);
nft034ReqDto
.
setUrl
(
nftUrl
);
nft034ReqDto
.
setDisplayUrl
(
displayUrl
);
nft034ReqDto
.
setDesc
(
nftDesc
);
nft034ReqDto
.
setFlag
(
nftFlag
);
nft034ReqDto
.
setPublishCount
(
publishCount
);
//无限制零系列
nft034ReqDto
.
setSeriesId
(
seriesId
);
nft034ReqDto
.
setSeriesBeginIndex
(
seriesBeginIndex
);
nft034ReqDto
.
setSellStatus
(
Integer
.
parseInt
(
ZxlnftEnum
.
SellStatusEnum
.
CAN_SELL
.
getCode
()));
nft034ReqDto
.
setSellCount
(
sellCount
);
nft034ReqDto
.
setOperateId
(
IDGenerator
.
get32UUID
());
nft034ReqDto
.
setMetaData
(
""
);
ZxlnftResponseDto
<
Nft034PublishRespDto
>
nft034RespDto
=
zxlnftSdkUtil
.
nft034Publish
(
nft034ReqDto
);
if
(
nft034RespDto
.
isSuccess
())
{
//3.1.4查询 NFT发行结果
Nft035PublishResultReqDto
nft035ReqDto
=
Nft035PublishResultReqDto
.
getNew
();
nft035ReqDto
.
setTaskId
(
nft034RespDto
.
getData
().
getTaskId
());
//休眠1秒钟,等待执行结果
try
{
Thread
.
sleep
(
1000
l
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
long
timeStart
=
System
.
currentTimeMillis
();
log
.
info
(
"=======执行第{}次查询,taskId:{}"
,
1
,
nft035ReqDto
.
getTaskId
());
ZxlnftResponseDto
<
Nft035PublishResultRespDto
>
nft035RespDto
=
zxlnftSdkUtil
.
nft035PublishResult
(
nft035ReqDto
);
if
(
nft035RespDto
.
isSuccess
())
{
if
(
nft035RespDto
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_FAIL
.
getCode
()))
{
log
.
info
(
"任务执行失败!taskId:{} taskMsg:{}"
,
nft035ReqDto
.
getTaskId
(),
nft035RespDto
.
getData
().
getTaskMsg
());
return
null
;
}
int
count
=
1
;
String
nftIdBegin
=
nft035RespDto
.
getData
().
getNftIdBegin
();
if
(
nft035RespDto
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
PROCESSING
.
getCode
()))
{
log
.
info
(
ZxlnftEnum
.
TaskStatusEnum
.
PROCESSING
.
getMessage
());
while
(
StringUtil
.
isEmpty
(
nftIdBegin
))
{
//休眠1秒钟,等待执行结果
try
{
Thread
.
sleep
(
1000
l
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
count
++;
ZxlnftResponseDto
<
Nft035PublishResultRespDto
>
nft035RespDtoTemp
=
zxlnftSdkUtil
.
nft035PublishResult
(
nft035ReqDto
);
log
.
info
(
"=======执行第{}次查询,taskId:{}"
,
count
,
nft035ReqDto
.
getTaskId
());
if
(
nft035RespDtoTemp
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_SUCCESS
.
getCode
()))
{
nftIdBegin
=
nft035RespDtoTemp
.
getData
().
getNftIdBegin
();
}
else
if
(
nft035RespDtoTemp
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_FAIL
.
getCode
()))
{
log
.
info
(
"任务执行失败!taskId:{}"
,
nft035ReqDto
.
getTaskId
());
return
null
;
}
if
(
count
==
6
)
{
log
.
info
(
"=======查询共6次,跳出循环!taskId:{}"
,
nft035ReqDto
.
getTaskId
());
break
;
}
}
}
else
if
(
nft035RespDto
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_SUCCESS
.
getCode
()))
{
log
.
info
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_SUCCESS
.
getMessage
());
}
log
.
info
(
"发行NFT后返回给前端nftID:{}"
,
nftIdBegin
);
log
.
info
(
"总共执行了{}次查询 总耗时:{} MS"
,
count
,
(
System
.
currentTimeMillis
()
-
timeStart
));
if
(
StringUtil
.
isNotEmpty
(
nftIdBegin
))
{
nftId
=
nftIdBegin
;
//3.1.3调用NFT查询接口
Nft036InfoReqDto
nft036ReqDto
=
Nft036InfoReqDto
.
getNew
();
nft036ReqDto
.
setNftId
(
nftIdBegin
);
ZxlnftResponseDto
<
Nft036InfoRespDto
>
nft036RespDto
=
zxlnftSdkUtil
.
nft036Info
(
nft036ReqDto
);
log
.
info
(
"调用NFT查询接口 : {}"
,
nft036RespDto
.
toJson
());
}
}
}
if
(
StringUtil
.
isNotEmpty
(
nftId
)){
//执行购买逻辑
GalaxyNftPublishAndBuyRespDto
nftPublishAndBuyRespDto
=
GalaxyNftPublishAndBuyRespDto
.
getNew
();
GalaxyNftBuyRespDto
nftBuyRespDto
=
zxinTradeBiz
.
nftBuyBusiness
(
nftId
,
userInfoBo
,
seriesInfoBo
);
BeanUtil
.
copy
(
nftBuyRespDto
,
nftPublishAndBuyRespDto
);
return
ResponseDto
.
success
(
nftPublishAndBuyRespDto
);
}
else
{
return
ResponseDto
.
failure
(
GalaxyErrorCodeEnum
.
PUBLISH_FAIL
.
getCode
(),
GalaxyErrorCodeEnum
.
PUBLISH_FAIL
.
getMessage
());
}
}
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/zxin/biz/ZxinTradeBiz.java
View file @
0fdd01d3
...
@@ -6,6 +6,7 @@ import com.liquidnet.common.third.zxlnft.constant.ZxlnftEnum;
...
@@ -6,6 +6,7 @@ import com.liquidnet.common.third.zxlnft.constant.ZxlnftEnum;
import
com.liquidnet.common.third.zxlnft.dto.*
;
import
com.liquidnet.common.third.zxlnft.dto.*
;
import
com.liquidnet.common.third.zxlnft.util.ZxlWalletSdkUtil
;
import
com.liquidnet.common.third.zxlnft.util.ZxlWalletSdkUtil
;
import
com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil
;
import
com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil
;
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
;
...
@@ -15,11 +16,15 @@ import com.liquidnet.service.galaxy.dto.bo.GalaxySeriesInfoBo;
...
@@ -15,11 +16,15 @@ import com.liquidnet.service.galaxy.dto.bo.GalaxySeriesInfoBo;
import
com.liquidnet.service.galaxy.dto.bo.GalaxyUserInfoBo
;
import
com.liquidnet.service.galaxy.dto.bo.GalaxyUserInfoBo
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyRespDto
;
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
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.math.BigDecimal
;
/**
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @version V1.0
...
@@ -71,7 +76,148 @@ public class ZxinTradeBiz {
...
@@ -71,7 +76,148 @@ public class ZxinTradeBiz {
return
ResponseDto
.
failure
(
GalaxyErrorCodeEnum
.
PUBLISH_BUY_FAIL
.
getCode
(),
GalaxyErrorCodeEnum
.
PUBLISH_BUY_FAIL
.
getMessage
());
return
ResponseDto
.
failure
(
GalaxyErrorCodeEnum
.
PUBLISH_BUY_FAIL
.
getCode
(),
GalaxyErrorCodeEnum
.
PUBLISH_BUY_FAIL
.
getMessage
());
}
}
}
}
public
GalaxyNftBuyRespDto
nftBuyBusiness
(
String
nftId
,
GalaxyUserInfoBo
userInfoBo
,
GalaxySeriesInfoBo
seriesInfoBo
){
public
ResponseDto
<
GalaxyNftPublishAndBuyRespDto
>
nftPublishAndBuy
(
GalaxyNftPublishAndBuyReqDto
reqDto
)
{
//获取用户信息
GalaxyUserInfoBo
userInfoBo
=
dataUtils
.
getGalaxyUserInfo
(
reqDto
.
getRouteType
(),
reqDto
.
getUserId
());
//获取sku信息
GalaxySeriesInfoBo
seriesInfoBo
=
dataUtils
.
getSeriesInfoBo
(
reqDto
.
getRouteType
(),
reqDto
.
getSkuId
());
String
author
=
seriesInfoBo
.
getAuthor
();
String
nftName
=
seriesInfoBo
.
getNftName
();
String
nftUrl
=
seriesInfoBo
.
getNftUrl
();
String
displayUrl
=
seriesInfoBo
.
getDisplayUrl
();
String
nftDesc
=
seriesInfoBo
.
getNftDesc
();
String
nftFlag
=
seriesInfoBo
.
getNftFlag
();
//发行个数
Long
publishCount
=
1L
;
//开始索引
Integer
seriesBeginIndex
=
0
;
//发行金额
Long
sellCount
=
Long
.
valueOf
(
seriesInfoBo
.
getSellCount
().
multiply
(
BigDecimal
.
valueOf
(
100
l
)).
longValue
());
//积分
/**
* 根据sku获取系列Id
*/
String
seriesId
=
seriesInfoBo
.
getSkuId
();
//返回参数nftId
String
nftId
=
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
));
}
//3.1.2调用NFT发行接口
/**
* 发行无限制系列
*/
Nft034PublishReqDto
nft034ReqDto
=
Nft034PublishReqDto
.
getNew
();
nft034ReqDto
.
setAuthor
(
author
);
nft034ReqDto
.
setName
(
nftName
);
nft034ReqDto
.
setUrl
(
nftUrl
);
nft034ReqDto
.
setDisplayUrl
(
displayUrl
);
nft034ReqDto
.
setDesc
(
nftDesc
);
nft034ReqDto
.
setFlag
(
nftFlag
);
nft034ReqDto
.
setPublishCount
(
publishCount
);
//无限制零系列
nft034ReqDto
.
setSeriesId
(
seriesId
);
nft034ReqDto
.
setSeriesBeginIndex
(
seriesBeginIndex
);
nft034ReqDto
.
setSellStatus
(
Integer
.
parseInt
(
ZxlnftEnum
.
SellStatusEnum
.
CAN_SELL
.
getCode
()));
nft034ReqDto
.
setSellCount
(
sellCount
);
nft034ReqDto
.
setOperateId
(
IDGenerator
.
get32UUID
());
nft034ReqDto
.
setMetaData
(
""
);
ZxlnftResponseDto
<
Nft034PublishRespDto
>
nft034RespDto
=
zxlnftSdkUtil
.
nft034Publish
(
nft034ReqDto
);
if
(
nft034RespDto
.
isSuccess
())
{
//3.1.4查询 NFT发行结果
Nft035PublishResultReqDto
nft035ReqDto
=
Nft035PublishResultReqDto
.
getNew
();
nft035ReqDto
.
setTaskId
(
nft034RespDto
.
getData
().
getTaskId
());
//休眠1秒钟,等待执行结果
try
{
Thread
.
sleep
(
1000
l
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
long
timeStart
=
System
.
currentTimeMillis
();
log
.
info
(
"=======执行第{}次查询,taskId:{}"
,
1
,
nft035ReqDto
.
getTaskId
());
ZxlnftResponseDto
<
Nft035PublishResultRespDto
>
nft035RespDto
=
zxlnftSdkUtil
.
nft035PublishResult
(
nft035ReqDto
);
if
(
nft035RespDto
.
isSuccess
())
{
if
(
nft035RespDto
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_FAIL
.
getCode
()))
{
log
.
info
(
"任务执行失败!taskId:{} taskMsg:{}"
,
nft035ReqDto
.
getTaskId
(),
nft035RespDto
.
getData
().
getTaskMsg
());
return
null
;
}
int
count
=
1
;
String
nftIdBegin
=
nft035RespDto
.
getData
().
getNftIdBegin
();
if
(
nft035RespDto
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
PROCESSING
.
getCode
()))
{
log
.
info
(
ZxlnftEnum
.
TaskStatusEnum
.
PROCESSING
.
getMessage
());
while
(
StringUtil
.
isEmpty
(
nftIdBegin
))
{
//休眠1秒钟,等待执行结果
try
{
Thread
.
sleep
(
1000
l
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
count
++;
ZxlnftResponseDto
<
Nft035PublishResultRespDto
>
nft035RespDtoTemp
=
zxlnftSdkUtil
.
nft035PublishResult
(
nft035ReqDto
);
log
.
info
(
"=======执行第{}次查询,taskId:{}"
,
count
,
nft035ReqDto
.
getTaskId
());
if
(
nft035RespDtoTemp
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_SUCCESS
.
getCode
()))
{
nftIdBegin
=
nft035RespDtoTemp
.
getData
().
getNftIdBegin
();
}
else
if
(
nft035RespDtoTemp
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_FAIL
.
getCode
()))
{
log
.
info
(
"任务执行失败!taskId:{}"
,
nft035ReqDto
.
getTaskId
());
return
null
;
}
if
(
count
==
6
)
{
log
.
info
(
"=======查询共6次,跳出循环!taskId:{}"
,
nft035ReqDto
.
getTaskId
());
break
;
}
}
}
else
if
(
nft035RespDto
.
getData
().
getTaskStatus
().
toString
().
equals
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_SUCCESS
.
getCode
()))
{
log
.
info
(
ZxlnftEnum
.
TaskStatusEnum
.
TASK_SUCCESS
.
getMessage
());
}
log
.
info
(
"发行NFT后返回给前端nftID:{}"
,
nftIdBegin
);
log
.
info
(
"总共执行了{}次查询 总耗时:{} MS"
,
count
,
(
System
.
currentTimeMillis
()
-
timeStart
));
if
(
StringUtil
.
isNotEmpty
(
nftIdBegin
))
{
nftId
=
nftIdBegin
;
//3.1.3调用NFT查询接口
Nft036InfoReqDto
nft036ReqDto
=
Nft036InfoReqDto
.
getNew
();
nft036ReqDto
.
setNftId
(
nftIdBegin
);
ZxlnftResponseDto
<
Nft036InfoRespDto
>
nft036RespDto
=
zxlnftSdkUtil
.
nft036Info
(
nft036ReqDto
);
log
.
info
(
"调用NFT查询接口 : {}"
,
nft036RespDto
.
toJson
());
}
}
}
if
(
StringUtil
.
isNotEmpty
(
nftId
)){
//执行购买逻辑
GalaxyNftPublishAndBuyRespDto
nftPublishAndBuyRespDto
=
GalaxyNftPublishAndBuyRespDto
.
getNew
();
GalaxyNftBuyRespDto
nftBuyRespDto
=
this
.
nftBuyBusiness
(
nftId
,
userInfoBo
,
seriesInfoBo
);
BeanUtil
.
copy
(
nftBuyRespDto
,
nftPublishAndBuyRespDto
);
return
ResponseDto
.
success
(
nftPublishAndBuyRespDto
);
}
else
{
return
ResponseDto
.
failure
(
GalaxyErrorCodeEnum
.
PUBLISH_FAIL
.
getCode
(),
GalaxyErrorCodeEnum
.
PUBLISH_FAIL
.
getMessage
());
}
}
private
GalaxyNftBuyRespDto
nftBuyBusiness
(
String
nftId
,
GalaxyUserInfoBo
userInfoBo
,
GalaxySeriesInfoBo
seriesInfoBo
){
// 3.2.2调用购买NFT接口
// 3.2.2调用购买NFT接口
Nft043BuyReqDto
nft043BuyReqDto
=
Nft043BuyReqDto
.
getNew
();
Nft043BuyReqDto
nft043BuyReqDto
=
Nft043BuyReqDto
.
getNew
();
nft043BuyReqDto
.
setNftId
(
nftId
);
nft043BuyReqDto
.
setNftId
(
nftId
);
...
...
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/
strategy/impl/GalaxyRouterStrategyZxl
Impl.java
→
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/
zxin/service/GalaxyRouterStrategyZxlArtwork
Impl.java
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
.
impl
;
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
zxin
.
service
;
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.dto.param.*
;
import
com.liquidnet.service.galaxy.dto.param.*
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterHandler
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterArtworkHandler
;
import
com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyArtwork
;
import
com.liquidnet.service.galaxy.router.zxin.biz.ZxinArtworkBiz
;
import
com.liquidnet.service.galaxy.router.zxin.biz.ZxinArtworkBiz
;
import
com.liquidnet.service.galaxy.router.zxin.biz.ZxinPublishBiz
;
import
com.liquidnet.service.galaxy.router.zxin.biz.ZxinTradeBiz
;
import
com.liquidnet.service.galaxy.router.zxin.biz.ZxinUserBiz
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -19,29 +17,15 @@ import org.springframework.stereotype.Component;
...
@@ -19,29 +17,15 @@ import org.springframework.stereotype.Component;
* @class: PayChannelStrategyAlipayImpl
* @class: PayChannelStrategyAlipayImpl
* @Package com.liquidnet.service.dragon.channel.strategy.impl
* @Package com.liquidnet.service.dragon.channel.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2021
* @Copyright: LightNet @ Copyright (c) 2021
* @date 202
1/7/13
13:06
* @date 202
2/3/18
13:06
*/
*/
@Slf4j
@Slf4j
@Component
@Component
@StrategyGalaxyRouterHandler
(
GalaxyConstant
.
RouterTypeEnum
.
ZXINCHAIN
)
@StrategyGalaxyRouterArtworkHandler
(
GalaxyConstant
.
RouterTypeEnum
.
ZXINCHAIN
)
public
class
GalaxyRouterStrategyZxlImpl
extends
AbstractGalaxyRouterStrategyImpl
{
public
class
GalaxyRouterStrategyZxlArtworkImpl
extends
AbstractGalaxyRouterStrategyArtwork
{
@Autowired
private
ZxinUserBiz
zxinUserBiz
;
@Autowired
@Autowired
private
ZxinArtworkBiz
zxinArtworkBiz
;
private
ZxinArtworkBiz
zxinArtworkBiz
;
@Autowired
private
ZxinPublishBiz
zxinPublishBiz
;
@Autowired
private
ZxinTradeBiz
zxinTradeBiz
;
@Override
public
ResponseDto
<
GalaxyUserRegisterRespDto
>
userRegister
(
GalaxyUserRegisterReqDto
reqDto
)
{
return
zxinUserBiz
.
userRegister
(
reqDto
);
}
@Override
@Override
public
ResponseDto
<
GalaxyNftImageRespDto
>
nftImageCheck
(
GalaxyNftImageReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftImageRespDto
>
nftImageCheck
(
GalaxyNftImageReqDto
reqDto
)
{
return
zxinArtworkBiz
.
nftImageCheck
(
reqDto
);
return
zxinArtworkBiz
.
nftImageCheck
(
reqDto
);
...
@@ -56,19 +40,4 @@ public class GalaxyRouterStrategyZxlImpl extends AbstractGalaxyRouterStrategyImp
...
@@ -56,19 +40,4 @@ public class GalaxyRouterStrategyZxlImpl extends AbstractGalaxyRouterStrategyImp
public
ResponseDto
<
GalaxyArtSeriesClaimRespDto
>
seriesClaim
(
GalaxyArtSeriesClaimReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyArtSeriesClaimRespDto
>
seriesClaim
(
GalaxyArtSeriesClaimReqDto
reqDto
)
{
return
zxinArtworkBiz
.
seriesClaim
(
reqDto
);
return
zxinArtworkBiz
.
seriesClaim
(
reqDto
);
}
}
@Override
public
ResponseDto
<
GalaxyNftPublishRespDto
>
nftPublish
(
GalaxyNftPublishReqDto
reqDto
)
{
return
zxinPublishBiz
.
nftPublish
(
reqDto
);
}
@Override
public
ResponseDto
<
GalaxyNftPublishAndBuyRespDto
>
nftPublishAndBuy
(
GalaxyNftPublishAndBuyReqDto
reqDto
)
{
return
zxinPublishBiz
.
nftPublishAndBuy
(
reqDto
);
}
@Override
public
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
)
{
return
zxinTradeBiz
.
nftBuy
(
reqDto
);
}
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/zxin/service/GalaxyRouterStrategyZxlPublishImpl.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
zxin
.
service
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.constant.GalaxyConstant
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishRespDto
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterPublishHandler
;
import
com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyPublish
;
import
com.liquidnet.service.galaxy.router.zxin.biz.ZxinPublishBiz
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: PayChannelStrategyAlipayImpl
* @Package com.liquidnet.service.dragon.channel.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 13:06
*/
@Slf4j
@Component
@StrategyGalaxyRouterPublishHandler
(
GalaxyConstant
.
RouterTypeEnum
.
ZXINCHAIN
)
public
class
GalaxyRouterStrategyZxlPublishImpl
extends
AbstractGalaxyRouterStrategyPublish
{
@Autowired
private
ZxinPublishBiz
zxinPublishBiz
;
@Override
public
ResponseDto
<
GalaxyNftPublishRespDto
>
nftPublish
(
GalaxyNftPublishReqDto
reqDto
)
{
return
zxinPublishBiz
.
nftPublish
(
reqDto
);
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/
strategy/impl/GalaxyRouterStrategyEth
Impl.java
→
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/
zxin/service/GalaxyRouterStrategyZxlTrade
Impl.java
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
strategy
.
impl
;
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
zxin
.
service
;
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.dto.param.*
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyReqDto
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterHandler
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyRespDto
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterTradeHandler
;
import
com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyTrade
;
import
com.liquidnet.service.galaxy.router.zxin.biz.ZxinTradeBiz
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
/**
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @version V1.0
* @Description: TODO
* @Description: TODO
* @class: PayChannelStrategyA
pple
payImpl
* @class: PayChannelStrategyA
li
payImpl
* @Package com.liquidnet.service.dragon.channel.strategy.impl
* @Package com.liquidnet.service.dragon.channel.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2021
* @Copyright: LightNet @ Copyright (c) 2021
* @date 202
1/7/13
13:06
* @date 202
2/3/18
13:06
*/
*/
@Slf4j
@Slf4j
@Component
@Component
@StrategyGalaxyRouterHandler
(
GalaxyConstant
.
RouterTypeEnum
.
ETH
)
@StrategyGalaxyRouterTradeHandler
(
GalaxyConstant
.
RouterTypeEnum
.
ZXINCHAIN
)
public
class
GalaxyRouterStrategyEthImpl
extends
AbstractGalaxyRouterStrategyImpl
{
public
class
GalaxyRouterStrategyZxlTradeImpl
extends
AbstractGalaxyRouterStrategyTrade
{
@Autowired
@Override
private
ZxinTradeBiz
zxinTradeBiz
;
public
ResponseDto
<
GalaxyArtSeriesClaimRespDto
>
seriesClaim
(
GalaxyArtSeriesClaimReqDto
reqDto
)
{
return
null
;
}
@Override
public
ResponseDto
<
GalaxyNftPublishRespDto
>
nftPublish
(
GalaxyNftPublishReqDto
reqDto
)
{
return
null
;
}
@Override
@Override
public
ResponseDto
<
GalaxyNftPublishAndBuyRespDto
>
nftPublishAndBuy
(
GalaxyNftPublishAndBuyReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftPublishAndBuyRespDto
>
nftPublishAndBuy
(
GalaxyNftPublishAndBuyReqDto
reqDto
)
{
return
null
;
return
zxinTradeBiz
.
nftPublishAndBuy
(
reqDto
);
}
@Override
public
ResponseDto
<
GalaxyUserRegisterRespDto
>
userRegister
(
GalaxyUserRegisterReqDto
reqDto
)
{
return
null
;
}
@Override
public
ResponseDto
<
GalaxyNftImageRespDto
>
nftImageCheck
(
GalaxyNftImageReqDto
reqDto
)
{
return
null
;
}
@Override
public
ResponseDto
<
GalaxyNftUploadRespDto
>
nftUpload
(
GalaxyNftUploadReqDto
reqDto
)
{
return
null
;
}
}
@Override
@Override
public
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
)
{
return
null
;
return
zxinTradeBiz
.
nftBuy
(
reqDto
)
;
}
}
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/router/zxin/service/GalaxyRouterStrategyZxlUserImpl.java
0 → 100644
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
router
.
zxin
.
service
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.constant.GalaxyConstant
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto
;
import
com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterUserHandler
;
import
com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyUser
;
import
com.liquidnet.service.galaxy.router.zxin.biz.ZxinUserBiz
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: PayChannelStrategyAlipayImpl
* @Package com.liquidnet.service.dragon.channel.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/18 13:06
*/
@Slf4j
@Component
@StrategyGalaxyRouterUserHandler
(
GalaxyConstant
.
RouterTypeEnum
.
ZXINCHAIN
)
public
class
GalaxyRouterStrategyZxlUserImpl
extends
AbstractGalaxyRouterStrategyUser
{
@Autowired
private
ZxinUserBiz
zxinUserBiz
;
@Override
public
ResponseDto
<
GalaxyUserRegisterRespDto
>
userRegister
(
GalaxyUserRegisterReqDto
reqDto
)
{
return
zxinUserBiz
.
userRegister
(
reqDto
);
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/service/impl/GalaxyArtworkServiceImpl.java
View file @
0fdd01d3
...
@@ -25,16 +25,21 @@ public class GalaxyArtworkServiceImpl implements IGalaxyArtworkService {
...
@@ -25,16 +25,21 @@ public class GalaxyArtworkServiceImpl implements IGalaxyArtworkService {
@Override
@Override
public
ResponseDto
<
GalaxyNftImageRespDto
>
nftImageCheck
(
GalaxyNftImageReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftImageRespDto
>
nftImageCheck
(
GalaxyNftImageReqDto
reqDto
)
{
return
galaxyRouterStrategyContext
.
getStrategy
(
reqDto
.
getRouteType
()).
nftImageCheck
(
reqDto
);
return
galaxyRouterStrategyContext
.
get
Artwork
Strategy
(
reqDto
.
getRouteType
()).
nftImageCheck
(
reqDto
);
}
}
@Override
@Override
public
ResponseDto
<
GalaxyNftUploadRespDto
>
nftUpload
(
GalaxyNftUploadReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftUploadRespDto
>
nftUpload
(
GalaxyNftUploadReqDto
reqDto
)
{
return
galaxyRouterStrategyContext
.
getStrategy
(
reqDto
.
getRouteType
()).
nftUpload
(
reqDto
);
return
galaxyRouterStrategyContext
.
get
Artwork
Strategy
(
reqDto
.
getRouteType
()).
nftUpload
(
reqDto
);
}
}
@Override
@Override
public
ResponseDto
<
GalaxyArtSeriesClaimRespDto
>
seriesClaim
(
GalaxyArtSeriesClaimReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyArtSeriesClaimRespDto
>
seriesClaim
(
GalaxyArtSeriesClaimReqDto
reqDto
)
{
return
galaxyRouterStrategyContext
.
getStrategy
(
reqDto
.
getRouteType
()).
seriesClaim
(
reqDto
);
return
galaxyRouterStrategyContext
.
getArtworkStrategy
(
reqDto
.
getRouteType
()).
seriesClaim
(
reqDto
);
}
@Override
public
ResponseDto
<
GalaxyArtSeriesClaimResultQueryRespDto
>
seriesClaimResultQuery
(
GalaxyArtSeriesClaimResultQueryReqDto
reqDto
)
{
return
null
;
}
}
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/service/impl/GalaxyPublishServiceImpl.java
View file @
0fdd01d3
...
@@ -25,6 +25,11 @@ public class GalaxyPublishServiceImpl implements IGalaxyPublishService {
...
@@ -25,6 +25,11 @@ public class GalaxyPublishServiceImpl implements IGalaxyPublishService {
@Override
@Override
public
ResponseDto
<
GalaxyNftPublishRespDto
>
nftPublish
(
GalaxyNftPublishReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftPublishRespDto
>
nftPublish
(
GalaxyNftPublishReqDto
reqDto
)
{
return
galaxyRouterStrategyContext
.
getStrategy
(
reqDto
.
getRouteType
()).
nftPublish
(
reqDto
);
return
galaxyRouterStrategyContext
.
getPublishStrategy
(
reqDto
.
getRouteType
()).
nftPublish
(
reqDto
);
}
@Override
public
ResponseDto
<
GalaxyNftPublishResultQueryRespDto
>
nftPublishResultQuery
(
GalaxyNftPublishResultQueryReqDto
reqDto
)
{
return
null
;
}
}
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/service/impl/GalaxyTradeServiceImpl.java
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
service
.
impl
;
package
com
.
liquidnet
.
service
.
galaxy
.
service
.
impl
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyReqDto
;
import
com.liquidnet.service.galaxy.dto.param.*
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyRespDto
;
import
com.liquidnet.service.galaxy.router.strategy.GalaxyRouterStrategyContext
;
import
com.liquidnet.service.galaxy.router.strategy.GalaxyRouterStrategyContext
;
import
com.liquidnet.service.galaxy.service.IGalaxyTradeService
;
import
com.liquidnet.service.galaxy.service.IGalaxyTradeService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -28,11 +25,21 @@ public class GalaxyTradeServiceImpl implements IGalaxyTradeService {
...
@@ -28,11 +25,21 @@ public class GalaxyTradeServiceImpl implements IGalaxyTradeService {
@Override
@Override
public
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftBuyRespDto
>
nftBuy
(
GalaxyNftBuyReqDto
reqDto
)
{
return
galaxyRouterStrategyContext
.
getStrategy
(
reqDto
.
getRouteType
()).
nftBuy
(
reqDto
);
return
galaxyRouterStrategyContext
.
get
Trade
Strategy
(
reqDto
.
getRouteType
()).
nftBuy
(
reqDto
);
}
}
@Override
@Override
public
ResponseDto
<
GalaxyNftPublishAndBuyRespDto
>
nftPublishAndBuy
(
GalaxyNftPublishAndBuyReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyNftPublishAndBuyRespDto
>
nftPublishAndBuy
(
GalaxyNftPublishAndBuyReqDto
reqDto
)
{
return
galaxyRouterStrategyContext
.
getStrategy
(
reqDto
.
getRouteType
()).
nftPublishAndBuy
(
reqDto
);
return
galaxyRouterStrategyContext
.
getTradeStrategy
(
reqDto
.
getRouteType
()).
nftPublishAndBuy
(
reqDto
);
}
@Override
public
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
nftBuyResultQuery
(
GalaxyNftBuyResultQueryReqDto
reqDto
)
{
return
null
;
}
@Override
public
ResponseDto
<
GalaxyNftBuyPayResultQueryRespDto
>
nftBuyPayResultQuery
(
GalaxyNftBuyPayResultQueryReqDto
reqDto
)
{
return
null
;
}
}
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/java/com/liquidnet/service/galaxy/service/impl/GalaxyUserServiceImpl.java
View file @
0fdd01d3
package
com
.
liquidnet
.
service
.
galaxy
.
service
.
impl
;
package
com
.
liquidnet
.
service
.
galaxy
.
service
.
impl
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserBindStatusQueryReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserBindStatusQueryRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto
;
import
com.liquidnet.service.galaxy.router.strategy.GalaxyRouterStrategyContext
;
import
com.liquidnet.service.galaxy.router.strategy.GalaxyRouterStrategyContext
;
...
@@ -26,6 +28,11 @@ public class GalaxyUserServiceImpl implements IGalaxyUserService {
...
@@ -26,6 +28,11 @@ public class GalaxyUserServiceImpl implements IGalaxyUserService {
@Override
@Override
public
ResponseDto
<
GalaxyUserRegisterRespDto
>
userRegister
(
GalaxyUserRegisterReqDto
reqDto
)
{
public
ResponseDto
<
GalaxyUserRegisterRespDto
>
userRegister
(
GalaxyUserRegisterReqDto
reqDto
)
{
return
galaxyRouterStrategyContext
.
getStrategy
(
reqDto
.
getRouteType
()).
userRegister
(
reqDto
);
return
galaxyRouterStrategyContext
.
getUserStrategy
(
reqDto
.
getRouteType
()).
userRegister
(
reqDto
);
}
@Override
public
ResponseDto
<
GalaxyUserBindStatusQueryRespDto
>
userBindStatusQuery
(
GalaxyUserBindStatusQueryReqDto
reqDto
)
{
return
null
;
}
}
}
}
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/main/resources/bootstrap-dev.yml
View file @
0fdd01d3
...
@@ -6,8 +6,8 @@ liquidnet:
...
@@ -6,8 +6,8 @@ liquidnet:
username
:
user
username
:
user
password
:
user123
password
:
user123
eureka
:
eureka
:
host
:
172.17.192.42:7001
#
host: 172.17.192.42:7001
#
host: 127.0.0.1:7001
host
:
127.0.0.1:7001
# end-dev-这里是配置信息基本值
# end-dev-这里是配置信息基本值
spring
:
spring
:
...
...
liquidnet-bus-service/liquidnet-service-galaxy/liquidnet-service-galaxy-impl/src/test/java/com/liquidnet/service/galaxy/TestZxlnftSdkUtil.java
View file @
0fdd01d3
...
@@ -442,9 +442,8 @@ public class TestZxlnftSdkUtil {
...
@@ -442,9 +442,8 @@ public class TestZxlnftSdkUtil {
// reqDto.setSeriesId("4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef_b9b105d186742e44691c540bbacddd1c3a883a49d899b81c5b1a5cf10b4ad4e6");
// reqDto.setSeriesId("4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef_b9b105d186742e44691c540bbacddd1c3a883a49d899b81c5b1a5cf10b4ad4e6");
//第一个系列
//第一个系列
// reqDto.setSeriesId("4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef_ca49b5ebadd5f73ab057fe869bf897cbcc0f31e0b89db71cc3ec78bca2d16ed6");
// reqDto.setSeriesId("4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef_ca49b5ebadd5f73ab057fe869bf897cbcc0f31e0b89db71cc3ec78bca2d16ed6");
reqDto
.
setSeriesId
(
"111111"
);
//第二个系列
//第二个系列
//
reqDto.setSeriesId("4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef_31ff9f7d4c33c98518e095fec6cecdab8d337751602cf6e651eb7d131cff5b61");
reqDto
.
setSeriesId
(
"4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef_31ff9f7d4c33c98518e095fec6cecdab8d337751602cf6e651eb7d131cff5b61"
);
ZxlnftResponseDto
<
Nft032SeriesRespDto
>
resp
=
zxlnftSdkUtil
.
nft032Series
(
reqDto
);
ZxlnftResponseDto
<
Nft032SeriesRespDto
>
resp
=
zxlnftSdkUtil
.
nft032Series
(
reqDto
);
System
.
out
.
println
(
resp
.
toJson
());
System
.
out
.
println
(
resp
.
toJson
());
...
@@ -506,11 +505,11 @@ public class TestZxlnftSdkUtil {
...
@@ -506,11 +505,11 @@ public class TestZxlnftSdkUtil {
reqDto
.
setDisplayUrl
(
"https://zhixinliantest-1302317679.cos.ap-guangzhou.myqcloud.com/nft/4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef/ZXLNFTIMAGE202202241512003609141721.jpg"
);
reqDto
.
setDisplayUrl
(
"https://zhixinliantest-1302317679.cos.ap-guangzhou.myqcloud.com/nft/4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef/ZXLNFTIMAGE202202241512003609141721.jpg"
);
reqDto
.
setDesc
(
"NFT描述信息"
);
reqDto
.
setDesc
(
"NFT描述信息"
);
reqDto
.
setFlag
(
"文创"
);
reqDto
.
setFlag
(
"文创"
);
reqDto
.
setPublishCount
(
6
l
);
reqDto
.
setPublishCount
(
1
l
);
//无限制零系列
//无限制零系列
// reqDto.setSeriesId("4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef_8a827e181b695fb8d9b081d3855d2895ced1d003ee186622a005cec37ea77e59");
// reqDto.setSeriesId("4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef_8a827e181b695fb8d9b081d3855d2895ced1d003ee186622a005cec37ea77e59");
// //系列001
// //系列001
//
reqDto.setSeriesId("4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef_ca49b5ebadd5f73ab057fe869bf897cbcc0f31e0b89db71cc3ec78bca2d16ed6");
reqDto
.
setSeriesId
(
"4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef_ca49b5ebadd5f73ab057fe869bf897cbcc0f31e0b89db71cc3ec78bca2d16ed6"
);
// //系列002
// //系列002
// reqDto.setSeriesId("4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef_31ff9f7d4c33c98518e095fec6cecdab8d337751602cf6e651eb7d131cff5b61");
// reqDto.setSeriesId("4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef_31ff9f7d4c33c98518e095fec6cecdab8d337751602cf6e651eb7d131cff5b61");
reqDto
.
setSeriesBeginIndex
(
6
);
reqDto
.
setSeriesBeginIndex
(
6
);
...
@@ -532,26 +531,26 @@ public class TestZxlnftSdkUtil {
...
@@ -532,26 +531,26 @@ public class TestZxlnftSdkUtil {
// reqDto.setTaskId("5d23ed47-dcb2-4672-99eb-060c04727a20_nft-publish_3");
// reqDto.setTaskId("5d23ed47-dcb2-4672-99eb-060c04727a20_nft-publish_3");
// reqDto.setTaskId("15ba80bb-a5f9-41db-b708-20bf4df34c14_nft-publish_3");
// reqDto.setTaskId("15ba80bb-a5f9-41db-b708-20bf4df34c14_nft-publish_3");
// reqDto.setTaskId("1b8b94c0-e9d1-4885-97a5-ae1b82302e17_nft-publish_3");
// reqDto.setTaskId("1b8b94c0-e9d1-4885-97a5-ae1b82302e17_nft-publish_3");
//无限制系列发行 1
//
//无限制系列发行 1
reqDto
.
setTaskId
(
"5a53f3ea-64a5-45a2-828b-196887990696_nft-publish_3"
);
//
reqDto.setTaskId("5a53f3ea-64a5-45a2-828b-196887990696_nft-publish_3");
//无限制系列发行 2
//
//无限制系列发行 2
reqDto
.
setTaskId
(
"f87f687f-0b3c-46fa-b23b-d1bbf6c2594f_nft-publish_3"
);
//
reqDto.setTaskId("f87f687f-0b3c-46fa-b23b-d1bbf6c2594f_nft-publish_3");
//北京草莓无限制系列发行 4
//
//北京草莓无限制系列发行 4
reqDto
.
setTaskId
(
"ee26ee9c-7005-48ca-bbc0-3e367c641dce_nft-publish_3"
);
//
reqDto.setTaskId("ee26ee9c-7005-48ca-bbc0-3e367c641dce_nft-publish_3");
//上海草莓无限制系列发行 4 发行失败 已经存在
//
//上海草莓无限制系列发行 4 发行失败 已经存在
reqDto
.
setTaskId
(
"76087122-b417-49ce-bed6-54a106375293_nft-publish_3"
);
//
reqDto.setTaskId("76087122-b417-49ce-bed6-54a106375293_nft-publish_3");
//上海草莓无限制系列发行 5
//
//上海草莓无限制系列发行 5
reqDto
.
setTaskId
(
"4d208028-36af-463b-b8ce-d1ca784df7b7_nft-publish_3"
);
//
reqDto.setTaskId("4d208028-36af-463b-b8ce-d1ca784df7b7_nft-publish_3");
//上海草莓无限制系列发行 6 共5个
//
//上海草莓无限制系列发行 6 共5个
reqDto
.
setTaskId
(
"7bb78a44-aebe-460e-9624-7914cfc6854b_nft-publish_3"
);
//
reqDto.setTaskId("7bb78a44-aebe-460e-9624-7914cfc6854b_nft-publish_3");
//上海草莓无限制系列发行 11 共5个
//
//上海草莓无限制系列发行 11 共5个
reqDto
.
setTaskId
(
"eee6ca98-e497-43bd-969d-cdc599d0f2bd_nft-publish_3"
);
//
reqDto.setTaskId("eee6ca98-e497-43bd-969d-cdc599d0f2bd_nft-publish_3");
//系列001 发行ID1 共5个
//
//系列001 发行ID1 共5个
reqDto
.
setTaskId
(
"45ebcf2a-5d71-44fc-a7f3-f88f3c92cfe6_nft-publish_3"
);
//
reqDto.setTaskId("45ebcf2a-5d71-44fc-a7f3-f88f3c92cfe6_nft-publish_3");
//系列001 发行ID6 共6个
//
//系列001 发行ID6 共6个
reqDto
.
setTaskId
(
"2f1eae08-6b52-42ff-ac69-78cca7bf6913_nft-publish_3"
);
//
reqDto.setTaskId("2f1eae08-6b52-42ff-ac69-78cca7bf6913_nft-publish_3");
reqDto
.
setTaskId
(
"4efaab86-deb3-436f-9aca-de59033ec79c_nft-publish_3"
);
//
reqDto.setTaskId("4efaab86-deb3-436f-9aca-de59033ec79c_nft-publish_3");
reqDto
.
setTaskId
(
"878dddd8-0e10-4e0b-99d0-0f2221ea3a48_nft-publish_3"
);
//
reqDto.setTaskId("878dddd8-0e10-4e0b-99d0-0f2221ea3a48_nft-publish_3");
ZxlnftResponseDto
<
Nft035PublishResultRespDto
>
resp
=
zxlnftSdkUtil
.
nft035PublishResult
(
reqDto
);
ZxlnftResponseDto
<
Nft035PublishResultRespDto
>
resp
=
zxlnftSdkUtil
.
nft035PublishResult
(
reqDto
);
System
.
out
.
println
(
resp
.
toJson
());
System
.
out
.
println
(
resp
.
toJson
());
}
}
...
...
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