From e01615689ee234e241071ba9517f8c3189f9e31e Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 23 Mar 2021 17:07:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E6=9E=90=E4=B8=8B=E7=99=BB=E9=99=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E5=90=84=E4=B8=AA=E9=98=B6=E6=AE=B5?= =?UTF-8?q?=E8=80=97=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/ThirdLoginServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index d1cc70552e..7b22870b05 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -65,12 +65,15 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { **/ @Override public UserTokenResultDTO resiLogin(LoginFormDTO formDTO) { + long start = System.currentTimeMillis(); //1.调用epmet_third服务,校验appId是否有效以及是否授权,校验通过的调用微信API获取用户基本信息 WxLoginFormDTO resiLoginFormDTO = new WxLoginFormDTO(); resiLoginFormDTO.setAppId(formDTO.getAppId()); resiLoginFormDTO.setWxCode(formDTO.getWxCode()); UserWechatDTO userWechatDTO = this.getUserWeChat(resiLoginFormDTO); + logger.error("resiLogin getUserWeChat cost time:{}",System.currentTimeMillis()-start); + start = System.currentTimeMillis(); //2.调用epmet-user服务,新增用户信息(先判断用户是否存在,不存在则新增存在则更新) WxUserFormDTO wxUserFormDTO = new WxUserFormDTO(); wxUserFormDTO.setWechatDTO(userWechatDTO); @@ -79,6 +82,8 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { if (!userResult.success()) { throw new RenException(userResult.getCode()); } + logger.error("resiLogin saveWxUser cost time:{}",System.currentTimeMillis()-start); + start = System.currentTimeMillis(); UserDTO userDTO = userResult.getData(); //3.生成业务token @@ -91,7 +96,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { //5.接口返参 UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO(); userTokenResultDTO.setToken(token); - + logger.error("resiLogin generateToken cost time:{}",System.currentTimeMillis()-start); return userTokenResultDTO; }