记得上下班打卡 | 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
b8182d7f
Commit
b8182d7f
authored
Apr 06, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt;
parent
c7c679e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
AdamUserBusiAcctServiceImpl.java
...ervice/adam/service/impl/AdamUserBusiAcctServiceImpl.java
+11
-9
No files found.
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/service/impl/AdamUserBusiAcctServiceImpl.java
View file @
b8182d7f
package
com
.
liquidnet
.
service
.
adam
.
service
.
impl
;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.
liquidnet.commons.lang.util.CollectionUtil
;
import
com.
fasterxml.jackson.databind.node.ObjectNode
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.HttpUtil
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
...
...
@@ -20,10 +20,8 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.env.Environment
;
import
org.springframework.http.MediaType
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.LinkedMultiValueMap
;
import
java.time.LocalDateTime
;
import
java.util.List
;
...
...
@@ -45,8 +43,6 @@ public class AdamUserBusiAcctServiceImpl implements IAdamUserBusiAcctService {
// @Value("${liquidnet.service.galaxy.url}")// TODO: 2022/3/29 ==zhanggb
// private String sevGalaxyUrl;
private
static
final
String
BIZ_ACC_OPEN_NFT_ZXIN_BODY
=
"{\"routerType\":\"zxinchain\",\"idCardType\":\"1\",\"idCard\":\"P3\",\"userName\":\"P4\",\"mobile\":\"P5\",\"userId\":\"P6\"}"
;
@Override
public
ResponseDto
<
AdamUserBizAcctVo
>
openAccount
(
String
uid
,
String
bizCode
,
String
name
,
String
idCard
,
String
mobile
)
{
List
<
AdamUserBizAcctVo
>
userBizAcctVoList
=
adamRdmService
.
getBizAcctVosByUid
(
uid
);
...
...
@@ -103,20 +99,26 @@ public class AdamUserBusiAcctServiceImpl implements IAdamUserBusiAcctService {
}
}
String
postBody
=
BIZ_ACC_OPEN_NFT_ZXIN_BODY
.
replace
(
"P3"
,
idCard
).
replace
(
"P4"
,
name
).
replace
(
"P5"
,
mobile
).
replace
(
"P6"
,
uid
);
ObjectNode
postBodyNode
=
JsonUtils
.
OM
().
createObjectNode
();
postBodyNode
.
put
(
"routerType"
,
"zxinchain"
);
postBodyNode
.
put
(
"idCardType"
,
"1"
);
postBodyNode
.
put
(
"idCard"
,
idCard
);
postBodyNode
.
put
(
"userName"
,
name
);
postBodyNode
.
put
(
"mobile"
,
mobile
);
postBodyNode
.
put
(
"userId"
,
uid
);
// String postUrl = sevGalaxyUrl + "/user/register", blockChainAddress;// TODO: 2022/3/29 ==zhanggb
String
postUrl
=
"https://ENVgalaxy.zhengzai.tv/galaxy/user/register"
.
replace
(
"ENV"
,
env
.
getProperty
(
CurrentUtil
.
CK_ENV_ACTIVE
)),
blockChainAddress
;
try
{
String
postRespStr
=
HttpUtil
.
postRaw
(
postUrl
,
postBody
,
null
);
String
postRespStr
=
HttpUtil
.
postRaw
(
postUrl
,
postBody
Node
.
toString
()
,
null
);
JsonNode
postRespJNode
=
JsonUtils
.
fromJson
(
postRespStr
,
JsonNode
.
class
),
postRespCode
;
if
(
null
==
postRespJNode
||
null
==
(
postRespCode
=
postRespJNode
.
get
(
"code"
))
||
!
postRespCode
.
asText
().
equals
(
"0"
))
{
log
.
warn
(
"#开通业务账号:至信数字藏品账号开通失败[postBody={},postRespStr={}]"
,
postBody
,
postRespStr
);
log
.
warn
(
"#开通业务账号:至信数字藏品账号开通失败[postBody={},postRespStr={}]"
,
postBody
Node
,
postRespStr
);
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10113"
));
}
JsonNode
postRespDataJNode
=
postRespJNode
.
get
(
"data"
);
blockChainAddress
=
postRespDataJNode
.
get
(
"blockChainAddress"
).
asText
();
}
catch
(
Exception
e
)
{
log
.
error
(
"Ex.开通业务账号:至信数字藏品账号开通请求异常[url={},postBody={}],ex:{}"
,
postUrl
,
postBody
,
e
.
getMessage
());
log
.
error
(
"Ex.开通业务账号:至信数字藏品账号开通请求异常[url={},postBody={}],ex:{}"
,
postUrl
,
postBody
Node
,
e
.
getMessage
());
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10113"
));
}
...
...
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