Authored by 张帅

调整

... ... @@ -2,8 +2,6 @@ package com.yoho.datasync.fullsync.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.yoho.datasync.fullsync.constant.UserAttentionConstant;
import com.yoho.datasync.fullsync.constant.UserCommentConstant;
import com.yoho.datasync.fullsync.constant.UserPraiseConstant;
import com.yoho.datasync.fullsync.dal.repository.BaseEntity;
import com.yoho.datasync.fullsync.dal.repository.grass.*;
... ... @@ -11,18 +9,13 @@ import com.yoho.datasync.fullsync.dal.repository.grass.model.*;
import com.yoho.datasync.fullsync.dal.repository.pcms.*;
import com.yoho.datasync.fullsync.dal.repository.pcms.model.*;
import com.yoho.datasync.fullsync.service.IGrassInteractiveDataCheckService;
import com.yoho.datasync.fullsync.service.IGrassInteractiveDataSyncService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.stream.Collectors;
import static com.yoho.datasync.fullsync.service.impl.GrassInteractiveDataSyncServiceImpl.DATA_BEGIN_TIME;
... ... @@ -85,7 +78,6 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa
@Override
public JSONObject checkInteractiveData(Integer startTime, Integer endTime, Integer timeType, Integer syncType) {
// syncType : 1、同步点赞 2、 同步评论 3、 同步收藏 4、 同步关注 5、同步评论的点赞
JSONObject reulst;
switch (syncType){
case PRAISE:
return checkPraise(startTime, endTime, timeType);
... ... @@ -141,7 +133,7 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa
* @param endTime
*/
private JSONObject checkPraiseByArticle(Integer startTime, Integer endTime){
logger.info("syncPraiseByArticle begin, startTime is {}, endTime is {}", startTime, endTime);
logger.info("checkPraiseByArticle begin, startTime is {}, endTime is {}", startTime, endTime);
Long startTimeLong = (long)startTime * 1000;
Long endTimeLong = (long)endTime * 1000;
... ... @@ -205,7 +197,7 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa
* @param endTime
*/
private JSONObject checkFavoriteByArticle(Integer startTime, Integer endTime){
logger.info("syncFavoriteByArticle begin, startTime is {}, endTime is {}", startTime, endTime);
logger.info("checkFavoriteByArticle begin, startTime is {}, endTime is {}", startTime, endTime);
Long startTimeLong = (long)startTime * 1000;
Long endTimeLong = (long)endTime * 1000;
... ... @@ -300,7 +292,7 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa
* @param endTime
*/
private JSONObject checkCommentsByArticle(Integer startTime, Integer endTime){
logger.info("syncCommentsByArticle begin, startTime is {}, endTime is {}", startTime, endTime);
logger.info("checkCommentsByArticle begin, startTime is {}, endTime is {}", startTime, endTime);
Long startTimeLong = (long)startTime * 1000;
Long endTimeLong = (long)endTime * 1000;
List<GrassArticle> grassArticleList = grassArticleRepository.findAllByCreateTimeAfterAndCreateTimeBeforeAndArticleTypeInAndAuthStatusIn(
... ... @@ -329,7 +321,7 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa
private JSONObject checkCommentsBySelf(Integer startTime, Integer endTime){
logger.info("syncCommentsBySelf begin, startTime is {}, endTime is {}", startTime, endTime);
logger.info("checkCommentsBySelf begin, startTime is {}, endTime is {}", startTime, endTime);
Long startTimeLong = (long)startTime * 1000;
Long endTimeLong = (long)endTime * 1000;
... ... @@ -362,7 +354,7 @@ public class GrassInteractiveDataCheckServiceImpl implements IGrassInteractiveDa
* @param endTime
*/
private JSONObject checkCommentPraise(Integer startTime, Integer endTime){
logger.info("syncCommentPraise begin, startTime is {}, endTime is {}", startTime, endTime);
logger.info("checkCommentPraise begin, startTime is {}, endTime is {}", startTime, endTime);
Long startTimeLong = (long)startTime * 1000;
Long endTimeLong = (long)endTime * 1000;
... ...