1 changed files with 35 additions and 0 deletions
			
			
		@ -0,0 +1,35 @@ | 
				
			|||||
 | 
					package com.epmet.remote; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.commons.tools.constant.ServiceConstant; | 
				
			||||
 | 
					import com.epmet.commons.tools.feign.ResultDataResolver; | 
				
			||||
 | 
					import com.epmet.commons.tools.utils.EpmetRequestHolder; | 
				
			||||
 | 
					import com.epmet.dto.form.LoginUserDetailsFormDTO; | 
				
			||||
 | 
					import com.epmet.dto.result.LoginUserDetailsResultDTO; | 
				
			||||
 | 
					import com.epmet.feign.EpmetUserOpenFeignClient; | 
				
			||||
 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			||||
 | 
					import org.springframework.stereotype.Component; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * epmet用户远程服务工具 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Component | 
				
			||||
 | 
					public class EpmetUserRemoteService implements ResultDataResolver { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    @Autowired | 
				
			||||
 | 
					    private EpmetUserOpenFeignClient epmetUserOpenFeignClient; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 查询当前登录用户信息 | 
				
			||||
 | 
					     * @return | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    public LoginUserDetailsResultDTO getLoginUserDetails() { | 
				
			||||
 | 
					        //    不传组织id,则基于当前组织查询
 | 
				
			||||
 | 
					        LoginUserDetailsFormDTO loinUserForm = new LoginUserDetailsFormDTO(); | 
				
			||||
 | 
					        loinUserForm.setApp(EpmetRequestHolder.getLoginUserApp()); | 
				
			||||
 | 
					        loinUserForm.setClient(EpmetRequestHolder.getLoginUserClient()); | 
				
			||||
 | 
					        loinUserForm.setUserId(EpmetRequestHolder.getLoginUserId()); | 
				
			||||
 | 
					        LoginUserDetailsResultDTO loginUserDetailsResultDTO = getResultDataOrThrowsException(epmetUserOpenFeignClient.getLoginUserDetails(loinUserForm), ServiceConstant.GOV_ORG_SERVER, | 
				
			||||
 | 
					                null, null, "查询当前工作人员所属组织信息失败"); | 
				
			||||
 | 
					        return loginUserDetailsResultDTO; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
					Loading…
					
					
				
		Reference in new issue