if (weiboMap != null && StringUtils.isNotBlank(String.valueOf(weiboMap.getTqqWeiboId()))) {
Response response = null;
Throwable throwable = null;
TqqWeiboApi tqqApi = null;
String commentUserId = String.valueOf(comment.getUser().getId());
String tqqWeiboId = String.valueOf(weiboMap.getTqqWeiboId());
String commentMsg = comment.getText();
if (commentUserId.equals(this.tqqWeiboApi.getUsetId())) {
tqqApi = this.tqqWeiboApi;
} else {
UserMap userMap = this.userMapDao.getUserMap(commentUserId);
if (userMap != null && StringUtils.isNotBlank(userMap.getTqqUserId())) {
AuthToken tempAuthToken = this.authTokenDao.getByUserId(userMap.getTqqUserId(), WeiboSource.Tqq);
this.tqqTempWeiboApi.setAuthToken(tempAuthToken);
tqqApi = this.tqqTempWeiboApi;
} else {
tqqApi = this.tqqRobotWeiboApi;
commentMsg = "Sina @" + comment.getUser().getScreenName() + "//" + commentMsg;
}
}
try {
response = tqqApi.sendComment(tqqWeiboId, commentMsg, null);
} catch (Exception e) {
throwable = e;
}
// 処理成功ならば、同期化レコードをデータストアへ保存する