记得上下班打卡 | 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
f5f91961
Commit
f5f91961
authored
Jun 27, 2022
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实现xuper相关艺术品上传
parent
252739a1
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
178 additions
and
236 deletions
+178
-236
XuperConfig.java
.../com/liquidnet/common/third/xuper/config/XuperConfig.java
+6
-4
XuperEnum.java
.../com/liquidnet/common/third/xuper/constant/XuperEnum.java
+38
-0
XuperUploadFileRespDto.java
...uidnet/common/third/xuper/dto/XuperUploadFileRespDto.java
+5
-4
XuperArtworkBiz.java
...dnet/service/galaxy/router/xuper/biz/XuperArtworkBiz.java
+128
-227
TestXuperSdkUtil.java
...liquidnet/service/goblin/test/xuper/TestXuperSdkUtil.java
+1
-1
No files found.
liquidnet-bus-common/liquidnet-common-third/liquidnet-common-third-xuper/src/main/java/com/liquidnet/common/third/xuper/config/XuperConfig.java
View file @
f5f91961
package
com
.
liquidnet
.
common
.
third
.
xuper
.
config
;
import
com.baidu.xasset.auth.XchainAccount
;
import
com.baidu.xasset.client.xasset.Asset
;
import
com.baidu.xasset.common.config.Config
;
import
com.baidu.xuper.api.Account
;
import
com.liquidnet.commons.lang.util.BASE64Util
;
import
com.liquidnet.commons.lang.util.MD5Utils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Configuration
;
import
javax.annotation.PostConstruct
;
import
java.io.UnsupportedEncodingException
;
import
java.util.logging.Logger
;
/**
...
...
@@ -32,6 +28,8 @@ public class XuperConfig {
private
String
secretAccessKey
;
@Value
(
"${liquidnet.service.galaxy.xuper.nftApiUrl:http://120.48.16.137:8360}"
)
private
String
nftApiUrl
;
@Value
(
"${liquidnet.service.galaxy.xuper.nftPlatformMnemonic}"
)
private
String
nftPlatformMnemonic
;
private
Asset
asset
=
null
;
private
static
Asset
staticAsset
=
null
;
...
...
@@ -84,4 +82,8 @@ public class XuperConfig {
public
String
getNftApiUrl
()
{
return
nftApiUrl
;
}
public
String
getNftPlatformMnemonic
()
{
return
nftPlatformMnemonic
;
}
}
liquidnet-bus-common/liquidnet-common-third/liquidnet-common-third-xuper/src/main/java/com/liquidnet/common/third/xuper/constant/XuperEnum.java
View file @
f5f91961
...
...
@@ -40,4 +40,42 @@ public class XuperEnum {
return
code
;
}
}
/**
* 资产状态 1:初始 3:发行中 4:发行成功 5:冻结中 6:已冻结 7:封禁中 8:已封禁
*/
public
enum
AssetStatusEnum
{
INIT
(
"1"
,
"初始"
),
PUBLISHING
(
"3"
,
"发行中"
),
PUBLISH_SUCCESS
(
"4"
,
"发行成功"
),
FREEZING
(
"5"
,
"冻结中"
),
BANNEDING
(
"6"
,
"封禁中"
),
BANNEDED
(
"7"
,
"已封禁"
);
private
String
code
;
private
String
message
;
AssetStatusEnum
(
String
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
AssetStatusEnum
getEnumByCode
(
String
code
){
AssetStatusEnum
[]
arry
=
AssetStatusEnum
.
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
;
}
}
}
liquidnet-bus-common/liquidnet-common-third/liquidnet-common-third-xuper/src/main/java/com/liquidnet/common/third/xuper/dto/XuperUploadFileRespDto.java
View file @
f5f91961
package
com
.
liquidnet
.
common
.
third
.
xuper
.
dto
;
import
com.baidu.xasset.client.base.BaseDef
;
import
com.baidu.xasset.client.xasset.XassetDef
;
import
lombok.Data
;
/**
...
...
@@ -13,10 +15,9 @@ import lombok.Data;
*/
@Data
public
class
XuperUploadFileRespDto
{
private
String
pubKeyStr
;
private
String
priKeyStr
;
private
String
address
;
private
String
mnemonic
;
public
String
link
;
public
XassetDef
.
GetStokenResp
resp
;
public
BaseDef
.
RequestRes
res
;
private
static
final
XuperUploadFileRespDto
obj
=
new
XuperUploadFileRespDto
();
public
static
XuperUploadFileRespDto
getNew
()
{
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/galaxy/router/xuper/biz/XuperArtworkBiz.java
View file @
f5f91961
This diff is collapsed.
Click to expand it.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/test/java/com/liquidnet/service/goblin/test/xuper/TestXuperSdkUtil.java
View file @
f5f91961
...
...
@@ -117,7 +117,7 @@ public class TestXuperSdkUtil {
}
catch
(
Exception
e
)
{
log
.
error
(
"sys error msg "
+
e
.
getMessage
(),
e
);
}
log
.
info
(
"testXuper
000CreateAccount
resp : "
+
JsonUtils
.
toJson
(
respDto
));
log
.
info
(
"testXuper
UploadFile
resp : "
+
JsonUtils
.
toJson
(
respDto
));
}
@Test
...
...
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