|
|
|
@@ -1347,67 +1347,68 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc |
|
|
|
if (null == list || list.size() <= 0 ) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
List<Long> userIds = wxCUserBasicInfoMapper.findVoIdsList1(tenantInfo,basicInfo); |
|
|
|
if (null != userIds && userIds.size() > 0 ) { |
|
|
|
WxCreditHistory chaddq = new WxCreditHistory(); |
|
|
|
chaddq.setUserIdList(userIds); |
|
|
|
chaddq.setTenantId(tenantInfo.getFinalTenantId()); |
|
|
|
chaddq.setStartTime(basicInfo.getCreditStartTime()); |
|
|
|
chaddq.setEndTime(basicInfo.getCreditEndTime()); |
|
|
|
List<WxCreditHistory> chadds = creditHistoryMapper.findAddList(chaddq); |
|
|
|
Map<Long, Integer> chaddMap = new HashMap<>(); |
|
|
|
if(null != chadds){ |
|
|
|
chaddMap = chadds.stream().collect(Collectors.toMap(WxCreditHistory::getCUserId, WxCreditHistory::getCreditNum)); |
|
|
|
} |
|
|
|
|
|
|
|
WxCreditHistory chlesq = new WxCreditHistory(); |
|
|
|
chlesq.setUserIdList(userIds); |
|
|
|
chlesq.setTenantId(tenantInfo.getFinalTenantId()); |
|
|
|
chlesq.setStartTime(basicInfo.getCreditStartTime()); |
|
|
|
chlesq.setEndTime(basicInfo.getCreditEndTime()); |
|
|
|
List<WxCreditHistory> chless = creditHistoryMapper.findLesList(chlesq); |
|
|
|
Map<Long, Integer> chlesMap = new HashMap<>(); |
|
|
|
if(null != chless){ |
|
|
|
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)); |
|
|
|
|
|
|
|
// List<Long> userIds = wxCUserBasicInfoMapper.findVoIdsList1(tenantInfo,basicInfo); |
|
|
|
// if (null != userIds && userIds.size() > 0 ) { |
|
|
|
// WxCreditHistory chaddq = new WxCreditHistory(); |
|
|
|
// chaddq.setUserIdList(userIds); |
|
|
|
// chaddq.setTenantId(tenantInfo.getFinalTenantId()); |
|
|
|
// chaddq.setStartTime(basicInfo.getCreditStartTime()); |
|
|
|
// chaddq.setEndTime(basicInfo.getCreditEndTime()); |
|
|
|
// List<WxCreditHistory> chadds = creditHistoryMapper.findAddList(chaddq); |
|
|
|
// Map<Long, Integer> chaddMap = new HashMap<>(); |
|
|
|
// if(null != chadds){ |
|
|
|
// chaddMap = chadds.stream().collect(Collectors.toMap(WxCreditHistory::getCUserId, WxCreditHistory::getCreditNum)); |
|
|
|
// } |
|
|
|
// |
|
|
|
// WxCreditHistory chlesq = new WxCreditHistory(); |
|
|
|
// chlesq.setUserIdList(userIds); |
|
|
|
// chlesq.setTenantId(tenantInfo.getFinalTenantId()); |
|
|
|
// chlesq.setStartTime(basicInfo.getCreditStartTime()); |
|
|
|
// chlesq.setEndTime(basicInfo.getCreditEndTime()); |
|
|
|
// List<WxCreditHistory> chless = creditHistoryMapper.findLesList(chlesq); |
|
|
|
// Map<Long, Integer> chlesMap = new HashMap<>(); |
|
|
|
// if(null != chless){ |
|
|
|
// 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)); |
|
|
|
//// |
|
|
|
//// } |
|
|
|
// |
|
|
|
// List<WxTags> tagList = wxTagsMapper.findListAll(); |
|
|
|
// |
|
|
|
// } |
|
|
|
|
|
|
|
List<WxTags> tagList = wxTagsMapper.findListAll(); |
|
|
|
|
|
|
|
Map<Long, Integer> finalChaddMap = chaddMap; |
|
|
|
Map<Long, Integer> finalChlesMap = chlesMap; |
|
|
|
// 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())); |
|
|
|
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); |
|
|
|
// Map<Long, Integer> finalChaddMap = chaddMap; |
|
|
|
// Map<Long, Integer> finalChlesMap = chlesMap; |
|
|
|
//// 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())); |
|
|
|
// 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); |
|
|
|
//// } |
|
|
|
// }); |
|
|
|
// |
|
|
|
// } |
|
|
|
if (null != list && list.size() > 0 ) { |
|
|
|
List<Object> retList = new ArrayList<Object>(); |
|
|
|
retList.addAll(list); |
|
|
|
|