| | |
| | | package com.yeshi.fanli.service.impl.user.vip;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | |
| | | @Resource
|
| | | private UserInviteValidRecordService userInviteValidRecordService;
|
| | |
|
| | |
|
| | | @Override
|
| | | public TeamUserLevelStatistic selectByUid(Long uid) {
|
| | | return teamUserLevelStatisticMapper.selectByPrimaryKey(uid);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<TeamUserLevelStatistic> listByUids(List<Long> uids) {
|
| | |
|
| | | List<TeamUserLevelStatistic> resultList = new ArrayList<>();
|
| | |
|
| | | List<TeamUserLevelStatistic> list = teamUserLevelStatisticMapper.listByUids(uids);
|
| | | // 放入Map中
|
| | | Map<Long, TeamUserLevelStatistic> map = new HashMap<>();
|
| | | if (list != null)
|
| | | for (TeamUserLevelStatistic s : list) {
|
| | | map.put(s.getId(), s);
|
| | | }
|
| | |
|
| | | for (Long uid : uids) {
|
| | | if (map.get(uid) == null) {
|
| | | initData(uid);
|
| | | TeamUserLevelStatistic statistic = selectByUid(uid);
|
| | | resultList.add(statistic);
|
| | | } else {
|
| | | resultList.add(map.get(uid));
|
| | | }
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | // 间接粉丝统计
|
| | | int daRenSecondCount = 0;
|