记得上下班打卡 | 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
773bf37a
Commit
773bf37a
authored
Sep 19, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_member_voucher_social' into dev_member_voucher_social
parents
dc4804ab
8e4b01b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
3 deletions
+47
-3
ChimeUserBiz.java
...in/java/com/liquidnet/service/chime/biz/ChimeUserBiz.java
+46
-2
TestDataUtils.java
.../java/com/liquidnet/service/chime/test/TestDataUtils.java
+1
-1
No files found.
liquidnet-bus-service/liquidnet-service-chime/liquidnet-service-chime-impl/src/main/java/com/liquidnet/service/chime/biz/ChimeUserBiz.java
View file @
773bf37a
...
@@ -53,11 +53,11 @@ public class ChimeUserBiz {
...
@@ -53,11 +53,11 @@ public class ChimeUserBiz {
* @return
* @return
*/
*/
public
List
<
ChimeUserTagsMappingVo
>
buildUserTagVoList
(
String
userId
,
String
tags
){
public
List
<
ChimeUserTagsMappingVo
>
buildUserTagVoList
(
String
userId
,
String
tags
){
List
<
ChimeUserTagsMappingVo
>
userTagList
=
new
ArrayList
<>
();
List
<
AdamTagVo
>
userTagVoList
=
ObjectUtil
.
getAdamTagVoArrayList
();
if
(
StringUtil
.
isNotEmpty
(
tags
)){
if
(
StringUtil
.
isNotEmpty
(
tags
)){
ObjectMapper
mapper
=
new
ObjectMapper
();
ObjectMapper
mapper
=
new
ObjectMapper
();
try
{
try
{
userTag
List
=
mapper
.
readValue
(
tags
,
new
TypeReference
<
List
<
ChimeUserTagsMappin
gVo
>>()
{});
userTag
VoList
=
mapper
.
readValue
(
tags
,
new
TypeReference
<
List
<
AdamTa
gVo
>>()
{});
}
catch
(
JsonProcessingException
e
)
{
}
catch
(
JsonProcessingException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
error
(
"createChimeUserInfo msg:{}"
,
e
.
getMessage
());
log
.
error
(
"createChimeUserInfo msg:{}"
,
e
.
getMessage
());
...
@@ -65,6 +65,14 @@ public class ChimeUserBiz {
...
@@ -65,6 +65,14 @@ public class ChimeUserBiz {
return
null
;
return
null
;
}
}
}
}
List
<
ChimeUserTagsMappingVo
>
userTagList
=
new
ArrayList
<>();
//设置用户id
userTagVoList
.
parallelStream
().
forEach
(
vo
->
{
ChimeUserTagsMappingVo
userTagsMappingVo
=
ChimeUserTagsMappingVo
.
getNew
();
userTagsMappingVo
.
setTagCode
(
vo
.
getVal
());
userTagsMappingVo
.
setTagDesc
(
vo
.
getDesc
());
userTagList
.
add
(
userTagsMappingVo
);
});
return
userTagList
;
return
userTagList
;
}
}
...
@@ -178,6 +186,11 @@ public class ChimeUserBiz {
...
@@ -178,6 +186,11 @@ public class ChimeUserBiz {
return
isOnline
;
return
isOnline
;
}
}
/**
* 根据userId获取adam用户信息
* @param userId
* @return
*/
public
AdamChimeUinfoDto
getAdamUserInfoDto
(
String
userId
){
public
AdamChimeUinfoDto
getAdamUserInfoDto
(
String
userId
){
List
<
AdamChimeUinfoDto
>
userInfoDtoList
=
this
.
getAdamUserInfoDtoList
(
Arrays
.
asList
(
new
String
[]{
userId
}));
List
<
AdamChimeUinfoDto
>
userInfoDtoList
=
this
.
getAdamUserInfoDtoList
(
Arrays
.
asList
(
new
String
[]{
userId
}));
if
(
StringUtil
.
isNotNull
(
userInfoDtoList
)&&
userInfoDtoList
.
size
()>
0
){
if
(
StringUtil
.
isNotNull
(
userInfoDtoList
)&&
userInfoDtoList
.
size
()>
0
){
...
@@ -185,6 +198,12 @@ public class ChimeUserBiz {
...
@@ -185,6 +198,12 @@ public class ChimeUserBiz {
}
}
return
null
;
return
null
;
}
}
/**
* 根据userIdlist获取用户列表
* @param userIdList
* @return
*/
public
List
<
AdamChimeUinfoDto
>
getAdamUserInfoDtoList
(
List
<
String
>
userIdList
){
public
List
<
AdamChimeUinfoDto
>
getAdamUserInfoDtoList
(
List
<
String
>
userIdList
){
ResponseDto
<
List
<
AdamChimeUinfoDto
>>
responseDto
=
null
;
ResponseDto
<
List
<
AdamChimeUinfoDto
>>
responseDto
=
null
;
try
{
try
{
...
@@ -197,4 +216,29 @@ public class ChimeUserBiz {
...
@@ -197,4 +216,29 @@ public class ChimeUserBiz {
}
}
return
responseDto
.
getData
();
return
responseDto
.
getData
();
}
}
public
String
getSexDesc
(
String
sexJson
){
AdamTagVo
adamTagVo
=
AdamTagVo
.
getNew
();
if
(
StringUtil
.
isNotEmpty
(
sexJson
)){
ObjectMapper
mapper
=
new
ObjectMapper
();
try
{
adamTagVo
=
mapper
.
readValue
(
sexJson
,
new
TypeReference
<
AdamTagVo
>(){});
}
catch
(
JsonProcessingException
e
)
{
e
.
printStackTrace
();
log
.
error
(
"getSexDesc msg:{}"
,
e
.
getMessage
());
log
.
error
(
"getSexDesc error : "
,
e
);
return
null
;
}
}
String
rsSexDesc
=
"其他"
;
switch
(
adamTagVo
.
getDesc
()){
case
"男性"
:
rsSexDesc
=
"男"
;
break
;
case
"女性"
:
rsSexDesc
=
"女"
;
break
;
}
return
rsSexDesc
;
}
}
}
liquidnet-bus-service/liquidnet-service-chime/liquidnet-service-chime-impl/src/test/java/com/liquidnet/service/chime/test/TestDataUtils.java
View file @
773bf37a
...
@@ -49,7 +49,7 @@ public class TestDataUtils {
...
@@ -49,7 +49,7 @@ public class TestDataUtils {
@Test
@Test
public
void
getPerformanceCount
(){
public
void
getPerformanceCount
(){
System
.
out
.
println
(
chimeUserBiz
.
getSexDesc
(
"{\"val\":\"MS01\",\"desc\":\"女3性\"}"
));
}
}
@Test
@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