Ver Fonte

打印日志

xielq há 4 anos atrás
pai
commit
d002cad896

+ 5 - 0
sso-server/src/main/java/com/uas/sso/service/impl/UserServiceImpl.java

@@ -1011,9 +1011,11 @@ public class UserServiceImpl implements UserService {
         try {
             // 其他应用可能会用到IMID,要先同步到im之后再同步到其他应用
             String imId = syncUserToIm(user, noEncryPwd, msg);
+            LOGGER.info("开通用户:syncUserToIm 手机号:{}, imId:{} ", user.getMobile(), imId);
             user.setImId(imId);
             user = userDao.save(user);
         } catch (Exception e) {
+            LOGGER.info("开通用户错误:syncUserToIm 手机号:{} ", user.getMobile());
             e.printStackTrace();
         }
 
@@ -1045,13 +1047,16 @@ public class UserServiceImpl implements UserService {
         formData.put("mobile", user.getMobile());
         res = HttpUtil.doPost(url, formData, 30000);
         if (!res.isSuccess()) {
+            LOGGER.info("if错误信息:{}, 同步用户信息失败:{}, {} ", msg, formData.toString(), res.getContent());
             syncLogger.error(appId, msg + ",同步用户信息失败", formData.toString(), res.getContent());
             throw new Exception(res.getContent());
         } else {
             JSONObject obj = JSON.parseObject(res.getContent());
             if (obj.getString("resultMsg") != null) {
+                LOGGER.info("else错误信息:{}, 同步用户信息失败:{}, {} ", msg, formData.toString(), res.getContent());
                 syncLogger.error(appId, msg + ",同步用户信息失败", formData.toString(), res.getContent());
             }
+            LOGGER.info("成功信息:{}, 同步用户信息成功:{}, {} ", msg, formData.toString(), res.getContent());
             syncLogger.info(appId, msg + ",同步用户信息成功", formData.toString(), res.getContent());
             return obj.getString("dialectUID");
         }