记得上下班打卡 | 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
499187a2
Commit
499187a2
authored
Nov 22, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+log;
parent
5d709780
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
EasemobUtil.java
.../com/liquidnet/common/third/easemob/util/EasemobUtil.java
+7
-7
No files found.
liquidnet-bus-common/liquidnet-common-third/liquidnet-common-third-easemob/src/main/java/com/liquidnet/common/third/easemob/util/EasemobUtil.java
View file @
499187a2
...
...
@@ -12,6 +12,7 @@ import com.liquidnet.commons.lang.util.HttpUtil;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.LinkedMultiValueMap
;
...
...
@@ -98,21 +99,20 @@ public class EasemobUtil{
// ObjectNode objectNode = JsonUtils.OM().createObjectNode();
try
{
response
=
HttpUtil
.
postJson
(
requestUrl
,
json
.
toString
(),
commonHeader
);
}
catch
(
HttpClientErrorException
e
){
}
catch
(
HttpClientErrorException
e
)
{
log
.
error
(
"createUser error"
,
e
);
if
(
e
.
getRawStatusCode
()
==
400
){
JSONObject
jsonObject
=
JsonUtils
.
fromJson
(
e
.
getResponseBodyAsString
(),
new
TypeReference
<
JSONObject
>()
{});
log
.
info
(
"createUser error : {}"
,
jsonObject
.
get
(
"error"
));
log
.
info
(
"createUser error_description : {}"
,
jsonObject
.
get
(
"error_description"
));
return
jsonObject
.
toJSONString
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"createUser error : {}"
,
e
);
log
.
error
(
"createUser error"
,
e
);
}
log
.
info
(
"createUsers--->>> response : {} "
,
response
);
if
(
StringUtils
.
isEmpty
(
response
))
{
return
response
;
}
ObjectNode
jsonObject
=
JsonUtils
.
fromJson
(
response
,
ObjectNode
.
class
);
ArrayNode
arrayNode
=
(
ArrayNode
)
jsonObject
.
get
(
"entities"
);
response
=
arrayNode
.
get
(
0
).
toString
();
...
...
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