|
@@ -221,20 +221,26 @@ public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
|
|
if (CollectionUtils.isEmpty(bucketDataParam.getVideos())) {
|
|
if (CollectionUtils.isEmpty(bucketDataParam.getVideos())) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
- int existNum = 0;
|
|
|
|
- for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
|
|
|
|
- int sort = i + 1;
|
|
|
|
- Long videoId = bucketDataParam.getVideos().get(i);
|
|
|
|
- CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
|
|
|
|
- cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key)
|
|
|
|
- .andGhIdEqualTo(bucketDataParam.getGhId()).andMiniVideoIdEqualTo(videoId).andSortEqualTo(sort);
|
|
|
|
- long count = cgiReplyBucketDataMapper.countByExample(cgiReplyBucketDataExample);
|
|
|
|
- if (count > 0) {
|
|
|
|
- existNum++;
|
|
|
|
|
|
+ CgiReplyBucketDataExample countExample = new CgiReplyBucketDataExample();
|
|
|
|
+ countExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key)
|
|
|
|
+ .andGhIdEqualTo(bucketDataParam.getGhId());
|
|
|
|
+ long allCount = cgiReplyBucketDataMapper.countByExample(countExample);
|
|
|
|
+ if (allCount == bucketDataParam.getVideos().size()) {
|
|
|
|
+ int existNum = 0;
|
|
|
|
+ for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
|
|
|
|
+ int sort = i + 1;
|
|
|
|
+ Long videoId = bucketDataParam.getVideos().get(i);
|
|
|
|
+ CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
|
|
|
|
+ cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key)
|
|
|
|
+ .andGhIdEqualTo(bucketDataParam.getGhId()).andMiniVideoIdEqualTo(videoId).andSortEqualTo(sort);
|
|
|
|
+ long count = cgiReplyBucketDataMapper.countByExample(cgiReplyBucketDataExample);
|
|
|
|
+ if (count > 0) {
|
|
|
|
+ existNum++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (existNum == bucketDataParam.getVideos().size()) {
|
|
|
|
+ continue;
|
|
}
|
|
}
|
|
- }
|
|
|
|
- if (existNum == bucketDataParam.getVideos().size()) {
|
|
|
|
- continue;
|
|
|
|
}
|
|
}
|
|
Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
|
|
Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
|
|
for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
|
|
for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
|