记得上下班打卡 | 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
5f6ada01
Commit
5f6ada01
authored
Jun 29, 2022
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实现xuper相关艺术品上传
parent
77a1e8fa
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
170 additions
and
170 deletions
+170
-170
XuperTradeCommonBiz.java
.../service/galaxy/router/xuper/biz/XuperTradeCommonBiz.java
+113
-64
GalaxyPublishController.java
...et/service/galaxy/controller/GalaxyPublishController.java
+56
-56
XuperTradeBiz.java
...uidnet/service/galaxy/router/xuper/biz/XuperTradeBiz.java
+1
-50
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-common/src/main/java/com/liquidnet/service/galaxy/router/xuper/biz/XuperTradeCommonBiz.java
View file @
5f6ada01
This diff is collapsed.
Click to expand it.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/galaxy/controller/GalaxyPublishController.java
View file @
5f6ada01
package
com
.
liquidnet
.
service
.
galaxy
.
controller
;
//
package com.liquidnet.service.galaxy.controller;
//
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
//
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import
com.liquidnet.service.base.ResponseDto
;
//
import com.liquidnet.service.base.ResponseDto;
import
com.liquidnet.service.galaxy.aop.annotation.ControllerLog
;
//
import com.liquidnet.service.galaxy.aop.annotation.ControllerLog;
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.GalaxyNftPublishResultQueryReqDto;
import
com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishResultQueryRespDto
;
//
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishResultQueryRespDto;
import
com.liquidnet.service.galaxy.service.IGalaxyPublishService
;
//
import com.liquidnet.service.galaxy.service.IGalaxyPublishService;
import
io.swagger.annotations.Api
;
//
import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
//
import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
//
import lombok.extern.slf4j.Slf4j;
import
org.springframework.validation.annotation.Validated
;
//
import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.PostMapping
;
//
import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
//
import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
//
import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
//
import org.springframework.web.bind.annotation.RestController;
//
import
javax.annotation.Resource
;
//
import javax.annotation.Resource;
import
javax.validation.Valid
;
//
import javax.validation.Valid;
//
/**
/
//
**
* @author AnJiabin <anjiabin@zhengzai.tv>
//
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
//
* @version V1.0
* @Description: TODO
//
* @Description: TODO
* @class: GalaxyPublishController
//
* @class: GalaxyPublishController
* @Package com.liquidnet.service.galaxy.controller
//
* @Package com.liquidnet.service.galaxy.controller
* @Copyright: LightNet @ Copyright (c) 2021
//
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/15 12:11
//
* @date 2022/3/15 12:11
*/
//
*/
@Api
(
tags
=
"NFT发行相关"
)
//
@Api(tags = "NFT发行相关")
@RestController
//
@RestController
@RequestMapping
(
"nftPublish"
)
//
@RequestMapping("nftPublish")
@Validated
//
@Validated
@Slf4j
//
@Slf4j
public
class
GalaxyPublishController
{
//
public class GalaxyPublishController {
@Resource
(
name
=
"galaxyPublishServiceImpl"
)
//
@Resource(name = "galaxyPublishServiceImpl")
private
IGalaxyPublishService
galaxyPublishService
;
//
private IGalaxyPublishService galaxyPublishService;
//
@ControllerLog
(
description
=
"NFT发行"
)
//
@ControllerLog(description = "NFT发行")
@ApiOperationSupport
(
order
=
1
)
//
@ApiOperationSupport(order = 1)
@ApiOperation
(
value
=
"NFT发行"
)
//
@ApiOperation(value = "NFT发行")
@PostMapping
(
value
=
{
"nftPublish"
})
//
@PostMapping(value = {"nftPublish"})
public
ResponseDto
<
GalaxyNftPublishRespDto
>
nftPublish
(
@Valid
@RequestBody
GalaxyNftPublishReqDto
reqDto
){
//
public ResponseDto<GalaxyNftPublishRespDto> nftPublish(@Valid @RequestBody GalaxyNftPublishReqDto reqDto){
return
galaxyPublishService
.
nftPublish
(
reqDto
);
//
return galaxyPublishService.nftPublish(reqDto);
}
//
}
//
@ControllerLog
(
description
=
"NFT发行结果查询"
)
//
@ControllerLog(description = "NFT发行结果查询")
@ApiOperationSupport
(
order
=
3
)
//
@ApiOperationSupport(order = 3)
@ApiOperation
(
value
=
"NFT发行结果查询"
)
//
@ApiOperation(value = "NFT发行结果查询")
@PostMapping
(
value
=
{
"nftPublishResultQuery"
})
//
@PostMapping(value = {"nftPublishResultQuery"})
public
ResponseDto
<
GalaxyNftPublishResultQueryRespDto
>
nftPublishResultQuery
(
@Valid
@RequestBody
GalaxyNftPublishResultQueryReqDto
reqDto
)
{
//
public ResponseDto<GalaxyNftPublishResultQueryRespDto> nftPublishResultQuery(@Valid @RequestBody GalaxyNftPublishResultQueryReqDto reqDto) {
return
galaxyPublishService
.
nftPublishResultQuery
(
reqDto
);
//
return galaxyPublishService.nftPublishResultQuery(reqDto);
}
//
}
}
//
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/galaxy/router/xuper/biz/XuperTradeBiz.java
View file @
5f6ada01
...
@@ -112,19 +112,8 @@ public class XuperTradeBiz {
...
@@ -112,19 +112,8 @@ public class XuperTradeBiz {
}
}
}
}
String
author
=
seriesNftInfoBo
.
getAuthor
();
String
nftName
=
seriesNftInfoBo
.
getNftName
();
String
nftUrl
=
seriesNftInfoBo
.
getNftUrl
();
String
displayUrl
=
seriesNftInfoBo
.
getDisplayUrl
();
String
nftDesc
=
seriesNftInfoBo
.
getNftDesc
();
String
nftFlag
=
seriesNftInfoBo
.
getNftFlag
();
//发行个数
Long
publishCount
=
1L
;
//开始索引
//开始索引
Integer
seriesBeginIndex
=
null
;
Integer
seriesBeginIndex
=
null
;
//发行金额
Long
sellCount
=
seriesNftInfoBo
.
getSellCount
().
longValue
();
//积分
/**
/**
* 根据sku获取系列Id
* 根据sku获取系列Id
*/
*/
...
@@ -322,7 +311,7 @@ public class XuperTradeBiz {
...
@@ -322,7 +311,7 @@ public class XuperTradeBiz {
GalaxyNftBuyResultQueryReqDto
nftBuyResultQueryReqDto
=
GalaxyNftBuyResultQueryReqDto
.
getNew
();
GalaxyNftBuyResultQueryReqDto
nftBuyResultQueryReqDto
=
GalaxyNftBuyResultQueryReqDto
.
getNew
();
nftBuyResultQueryReqDto
.
setNftOrderPayId
(
reqDto
.
getNftOrderPayId
());
nftBuyResultQueryReqDto
.
setNftOrderPayId
(
reqDto
.
getNftOrderPayId
());
nftBuyResultQueryReqDto
.
setRouterType
(
reqDto
.
getRouterType
());
nftBuyResultQueryReqDto
.
setRouterType
(
reqDto
.
getRouterType
());
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
buyResultQueryRespDto
=
this
.
nftBuyResultQuery
(
nftBuyResultQueryReqDto
);
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
buyResultQueryRespDto
=
xuperTradeCommonBiz
.
nftBuyResultQuery
(
nftBuyResultQueryReqDto
);
if
(
buyResultQueryRespDto
.
isSuccess
()){
if
(
buyResultQueryRespDto
.
isSuccess
()){
GalaxyNftBuyResultQueryRespDto
nftBuyResultQueryRespDtoTemp
=
buyResultQueryRespDto
.
getData
();
GalaxyNftBuyResultQueryRespDto
nftBuyResultQueryRespDtoTemp
=
buyResultQueryRespDto
.
getData
();
BeanUtil
.
copy
(
nftBuyResultQueryRespDtoTemp
,
nftOrderBo
);
BeanUtil
.
copy
(
nftBuyResultQueryRespDtoTemp
,
nftOrderBo
);
...
@@ -346,42 +335,4 @@ public class XuperTradeBiz {
...
@@ -346,42 +335,4 @@ public class XuperTradeBiz {
}
}
return
ResponseDto
.
failure
(
GalaxyErrorEnum
.
NFT_PUBLISH_AND_BUY_QUERY_FAIL
.
getCode
(),
GalaxyErrorEnum
.
NFT_PUBLISH_AND_BUY_QUERY_FAIL
.
getMessage
(),
resultQueryRespDto
);
return
ResponseDto
.
failure
(
GalaxyErrorEnum
.
NFT_PUBLISH_AND_BUY_QUERY_FAIL
.
getCode
(),
GalaxyErrorEnum
.
NFT_PUBLISH_AND_BUY_QUERY_FAIL
.
getMessage
(),
resultQueryRespDto
);
}
}
public
ResponseDto
<
GalaxyNftBuyResultQueryRespDto
>
nftBuyResultQuery
(
GalaxyNftBuyResultQueryReqDto
reqDto
)
{
//获取订单信息
GalaxyNftOrderBo
nftOrderBo
=
dataUtils
.
getNftOrderBo
(
reqDto
.
getRouterType
(),
reqDto
.
getNftOrderPayId
());
if
(
StringUtil
.
isNull
(
nftOrderBo
)){
return
ResponseDto
.
failure
(
GalaxyErrorEnum
.
PUBLISH_ORDER_NOT_EXIST
.
getCode
(),
GalaxyErrorEnum
.
PUBLISH_ORDER_NOT_EXIST
.
getMessage
());
}
if
(
StringUtil
.
isEmpty
(
nftOrderBo
.
getNftBuyTaskId
())){
return
ResponseDto
.
failure
(
GalaxyErrorEnum
.
NFT_BUY_TASK_NOT_EXIST
.
getCode
(),
GalaxyErrorEnum
.
NFT_BUY_TASK_NOT_EXIST
.
getMessage
());
}
//执行资产碎片授予查询
Xuper010QuerySdsReqDto
xuper010QuerySdsReqDto
=
Xuper010QuerySdsReqDto
.
getNew
();
// 定义返回结果对象
Xuper010QuerySdsRespDto
xuper010QuerySdsRespDto
=
null
;
long
shardId
=
1
l
;
try
{
xuper010QuerySdsReqDto
.
setAssetId
(
Long
.
parseLong
(
nftOrderBo
.
getSeriesId
()));
xuper010QuerySdsReqDto
.
setShardId
(
shardId
);
XuperResponseDto
<
Xuper010QuerySdsRespDto
>
xuperResponseDto
=
xuperSdkUtil
.
xuper010QuerySds
(
xuper010QuerySdsReqDto
);
if
(
xuperResponseDto
.
isSuccess
()){
xuper010QuerySdsRespDto
=
xuperResponseDto
.
getParseData
(
Xuper010QuerySdsRespDto
.
class
);
}
}
catch
(
XupterException
e
)
{
log
.
error
(
"biz error msg "
+
e
.
getMessage
(),
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
"sys error msg "
+
e
.
getMessage
(),
e
);
}
log
.
info
(
"testXuper010QuerySds resp : "
+
JsonUtils
.
toJson
(
xuper010QuerySdsRespDto
));
GalaxyNftBuyResultQueryRespDto
resultQueryRespDto
=
GalaxyNftBuyResultQueryRespDto
.
getNew
();
String
nowTimeStr
=
DateUtil
.
getNowTime
();
//转换任务状态
Integer
taskStatus
=
Integer
.
valueOf
(
GalaxyEnumBiz
.
getGrantStatusEnum
(
reqDto
.
getRouterType
(),
String
.
valueOf
(
xuper010QuerySdsRespDto
.
getMeta
().
getStatus
())).
getCode
());
resultQueryRespDto
.
setTaskStatus
(
taskStatus
);
resultQueryRespDto
.
setChainTimestamp
(
nowTimeStr
);
return
ResponseDto
.
success
(
resultQueryRespDto
);
}
}
}
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