| 
						
						
							
								
							
						
						
					 | 
					@ -24,7 +24,6 @@ import com.epmet.commons.tools.redis.common.bean.DingMiniInfoCache; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.security.dto.GovTokenDto; | 
					 | 
					 | 
					import com.epmet.commons.tools.security.dto.GovTokenDto; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.security.dto.TokenDto; | 
					 | 
					 | 
					import com.epmet.commons.tools.security.dto.TokenDto; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.security.password.PasswordUtils; | 
					 | 
					 | 
					import com.epmet.commons.tools.security.password.PasswordUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.security.user.LoginUserUtil; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.*; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.api.yt.YantaiApi; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.api.yt.YantaiApi; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.api.yt.YantaiSSOUser; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.api.yt.YantaiSSOUser; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -36,7 +35,9 @@ import com.epmet.dto.dingres.DingUserDetailDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.dingres.V2UserGetuserinfoResDTO; | 
					 | 
					 | 
					import com.epmet.dto.dingres.V2UserGetuserinfoResDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.form.*; | 
					 | 
					 | 
					import com.epmet.dto.form.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.result.*; | 
					 | 
					 | 
					import com.epmet.dto.result.*; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					import com.epmet.feign.*; | 
					 | 
					 | 
					import com.epmet.feign.EpmetMessageOpenFeignClient; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.feign.EpmetUserOpenFeignClient; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.feign.GovOrgOpenFeignClient; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.jwt.JwtTokenProperties; | 
					 | 
					 | 
					import com.epmet.jwt.JwtTokenProperties; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.jwt.JwtTokenUtils; | 
					 | 
					 | 
					import com.epmet.jwt.JwtTokenUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.redis.CaptchaRedis; | 
					 | 
					 | 
					import com.epmet.redis.CaptchaRedis; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -87,17 +88,11 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private EpmetMessageOpenFeignClient messageOpenFeignClient; | 
					 | 
					 | 
					    private EpmetMessageOpenFeignClient messageOpenFeignClient; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private LoginUserUtil loginUserUtil; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private DingTalkClientToken dingTalkClientToken; | 
					 | 
					 | 
					    private DingTalkClientToken dingTalkClientToken; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private DingTalkClientUser dingTalkClientUser; | 
					 | 
					 | 
					    private DingTalkClientUser dingTalkClientUser; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private EpmetUserFeignClient epmetUserFeignClient; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private GovWebService govWebService; | 
					 | 
					 | 
					    private GovWebService govWebService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private ThirdOpenFeignClient thirdOpenFeignClient; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param formDTO | 
					 | 
					 | 
					     * @param formDTO | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -224,7 +219,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //7.发送登录事件
 | 
					 | 
					 | 
					        //7.发送登录事件
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        try { | 
					 | 
					 | 
					        try { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            sendLoginEvent(staffLatestAgencyResultDTO.getStaffId(), formDTO.getAppId(), AppClientConstant.APP_GOV, AppClientConstant.CLIENT_WXMP); | 
					 | 
					 | 
					            sendLoginEvent(staffLatestAgencyResultDTO.getStaffId(), formDTO.getAppId(), AppClientConstant.APP_GOV, AppClientConstant.CLIENT_WXMP, AuthOperationConstants.LOGIN); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } catch (RenException e) { | 
					 | 
					 | 
					        } catch (RenException e) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            log.error(e.getInternalMsg()); | 
					 | 
					 | 
					            log.error(e.getInternalMsg()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } catch (Exception e) { | 
					 | 
					 | 
					        } catch (Exception e) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -455,7 +450,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //6.发送登录事件
 | 
					 | 
					 | 
					        //6.发送登录事件
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        try { | 
					 | 
					 | 
					        try { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            sendLoginEvent(customerStaff.getUserId(), formDTO.getAppId(), AppClientConstant.APP_GOV, AppClientConstant.CLIENT_WXMP); | 
					 | 
					 | 
					            sendLoginEvent(customerStaff.getUserId(), formDTO.getAppId(), AppClientConstant.APP_GOV, AppClientConstant.CLIENT_WXMP, AuthOperationConstants.LOGIN); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } catch (RenException e) { | 
					 | 
					 | 
					        } catch (RenException e) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            log.error(e.getInternalMsg()); | 
					 | 
					 | 
					            log.error(e.getInternalMsg()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } catch (Exception e) { | 
					 | 
					 | 
					        } catch (Exception e) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -517,7 +512,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //6.发送登录事件
 | 
					 | 
					 | 
					        //6.发送登录事件
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        try { | 
					 | 
					 | 
					        try { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            sendLoginEvent(customerStaff.getUserId(), formDTO.getAppId(), AppClientConstant.APP_GOV, AppClientConstant.CLIENT_WXMP); | 
					 | 
					 | 
					            sendLoginEvent(customerStaff.getUserId(), formDTO.getAppId(), AppClientConstant.APP_GOV, AppClientConstant.CLIENT_WXMP, AuthOperationConstants.LOGIN); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } catch (RenException e) { | 
					 | 
					 | 
					        } catch (RenException e) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            log.error(e.getInternalMsg()); | 
					 | 
					 | 
					            log.error(e.getInternalMsg()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } catch (Exception e) { | 
					 | 
					 | 
					        } catch (Exception e) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -842,7 +837,8 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @author wxz | 
					 | 
					 | 
					     * @author wxz | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @date 2021.06.08 15:27 | 
					 | 
					 | 
					     * @date 2021.06.08 15:27 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    */ | 
					 | 
					 | 
					    */ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    private void sendLoginEvent(String userId, String appId, String fromApp, String fromClient) { | 
					 | 
					 | 
					    @Override | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    public void sendLoginEvent(String userId, String appId, String fromApp, String fromClient,String messageType) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | 
					 | 
					 | 
					        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        LoginMQMsg loginMQMsg = new LoginMQMsg(); | 
					 | 
					 | 
					        LoginMQMsg loginMQMsg = new LoginMQMsg(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -853,7 +849,8 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        loginMQMsg.setFromApp(fromApp); | 
					 | 
					 | 
					        loginMQMsg.setFromApp(fromApp); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        loginMQMsg.setFromClient(fromClient); | 
					 | 
					 | 
					        loginMQMsg.setFromClient(fromClient); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        SystemMsgFormDTO form = new SystemMsgFormDTO(); | 
					 | 
					 | 
					        SystemMsgFormDTO form = new SystemMsgFormDTO(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        form.setMessageType(AuthOperationConstants.LOGIN); | 
					 | 
					 | 
					        // form.setMessageType(AuthOperationConstants.LOGIN);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        form.setMessageType(messageType); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        form.setContent(loginMQMsg); | 
					 | 
					 | 
					        form.setContent(loginMQMsg); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        messageOpenFeignClient.sendSystemMsgByMQ(form); | 
					 | 
					 | 
					        messageOpenFeignClient.sendSystemMsgByMQ(form); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //getResultDataOrThrowsException(result, ServiceConstant.EPMET_MESSAGE_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用Message服务,发送登录事件到MQ失败");
 | 
					 | 
					 | 
					        //getResultDataOrThrowsException(result, ServiceConstant.EPMET_MESSAGE_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用Message服务,发送登录事件到MQ失败");
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |