| 
						
						
							
								
							
						
						
					 | 
					@ -122,7 +122,9 @@ public class IssueProjectTagDictRedis { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                Map<Double, List<IssueCategoryTagResultDTO>> customizedHeatMap = new HashMap<>(); | 
					 | 
					 | 
					                Map<Double, List<IssueCategoryTagResultDTO>> customizedHeatMap = new HashMap<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                customizedTuples.forEach(tuple -> { | 
					 | 
					 | 
					                customizedTuples.forEach(tuple -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    List<IssueCategoryTagResultDTO> queue = customizedHeatMap.get(tuple.getScore()); | 
					 | 
					 | 
					                    List<IssueCategoryTagResultDTO> queue = customizedHeatMap.get(tuple.getScore()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    if((CollectionUtils.isEmpty(queue))) queue = new LinkedList<>(); | 
					 | 
					 | 
					                    if((CollectionUtils.isEmpty(queue))) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        queue = new LinkedList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    queue.add(parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class)); | 
					 | 
					 | 
					                    queue.add(parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    customizedHeatMap.put(tuple.getScore(),queue); | 
					 | 
					 | 
					                    customizedHeatMap.put(tuple.getScore(),queue); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                }); | 
					 | 
					 | 
					                }); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -137,8 +139,9 @@ public class IssueProjectTagDictRedis { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //默认、自定义标签,只要有一个是空就触发补偿
 | 
					 | 
					 | 
					        //默认、自定义标签,只要有一个是空就触发补偿
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //不信任缓存数据
 | 
					 | 
					 | 
					        //不信任缓存数据
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if(!CollectionUtils.isEmpty(result) && !CollectionUtils.isEmpty(result.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME)) | 
					 | 
					 | 
					        if(!CollectionUtils.isEmpty(result) && !CollectionUtils.isEmpty(result.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME)) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                && !CollectionUtils.isEmpty(result.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME))) | 
					 | 
					 | 
					                && !CollectionUtils.isEmpty(result.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME))) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            return result; | 
					 | 
					 | 
					            return result; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -183,11 +186,13 @@ public class IssueProjectTagDictRedis { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null); | 
					 | 
					 | 
					            IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            boolean ifOtherOnly = null != otherCategory && (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId())); | 
					 | 
					 | 
					            boolean ifOtherOnly = null != otherCategory && (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            Set<String> keys; | 
					 | 
					 | 
					            Set<String> keys; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            if (CollectionUtils.isEmpty(category) || ifOtherOnly) | 
					 | 
					 | 
					            if (CollectionUtils.isEmpty(category) || ifOtherOnly) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                keys = redisUtils.keys(GovIssueRedisKeys.getGovernmentTagKey(customerId, null)); | 
					 | 
					 | 
					                keys = redisUtils.keys(GovIssueRedisKeys.getGovernmentTagKey(customerId, null)); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            else keys = category.stream().map(key -> { | 
					 | 
					 | 
					            } else { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                return GovIssueRedisKeys.getGovernmentTagKey(customerId, key); | 
					 | 
					 | 
					                keys = category.stream().map(key -> { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            }).collect(Collectors.toSet()); | 
					 | 
					 | 
					                    return GovIssueRedisKeys.getGovernmentTagKey(customerId, key); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                }).collect(Collectors.toSet()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //如果keys集合为空,说明缓存中没有当前客户的标签排行信息,直接进行补偿
 | 
					 | 
					 | 
					            //如果keys集合为空,说明缓存中没有当前客户的标签排行信息,直接进行补偿
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (!CollectionUtils.isEmpty(keys)){ | 
					 | 
					 | 
					            if (!CollectionUtils.isEmpty(keys)){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                keys.remove(GovIssueRedisKeys.getGovernmentTagKey(customerId,ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME)); | 
					 | 
					 | 
					                keys.remove(GovIssueRedisKeys.getGovernmentTagKey(customerId,ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME)); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -211,7 +216,9 @@ public class IssueProjectTagDictRedis { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        tupleSet.forEach(tuple -> { | 
					 | 
					 | 
					                        tupleSet.forEach(tuple -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            Double heatScore = tuple.getScore(); | 
					 | 
					 | 
					                            Double heatScore = tuple.getScore(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            List<IssueCategoryTagResultDTO> queue = heatMap.get(heatScore); | 
					 | 
					 | 
					                            List<IssueCategoryTagResultDTO> queue = heatMap.get(heatScore); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                            if (CollectionUtils.isEmpty(queue)) queue = new LinkedList<>(); | 
					 | 
					 | 
					                            if (CollectionUtils.isEmpty(queue)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                                queue = new LinkedList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            queue.add(parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class)); | 
					 | 
					 | 
					                            queue.add(parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            heatMap.put(heatScore, queue); | 
					 | 
					 | 
					                            heatMap.put(heatScore, queue); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        }); | 
					 | 
					 | 
					                        }); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -228,7 +235,9 @@ public class IssueProjectTagDictRedis { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        Map<Double, List<IssueCategoryTagResultDTO>> customizedHeatMap = new HashMap<>(); | 
					 | 
					 | 
					                        Map<Double, List<IssueCategoryTagResultDTO>> customizedHeatMap = new HashMap<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        customizedTuples.forEach(tuple -> { | 
					 | 
					 | 
					                        customizedTuples.forEach(tuple -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            List<IssueCategoryTagResultDTO> queue = customizedHeatMap.get(tuple.getValue()); | 
					 | 
					 | 
					                            List<IssueCategoryTagResultDTO> queue = customizedHeatMap.get(tuple.getValue()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                            if((CollectionUtils.isEmpty(queue))) queue = new LinkedList<>(); | 
					 | 
					 | 
					                            if((CollectionUtils.isEmpty(queue))) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                                queue = new LinkedList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                                queue.add(parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class)); | 
					 | 
					 | 
					                                queue.add(parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            customizedHeatMap.put((Double) tuple.getValue(),queue); | 
					 | 
					 | 
					                            customizedHeatMap.put((Double) tuple.getValue(),queue); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        }); | 
					 | 
					 | 
					                        }); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -323,7 +332,9 @@ public class IssueProjectTagDictRedis { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                String redisKey = GovIssueRedisKeys.getGovernmentTagKey(customerId, k); | 
					 | 
					 | 
					                String redisKey = GovIssueRedisKeys.getGovernmentTagKey(customerId, k); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                v.forEach(tag -> { | 
					 | 
					 | 
					                v.forEach(tag -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    List<IssueCategoryTagResultDTO> unit = scoreMap.get(tag.getIssueUseCount()); | 
					 | 
					 | 
					                    List<IssueCategoryTagResultDTO> unit = scoreMap.get(tag.getIssueUseCount()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    if (CollectionUtils.isEmpty(unit)) unit = new LinkedList<>(); | 
					 | 
					 | 
					                    if (CollectionUtils.isEmpty(unit)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        unit = new LinkedList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    IssueCategoryTagResultDTO object = ConvertUtils.sourceToTarget(tag, IssueCategoryTagResultDTO.class); | 
					 | 
					 | 
					                    IssueCategoryTagResultDTO object = ConvertUtils.sourceToTarget(tag, IssueCategoryTagResultDTO.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    object.setName(tag.getTagName()); | 
					 | 
					 | 
					                    object.setName(tag.getTagName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    unit.add(object); | 
					 | 
					 | 
					                    unit.add(object); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -423,7 +434,9 @@ public class IssueProjectTagDictRedis { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @date 2021.03.20 01:04 | 
					 | 
					 | 
					     * @date 2021.03.20 01:04 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    */ | 
					 | 
					 | 
					    */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void batchIncrScore(Map<String,Map<String,List<IssueCategoryTagResultDTO>>> param){ | 
					 | 
					 | 
					    public void batchIncrScore(Map<String,Map<String,List<IssueCategoryTagResultDTO>>> param){ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if(CollectionUtils.isEmpty(param)) return; | 
					 | 
					 | 
					        if(CollectionUtils.isEmpty(param)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            return; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        redisTemplate.executePipelined((RedisCallback) connection -> { | 
					 | 
					 | 
					        redisTemplate.executePipelined((RedisCallback) connection -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            param.forEach((operation,map) -> { | 
					 | 
					 | 
					            param.forEach((operation,map) -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                if(!CollectionUtils.isEmpty(map)){ | 
					 | 
					 | 
					                if(!CollectionUtils.isEmpty(map)){ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -452,7 +465,9 @@ public class IssueProjectTagDictRedis { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @date 2021.03.22 16:20 | 
					 | 
					 | 
					     * @date 2021.03.22 16:20 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    */ | 
					 | 
					 | 
					    */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void updateTagAvailabilityBySecondCategoryIds(String customerId,List<String>secondCategoryIds,String availableFlag){ | 
					 | 
					 | 
					    public void updateTagAvailabilityBySecondCategoryIds(String customerId,List<String>secondCategoryIds,String availableFlag){ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if(CollectionUtils.isEmpty(secondCategoryIds)) return; | 
					 | 
					 | 
					        if(CollectionUtils.isEmpty(secondCategoryIds)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            return; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        secondCategoryIds.forEach(cid -> { | 
					 | 
					 | 
					        secondCategoryIds.forEach(cid -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            String key = GovIssueRedisKeys.getGovernmentTagKey(customerId, cid); | 
					 | 
					 | 
					            String key = GovIssueRedisKeys.getGovernmentTagKey(customerId, cid); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -463,7 +478,9 @@ public class IssueProjectTagDictRedis { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                Map<Double, Set<IssueCategoryTagResultDTO>> heatMap = new HashMap<>(); | 
					 | 
					 | 
					                Map<Double, Set<IssueCategoryTagResultDTO>> heatMap = new HashMap<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                tagTuples.forEach(tuple -> { | 
					 | 
					 | 
					                tagTuples.forEach(tuple -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    Set<IssueCategoryTagResultDTO> queue = heatMap.get(tuple.getValue()); | 
					 | 
					 | 
					                    Set<IssueCategoryTagResultDTO> queue = heatMap.get(tuple.getValue()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    if((CollectionUtils.isEmpty(queue))) queue = new HashSet<>(); | 
					 | 
					 | 
					                    if((CollectionUtils.isEmpty(queue))) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        queue = new HashSet<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    IssueCategoryTagResultDTO ele = parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class); | 
					 | 
					 | 
					                    IssueCategoryTagResultDTO ele = parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    ele.setIsDisable(availableFlag); | 
					 | 
					 | 
					                    ele.setIsDisable(availableFlag); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    queue.add(ele); | 
					 | 
					 | 
					                    queue.add(ele); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |