|
|
|
@@ -1371,31 +1371,40 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc |
|
|
|
// chlesMap = chless.stream().collect(Collectors.toMap(WxCreditHistory::getCUserId, WxCreditHistory::getCreditNum)); |
|
|
|
// } |
|
|
|
|
|
|
|
WxCUserTags tq = new WxCUserTags(); |
|
|
|
tq.setUserIdList(userIds); |
|
|
|
tq.setTenantId(tenantInfo.getFinalTenantId()); |
|
|
|
List<WxCUserTags> userTagList = wxCUserTagsMapper.findList(tq); |
|
|
|
Map<Long, String> tagMap = new HashMap<>(); |
|
|
|
Map<Long, String> userTagsMap = new HashMap<>(); |
|
|
|
if (null != userTagList) { |
|
|
|
List<WxTags> tagList = wxTagsMapper.findListAll(); |
|
|
|
tagMap = tagList.stream().collect(Collectors.toMap(WxTags::getId, WxTags::getName)); |
|
|
|
userTagsMap = userTagList.stream().collect(Collectors.toMap(WxCUserTags::getUserId, WxCUserTags::getTags)); |
|
|
|
|
|
|
|
} |
|
|
|
// WxCUserTags tq = new WxCUserTags(); |
|
|
|
// tq.setUserIdList(userIds); |
|
|
|
// tq.setTenantId(tenantInfo.getFinalTenantId()); |
|
|
|
// List<WxCUserTags> userTagList = wxCUserTagsMapper.findList(tq); |
|
|
|
// Map<Long, String> tagMap = new HashMap<>(); |
|
|
|
// Map<Long, String> userTagsMap = new HashMap<>(); |
|
|
|
// if (null != userTagList) { |
|
|
|
// List<WxTags> tagList = wxTagsMapper.findListAll(); |
|
|
|
// tagMap = tagList.stream().collect(Collectors.toMap(WxTags::getId, WxTags::getName)); |
|
|
|
// userTagsMap = userTagList.stream().collect(Collectors.toMap(WxCUserTags::getUserId, WxCUserTags::getTags)); |
|
|
|
// |
|
|
|
// } |
|
|
|
|
|
|
|
List<WxTags> tagList = wxTagsMapper.findListAll(); |
|
|
|
|
|
|
|
// Map<Long, Integer> finalChaddMap = chaddMap; |
|
|
|
// Map<Long, Integer> finalChlesMap = chlesMap; |
|
|
|
Map<Long, String> finalUserTagsMap = userTagsMap; |
|
|
|
Map<Long, String> finalTagMap = tagMap; |
|
|
|
// Map<Long, String> finalUserTagsMap = userTagsMap; |
|
|
|
Map<Long, String> finalTagMap = tagList.stream().collect(Collectors.toMap(WxTags::getId, WxTags::getName));; |
|
|
|
list.stream().forEach(u->{ |
|
|
|
// u.setAddCredit(finalChaddMap.get(u.getId())); |
|
|
|
// u.setLesCredit(finalChlesMap.get(u.getId())); |
|
|
|
List<Long> ids = JSONObject.parseArray(finalUserTagsMap.get(u.getId()), Long.class); |
|
|
|
if (null != ids) { |
|
|
|
String tagNames = StringUtils.join(ids.stream().map(id-> finalTagMap.get(id)).collect(Collectors.toList()),"/"); |
|
|
|
u.setTagNames(tagNames); |
|
|
|
if(StringUtils.isNotBlank(u.getTags())){ |
|
|
|
List<Long> ids = JSONObject.parseArray(u.getTags(), Long.class); |
|
|
|
if (null != ids) { |
|
|
|
String tagNames = StringUtils.join(ids.stream().map(id-> finalTagMap.get(id)).collect(Collectors.toList()),"/"); |
|
|
|
u.setTagNames(tagNames); |
|
|
|
} |
|
|
|
} |
|
|
|
// List<Long> ids = JSONObject.parseArray(finalUserTagsMap.get(u.getId()), Long.class); |
|
|
|
// if (null != ids) { |
|
|
|
// String tagNames = StringUtils.join(ids.stream().map(id-> finalTagMap.get(id)).collect(Collectors.toList()),"/"); |
|
|
|
// u.setTagNames(tagNames); |
|
|
|
// } |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|