记得上下班打卡 | git大法好,push需谨慎

Commit 773bf37a authored by 张国柄's avatar 张国柄

Merge remote-tracking branch 'origin/dev_member_voucher_social' into dev_member_voucher_social

parents dc4804ab 8e4b01b9
......@@ -53,11 +53,11 @@ public class ChimeUserBiz {
* @return
*/
public List<ChimeUserTagsMappingVo> buildUserTagVoList(String userId,String tags){
List<ChimeUserTagsMappingVo> userTagList = new ArrayList<>();
List<AdamTagVo> userTagVoList = ObjectUtil.getAdamTagVoArrayList();
if(StringUtil.isNotEmpty(tags)){
ObjectMapper mapper = new ObjectMapper();
try {
userTagList = mapper.readValue(tags, new TypeReference<List<ChimeUserTagsMappingVo>>() {});
userTagVoList = mapper.readValue(tags, new TypeReference<List<AdamTagVo>>() {});
} catch (JsonProcessingException e) {
e.printStackTrace();
log.error("createChimeUserInfo msg:{}",e.getMessage());
......@@ -65,6 +65,14 @@ public class ChimeUserBiz {
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;
}
......@@ -178,6 +186,11 @@ public class ChimeUserBiz {
return isOnline;
}
/**
* 根据userId获取adam用户信息
* @param userId
* @return
*/
public AdamChimeUinfoDto getAdamUserInfoDto(String userId){
List<AdamChimeUinfoDto> userInfoDtoList = this.getAdamUserInfoDtoList(Arrays.asList(new String[]{userId}));
if(StringUtil.isNotNull(userInfoDtoList)&&userInfoDtoList.size()>0){
......@@ -185,6 +198,12 @@ public class ChimeUserBiz {
}
return null;
}
/**
* 根据userIdlist获取用户列表
* @param userIdList
* @return
*/
public List<AdamChimeUinfoDto> getAdamUserInfoDtoList(List<String> userIdList){
ResponseDto<List<AdamChimeUinfoDto>> responseDto = null;
try {
......@@ -197,4 +216,29 @@ public class ChimeUserBiz {
}
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;
}
}
......@@ -49,7 +49,7 @@ public class TestDataUtils {
@Test
public void getPerformanceCount(){
System.out.println(chimeUserBiz.getSexDesc("{\"val\":\"MS01\",\"desc\":\"女3性\"}"));
}
@Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment