|
|
@ -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.TokenDto; |
|
|
|
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.api.yt.YantaiApi; |
|
|
|
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.form.*; |
|
|
|
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.JwtTokenUtils; |
|
|
|
import com.epmet.redis.CaptchaRedis; |
|
|
@ -87,17 +88,11 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol |
|
|
|
@Autowired |
|
|
|
private EpmetMessageOpenFeignClient messageOpenFeignClient; |
|
|
|
@Autowired |
|
|
|
private LoginUserUtil loginUserUtil; |
|
|
|
@Autowired |
|
|
|
private DingTalkClientToken dingTalkClientToken; |
|
|
|
@Autowired |
|
|
|
private DingTalkClientUser dingTalkClientUser; |
|
|
|
@Autowired |
|
|
|
private EpmetUserFeignClient epmetUserFeignClient; |
|
|
|
@Autowired |
|
|
|
private GovWebService govWebService; |
|
|
|
@Autowired |
|
|
|
private ThirdOpenFeignClient thirdOpenFeignClient; |
|
|
|
|
|
|
|
/** |
|
|
|
* @param formDTO |
|
|
@ -224,7 +219,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol |
|
|
|
|
|
|
|
//7.发送登录事件
|
|
|
|
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) { |
|
|
|
log.error(e.getInternalMsg()); |
|
|
|
} catch (Exception e) { |
|
|
@ -455,7 +450,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol |
|
|
|
|
|
|
|
//6.发送登录事件
|
|
|
|
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) { |
|
|
|
log.error(e.getInternalMsg()); |
|
|
|
} catch (Exception e) { |
|
|
@ -517,7 +512,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol |
|
|
|
|
|
|
|
//6.发送登录事件
|
|
|
|
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) { |
|
|
|
log.error(e.getInternalMsg()); |
|
|
|
} catch (Exception e) { |
|
|
@ -842,7 +837,8 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol |
|
|
|
* @author wxz |
|
|
|
* @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(); |
|
|
|
|
|
|
|
LoginMQMsg loginMQMsg = new LoginMQMsg(); |
|
|
@ -853,7 +849,8 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol |
|
|
|
loginMQMsg.setFromApp(fromApp); |
|
|
|
loginMQMsg.setFromClient(fromClient); |
|
|
|
SystemMsgFormDTO form = new SystemMsgFormDTO(); |
|
|
|
form.setMessageType(AuthOperationConstants.LOGIN); |
|
|
|
// form.setMessageType(AuthOperationConstants.LOGIN);
|
|
|
|
form.setMessageType(messageType); |
|
|
|
form.setContent(loginMQMsg); |
|
|
|
messageOpenFeignClient.sendSystemMsgByMQ(form); |
|
|
|
//getResultDataOrThrowsException(result, ServiceConstant.EPMET_MESSAGE_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用Message服务,发送登录事件到MQ失败");
|
|
|
|