|
@@ -142,7 +142,7 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
|
@@ -142,7 +142,7 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
142
|
int pageSize = 100;
|
142
|
int pageSize = 100;
|
143
|
int totalPage = total % pageSize ==0 ? total / pageSize : (total / pageSize)+1;
|
143
|
int totalPage = total % pageSize ==0 ? total / pageSize : (total / pageSize)+1;
|
144
|
int grass_praise_count=0;
|
144
|
int grass_praise_count=0;
|
145
|
- List<Integer> publicArticleIds = Lists.newArrayList();
|
145
|
+ int public_praise_count=0;
|
146
|
for (int i = 0; i < totalPage; i++) {
|
146
|
for (int i = 0; i < totalPage; i++) {
|
147
|
Pageable pageReq = PageRequest.of(i, pageSize);
|
147
|
Pageable pageReq = PageRequest.of(i, pageSize);
|
148
|
List<GrassArticle> grassArticleList = grassArticleRepository.findAllByCreateTimeAfterAndCreateTimeBeforeAndArticleTypeInAndAuthStatusIn(
|
148
|
List<GrassArticle> grassArticleList = grassArticleRepository.findAllByCreateTimeAfterAndCreateTimeBeforeAndArticleTypeInAndAuthStatusIn(
|
|
@@ -156,7 +156,8 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
|
@@ -156,7 +156,8 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
156
|
List<PublicArticle> nowPublicArticleList = publicArticleRepository.findAllByRelateIdInAndArticleTypeIn(nowArticleIds, Lists.newArrayList(5));
|
156
|
List<PublicArticle> nowPublicArticleList = publicArticleRepository.findAllByRelateIdInAndArticleTypeIn(nowArticleIds, Lists.newArrayList(5));
|
157
|
publicArticleId.addAll(nowPublicArticleList.stream().map(BaseEntity::getId).collect(Collectors.toList()));
|
157
|
publicArticleId.addAll(nowPublicArticleList.stream().map(BaseEntity::getId).collect(Collectors.toList()));
|
158
|
}
|
158
|
}
|
159
|
- publicArticleIds.addAll(publicArticleId);
|
159
|
+ int public_count = publicUserPraiseRepository.countByTargetIdInAndPraiseTypeIsAndSrcChannelIs(publicArticleId, UserPraiseConstant.ARTICLE_PRAISE , 1);
|
|
|
160
|
+ public_praise_count +=public_count;
|
160
|
grass_praise_count +=grass_count;
|
161
|
grass_praise_count +=grass_count;
|
161
|
try {
|
162
|
try {
|
162
|
Thread.sleep(200);
|
163
|
Thread.sleep(200);
|
|
@@ -167,11 +168,10 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
|
@@ -167,11 +168,10 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
167
|
|
168
|
|
168
|
|
169
|
|
169
|
|
170
|
|
170
|
- int public_count = publicUserPraiseRepository.countByTargetIdInAndPraiseTypeIsAndSrcChannelIs(publicArticleIds, UserPraiseConstant.ARTICLE_PRAISE , 1);
|
|
|
171
|
JSONObject result = new JSONObject();
|
171
|
JSONObject result = new JSONObject();
|
172
|
- result.put("checkPraiseResult", grass_praise_count == public_count? CHECK_SUCCESS : CHECK_FAIL);
|
172
|
+ result.put("checkPraiseResult", grass_praise_count == public_praise_count? CHECK_SUCCESS : CHECK_FAIL);
|
173
|
result.put("grass_praise_count", grass_praise_count );
|
173
|
result.put("grass_praise_count", grass_praise_count );
|
174
|
- result.put("public_praise_count", public_count );
|
174
|
+ result.put("public_praise_count", public_praise_count );
|
175
|
return result;
|
175
|
return result;
|
176
|
}
|
176
|
}
|
177
|
|
177
|
|
|
@@ -219,7 +219,7 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
|
@@ -219,7 +219,7 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
219
|
int pageSize = 100;
|
219
|
int pageSize = 100;
|
220
|
int totalPage = total % pageSize ==0 ? total / pageSize : (total / pageSize)+1;
|
220
|
int totalPage = total % pageSize ==0 ? total / pageSize : (total / pageSize)+1;
|
221
|
int grass_favorite_count = 0;
|
221
|
int grass_favorite_count = 0;
|
222
|
- List<Integer> publicArticleIds = Lists.newArrayList();
|
222
|
+ int public_favorite_count = 0;
|
223
|
|
223
|
|
224
|
for (int i = 0; i < totalPage; i++) {
|
224
|
for (int i = 0; i < totalPage; i++) {
|
225
|
Pageable pageReq = PageRequest.of(i, pageSize);
|
225
|
Pageable pageReq = PageRequest.of(i, pageSize);
|
|
@@ -236,16 +236,21 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
|
@@ -236,16 +236,21 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
236
|
List<PublicArticle> nowPublicArticleList = publicArticleRepository.findAllByRelateIdInAndArticleTypeIn(nowArticleIds, Lists.newArrayList(5));
|
236
|
List<PublicArticle> nowPublicArticleList = publicArticleRepository.findAllByRelateIdInAndArticleTypeIn(nowArticleIds, Lists.newArrayList(5));
|
237
|
publicArticleId.addAll(nowPublicArticleList.stream().map(BaseEntity::getId).collect(Collectors.toList()));
|
237
|
publicArticleId.addAll(nowPublicArticleList.stream().map(BaseEntity::getId).collect(Collectors.toList()));
|
238
|
}
|
238
|
}
|
239
|
- publicArticleIds.addAll(publicArticleId);
|
239
|
+ int public_count = publicUserFavoriteRepository.countByTargetIdInAndFavoriteTypeIsAndSrcChannelIs(publicArticleId, 1 , 1);
|
240
|
grass_favorite_count += grass_count;
|
240
|
grass_favorite_count += grass_count;
|
|
|
241
|
+ public_favorite_count += public_count;
|
|
|
242
|
+ try {
|
|
|
243
|
+ Thread.sleep(200);
|
|
|
244
|
+ } catch (InterruptedException e) {
|
|
|
245
|
+ e.printStackTrace();
|
|
|
246
|
+ }
|
241
|
}
|
247
|
}
|
242
|
|
248
|
|
243
|
|
249
|
|
244
|
- int public_count = publicUserFavoriteRepository.countByTargetIdInAndFavoriteTypeIsAndSrcChannelIs(publicArticleIds, 1 , 1);
|
|
|
245
|
JSONObject result = new JSONObject();
|
250
|
JSONObject result = new JSONObject();
|
246
|
- result.put("checkFavoriteResult", grass_favorite_count == public_count? CHECK_SUCCESS : CHECK_FAIL);
|
251
|
+ result.put("checkFavoriteResult", grass_favorite_count == public_favorite_count? CHECK_SUCCESS : CHECK_FAIL);
|
247
|
result.put("grass_favorite_count", grass_favorite_count );
|
252
|
result.put("grass_favorite_count", grass_favorite_count );
|
248
|
- result.put("public_favorite_count", public_count );
|
253
|
+ result.put("public_favorite_count", public_favorite_count );
|
249
|
return result;
|
254
|
return result;
|
250
|
}
|
255
|
}
|
251
|
|
256
|
|
|
@@ -324,7 +329,7 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
|
@@ -324,7 +329,7 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
324
|
int total = grassArticleRepository.countByCreateTimeAfterAndCreateTimeBeforeAndArticleTypeInAndAuthStatusIn(startTimeLong, endTimeLong,needSyncArticleType,needSyncArticleStatus);
|
329
|
int total = grassArticleRepository.countByCreateTimeAfterAndCreateTimeBeforeAndArticleTypeInAndAuthStatusIn(startTimeLong, endTimeLong,needSyncArticleType,needSyncArticleStatus);
|
325
|
int totalPage = total % pageSize ==0 ? total / pageSize : (total / pageSize)+1;
|
330
|
int totalPage = total % pageSize ==0 ? total / pageSize : (total / pageSize)+1;
|
326
|
int grass_comment_count = 0;
|
331
|
int grass_comment_count = 0;
|
327
|
- List<Integer> publicArticleIds = Lists.newArrayList();
|
332
|
+ int public_comment_count = 0;
|
328
|
|
333
|
|
329
|
for (int i = 0; i < totalPage; i++) {
|
334
|
for (int i = 0; i < totalPage; i++) {
|
330
|
Pageable pageReq = PageRequest.of(i, pageSize);
|
335
|
Pageable pageReq = PageRequest.of(i, pageSize);
|
|
@@ -343,16 +348,22 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
|
@@ -343,16 +348,22 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa |
343
|
List<PublicArticle> nowPublicArticleList = publicArticleRepository.findAllByRelateIdInAndArticleTypeIn(nowArticleIds, Lists.newArrayList(5));
|
348
|
List<PublicArticle> nowPublicArticleList = publicArticleRepository.findAllByRelateIdInAndArticleTypeIn(nowArticleIds, Lists.newArrayList(5));
|
344
|
publicArticleId.addAll(nowPublicArticleList.stream().map(BaseEntity::getId).collect(Collectors.toList()));
|
349
|
publicArticleId.addAll(nowPublicArticleList.stream().map(BaseEntity::getId).collect(Collectors.toList()));
|
345
|
}
|
350
|
}
|
346
|
- publicArticleIds.addAll(publicArticleId);
|
351
|
+ int public_count = publicUserCommentRepository.countByArticleIdInAndSrcChannelIs(publicArticleId, 1);
|
|
|
352
|
+
|
347
|
grass_comment_count += grass_count;
|
353
|
grass_comment_count += grass_count;
|
|
|
354
|
+ public_comment_count += public_count;
|
|
|
355
|
+ try {
|
|
|
356
|
+ Thread.sleep(200);
|
|
|
357
|
+ } catch (InterruptedException e) {
|
|
|
358
|
+ e.printStackTrace();
|
|
|
359
|
+ }
|
348
|
}
|
360
|
}
|
349
|
|
361
|
|
350
|
- int public_count = publicUserCommentRepository.countByArticleIdInAndSrcChannelIs(publicArticleIds, 1);
|
|
|
351
|
|
362
|
|
352
|
JSONObject result = new JSONObject();
|
363
|
JSONObject result = new JSONObject();
|
353
|
- result.put("checkCommentResult", grass_comment_count == public_count? CHECK_SUCCESS : CHECK_FAIL);
|
364
|
+ result.put("checkCommentResult", grass_comment_count == public_comment_count? CHECK_SUCCESS : CHECK_FAIL);
|
354
|
result.put("grass_comment_count", grass_comment_count);
|
365
|
result.put("grass_comment_count", grass_comment_count);
|
355
|
- result.put("public_comment_count", public_count );
|
366
|
+ result.put("public_comment_count", public_comment_count );
|
356
|
return result;
|
367
|
return result;
|
357
|
}
|
368
|
}
|
358
|
|
369
|
|