...
|
...
|
@@ -718,6 +718,7 @@ public class GrassUserVirtualImpl implements IGrassVirtualService{ |
|
|
if(CollectionUtils.isEmpty(attUids) || StringUtils.isEmpty(threshold)){
|
|
|
return;
|
|
|
}
|
|
|
logger.info("dealAddFans: attUids is {}, threshold is {}", attUids, threshold);
|
|
|
//这些作者已有的粉丝信息
|
|
|
List<GrassUserAttention> fansList = grassUserAttentionDao.selectFansByUids(attUids);
|
|
|
Map<Integer,List<Integer>> commonUserFansMap = new HashMap<>();
|
...
|
...
|
@@ -774,9 +775,9 @@ public class GrassUserVirtualImpl implements IGrassVirtualService{ |
|
|
uidThresMin.put(uid, uidMin + min);
|
|
|
}
|
|
|
if(uidMax == null){
|
|
|
uidThresMax.put(uid, min);
|
|
|
uidThresMax.put(uid, max);
|
|
|
}else{
|
|
|
uidThresMax.put(uid, uidMax + min);
|
|
|
uidThresMax.put(uid, uidMax + max);
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -838,8 +839,8 @@ public class GrassUserVirtualImpl implements IGrassVirtualService{ |
|
|
|
|
|
logger.info("addVirtualFans insert grassUserAttention,newUserAttentions={}", newUserAttentions);
|
|
|
logger.info("addVirtualFans update grassUserAttention,updateUserAttentions={}", updateUserAttentions);
|
|
|
logger.info("addVirtualFans update userAchieve userAchieveFansList={}",userAchieveFansList);
|
|
|
logger.info("addVirtualFans update userAchieve userAchieveAttList={}",userAchieveAttList);
|
|
|
logger.info("addVirtualFans update userAchieve userAchieveFansList={}", userAchieveFansList);
|
|
|
logger.info("addVirtualFans update userAchieve userAchieveAttList={}", userAchieveAttList);
|
|
|
//1)新增关注明细表
|
|
|
if(CollectionUtils.isNotEmpty(newUserAttentions)){
|
|
|
grassUserAttentionDao.batchInsert(newUserAttentions);
|
...
|
...
|
@@ -855,8 +856,10 @@ public class GrassUserVirtualImpl implements IGrassVirtualService{ |
|
|
//3)批量更新作者表,增加作者对应的粉丝数
|
|
|
userAchieveDAO.batchUpdateFans(userAchieveFansList);
|
|
|
logger.info("addVirtualFans batchUpdateFans success!");
|
|
|
|
|
|
//4)批量更新作者表,增加粉丝对应的关注数
|
|
|
userAchieveDAO.batchInsertOrUpAttentions(userAchieveAttList);
|
|
|
|
|
|
//5)发送站内信
|
|
|
sendAddFansMessage(newUserAttentions);
|
|
|
logger.info("addVirtualFans success!");
|
...
|
...
|
|