|
@@ -31,7 +31,7 @@ public class IKuaiShouCommentServiceImpl implements IKuaiShouCommentService {
|
|
public void shieldComment(Long accountId) {
|
|
public void shieldComment(Long accountId) {
|
|
try {
|
|
try {
|
|
CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
|
|
CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
|
|
- queryComments(oauthToken.getAccessToken(), accountId, 1, 500, 0);
|
|
|
|
|
|
+ queryComments(oauthToken.getAccessToken(), accountId, 1, 500, 1);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error("屏蔽评论异常", e);
|
|
log.error("屏蔽评论异常", e);
|
|
}
|
|
}
|
|
@@ -63,6 +63,7 @@ public class IKuaiShouCommentServiceImpl implements IKuaiShouCommentService {
|
|
JSONObject dataJson = resultJson.getJSONObject("data");
|
|
JSONObject dataJson = resultJson.getJSONObject("data");
|
|
JSONArray details = dataJson.getJSONArray("details");
|
|
JSONArray details = dataJson.getJSONArray("details");
|
|
if (!Check.isNull(details)) {
|
|
if (!Check.isNull(details)) {
|
|
|
|
+ log.info("账户({})删除第{}次,待删除条数:{}", accountId, num, details.size());
|
|
if (num <= 50) {
|
|
if (num <= 50) {
|
|
if (shieldCommentApi(token, accountId, details)) {
|
|
if (shieldCommentApi(token, accountId, details)) {
|
|
queryComments(token, accountId, page, pageSize, ++num);
|
|
queryComments(token, accountId, page, pageSize, ++num);
|
|
@@ -100,7 +101,11 @@ public class IKuaiShouCommentServiceImpl implements IKuaiShouCommentService {
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
if (!Check.isNull(resultJson)) {
|
|
if (!Check.isNull(resultJson)) {
|
|
Integer code = resultJson.getInteger("code");
|
|
Integer code = resultJson.getInteger("code");
|
|
- return code == 0;
|
|
|
|
|
|
+ if (code == 0) {
|
|
|
|
+ return true;
|
|
|
|
+ } else {
|
|
|
|
+ log.info("删除评论失败,accountId:{},返回信息:{}", accountId, resultJson);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|