Пример #1
0
 protected void uploadUserQQInfo(
     final String token, final String expiresIn, final String nick, final String openId)
     throws DomainException {
   final String userId = new StringBuffer(QQKey.USER_PREFIX).append(openId).toString();
   Map<String, String> parameters = new HashMap<String, String>();
   parameters.put(QQKey.USER_ID, userId);
   parameters.put(QQKey.TOKEN, token);
   parameters.put(QQKey.TOKEN_EXPIRE, expiresIn);
   parameters.put(QQKey.USER_NICK, nick);
   parameters.put(S.PLATFORM, S.MOBILE_PLATFORM);
   S.verifyParametersNotNull(parameters);
   qqUserInfoService.uploadUserInfo(parameters, qqConfiguration.getUploadUrl());
 }
Пример #2
0
 protected void updateHeadUrlIfNecessary(String openId, String thirdHeadUrl) {
   try {
     long beginTime = System.currentTimeMillis();
     if (S.isInvalidValue(thirdHeadUrl)) {
       return;
     }
     final String userId = new StringBuffer(QQKey.USER_PREFIX).append(openId).toString();
     qqUserInfoService.updateBasicInfo(userId, thirdHeadUrl, userInfoUrl, updateBasicInfoUrl);
     long endTime = System.currentTimeMillis();
     long costTime = endTime - beginTime;
     LOGGER.info("update qq head url cost>>>" + costTime);
   } catch (Exception e) {
     LOGGER.info("update qq head url error:" + e.getMessage());
   }
 }