|  |  | @ -1,8 +1,8 @@ | 
			
		
	
		
			
				
					|  |  |  | package com.epmet.modules.grid.service.impl; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | import com.alibaba.fastjson.JSON; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.AppClientConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.ServiceConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.RenException; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.security.dto.TokenDto; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.Result; | 
			
		
	
	
		
			
				
					|  |  | @ -43,20 +43,22 @@ public class ResiMineGridServiceImpl implements ResiMineGridService { | 
			
		
	
		
			
				
					|  |  |  | 	 **/ | 
			
		
	
		
			
				
					|  |  |  | 	@Override | 
			
		
	
		
			
				
					|  |  |  | 	public LatestGridInfoResultDTO getLatestGridInfo(TokenDto tokenDto) { | 
			
		
	
		
			
				
					|  |  |  | 		LatestGridInfoResultDTO latestGridInfoResultDTO=new LatestGridInfoResultDTO(); | 
			
		
	
		
			
				
					|  |  |  | 		if (null == tokenDto || StringUtils.isBlank(tokenDto.getUserId())) { | 
			
		
	
		
			
				
					|  |  |  | 			logger.error(String.format("居民端【%s】获取用户最近访问的网格失败:错误提示:%s",tokenDto.getUserId(),ModuleConstant.USER_NOT_NULL)); | 
			
		
	
		
			
				
					|  |  |  | 			logger.warn(String.format("居民端获取用户最近访问的网格失败:tokenDto is null or userId is null")); | 
			
		
	
		
			
				
					|  |  |  | 			throw new RenException(ModuleConstant.USER_NOT_NULL); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		if(!AppClientConstant.APP_RESI.equals(tokenDto.getApp())){ | 
			
		
	
		
			
				
					|  |  |  | 			logger.error(String.format("居民端【%s】获取用户最近访问的网格失败,错误提示:%s",tokenDto.getUserId(),ModuleConstant.FOR_RESI_CALL)); | 
			
		
	
		
			
				
					|  |  |  | 			logger.warn(String.format("居民端获取用户最近访问的网格失败,userId:%s,错误提示:%s",tokenDto.getUserId(),ModuleConstant.FOR_RESI_CALL)); | 
			
		
	
		
			
				
					|  |  |  | 			throw new RenException(ModuleConstant.FOR_RESI_CALL); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		logger.info(String.format("居民端获取用户最近访问网格入参%s", JSON.toJSONString(tokenDto))); | 
			
		
	
		
			
				
					|  |  |  | 		Result<LatestGridInfoResultDTO> userResult=epmetUserFeignClient.getLatestGridInfoByUserId(tokenDto.getUserId()); | 
			
		
	
		
			
				
					|  |  |  | 		if(userResult.success()&&null!=userResult.getData()){ | 
			
		
	
		
			
				
					|  |  |  | 			return userResult.getData(); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		logger.error(String.format("居民端用户【%s】获取用户最近访问网格失败,调用%s服务入参userId:%s,错误码:%s,错误提示:%s", tokenDto.getUserId(),ServiceConstant.EPMET_USER_SERVER,tokenDto.getUserId(),userResult.getCode(),userResult.getMsg())); | 
			
		
	
		
			
				
					|  |  |  | 		return null; | 
			
		
	
		
			
				
					|  |  |  | 		logger.warn(String.format("居民端获取用户最近访问网格失败,调用epmet-user-server服务返回%s",JSON.toJSONString(userResult))); | 
			
		
	
		
			
				
					|  |  |  | 		return latestGridInfoResultDTO; | 
			
		
	
		
			
				
					|  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	/** | 
			
		
	
	
		
			
				
					|  |  | 
 |