| 
						
						
							
								
							
						
						
					 | 
					@ -2,6 +2,7 @@ package com.epmet.commons.tools.redis.common; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import cn.hutool.core.bean.BeanUtil; | 
					 | 
					 | 
					import cn.hutool.core.bean.BeanUtil; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.alibaba.fastjson.JSON; | 
					 | 
					 | 
					import com.alibaba.fastjson.JSON; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; | 
					 | 
					 | 
					import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.exception.RenException; | 
					 | 
					 | 
					import com.epmet.commons.tools.exception.RenException; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.feign.CommonAggFeignClient; | 
					 | 
					 | 
					import com.epmet.commons.tools.feign.CommonAggFeignClient; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -102,14 +103,17 @@ public class CustomerStaffRedis { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param staffId | 
					 | 
					 | 
					     * @param staffId | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public static Map<String, String> getStaffRoleMap(String customerId, String staffId) { | 
					 | 
					 | 
					    public static Map<String, String> getStaffRoleMap(String customerId, String staffId) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        String key = RedisKeys.getCustomerStaffInfoKey(customerId, staffId); | 
					 | 
					 | 
					        int retryTime = 0; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Map<String, String> roleMap = (Map<String, String>) customerStaffRedis.redisUtils.hGet(key, ROLE_MAP_KEY); | 
					 | 
					 | 
					        do { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (!CollectionUtils.isEmpty(roleMap)) { | 
					 | 
					 | 
					            String key = RedisKeys.getCustomerStaffInfoKey(customerId, staffId); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            return roleMap; | 
					 | 
					 | 
					            Map<String, String> roleMap = (Map<String, String>) customerStaffRedis.redisUtils.hGet(key, ROLE_MAP_KEY); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        } | 
					 | 
					 | 
					            if (!CollectionUtils.isEmpty(roleMap)) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
					                return roleMap; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        reloadStaffCache(staffId, key); | 
					 | 
					 | 
					            } | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        return getStaffRoleMap(customerId, staffId); | 
					 | 
					 | 
					            retryTime++; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            reloadStaffCache(staffId, key); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } while (retryTime < NumConstant.TWO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        return null; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |