Browse Source

话题暂存

dev_shibei_match
yinzuomei 5 years ago
parent
commit
8d7d55debf
  1. 18
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginTopicMainDailyServiceImpl.java

18
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginTopicMainDailyServiceImpl.java

@ -32,6 +32,7 @@ import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity;
import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService;
import com.epmet.service.org.CustomerGridService;
import com.epmet.service.topic.TopicService;
import com.epmet.service.user.UserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.ListUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -60,7 +61,8 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl<FactOri
private CustomerGridService customerGridService;
@Autowired
private FactOriginTopicLogDailyDao factOriginTopicLogDailyDao;
@Autowired
private UserService userService;
/**
* @param customerId 客户id
* @param dateId yyyyMMdd
@ -140,6 +142,8 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl<FactOri
Map<String, Object> map=new HashMap<>();
List<FactOriginTopicMainDailyEntity> mainDailyEntityList=new ArrayList<>();
List<FactOriginTopicLogDailyEntity> logDailyEntityList=new ArrayList<>();
List<String> userIds = topicOriginInfoList.stream().map(topic -> topic.getOperateUserId()).distinct().collect(Collectors.toList());
Map<String,Integer> userIsPartyMap = userService.selectUserIsParty(userIds);
for(TopicOriginInfoDTO topicOriginInfoDTO:topicOriginInfoList){
GridInfoDTO gridInfoDTO=gridMap.get(topicOriginInfoDTO.getGridId());
if(null==gridInfoDTO){
@ -162,7 +166,11 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl<FactOri
mainDailyEntity.setPid(gridInfoDTO.getPid());
//TODO
//话题发布人是否是党员:1是党员0不是。 默认0
mainDailyEntity.setCreateTopicUserIsParty(false);
if (null != userIsPartyMap && null != userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId())) {
mainDailyEntity.setCreateTopicUserIsParty(userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId()) == NumConstant.ONE ? true : false);
} else {
mainDailyEntity.setCreateTopicUserIsParty(false);
}
mainDailyEntityList.add(mainDailyEntity);
}
@ -174,7 +182,11 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl<FactOri
logDailyEntity.setAgencyId(gridInfoDTO.getAgencyId());
logDailyEntity.setPid(gridInfoDTO.getPid());
//TODO
logDailyEntity.setOperateUserIsParty(false);
if (null != userIsPartyMap && null != userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId())) {
logDailyEntity.setOperateUserIsParty(userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId()) == NumConstant.ONE ? true : false);
} else {
logDailyEntity.setOperateUserIsParty(false);
}
logDailyEntityList.add(logDailyEntity);
}
map.put("main",mainDailyEntityList);

Loading…
Cancel
Save