数据
This commit is contained in:
@@ -24,6 +24,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -111,8 +112,11 @@ public class RankAppController {
|
||||
Set<Long> userIds = rankNodeList.stream().map(RankNode::getUserId).collect(Collectors.toSet());
|
||||
List<User> userList = userService.listByIds(userIds);
|
||||
Map<Long, User> userMap = userList.stream().collect(Collectors.toMap(User::getId, Function.identity()));
|
||||
List<AnchorStatusDTO> anchorStatusList = anchorMapper.anchorStatus(userList);
|
||||
Map<Long, AnchorStatusDTO> anchorStatusMap = anchorStatusList.stream().collect(Collectors.toMap(AnchorStatusDTO::getUserId, Function.identity()));
|
||||
Map<Long, AnchorStatusDTO> anchorStatusMap = new HashMap<>();
|
||||
if(CollectionUtils.isNotEmpty(userIds)){
|
||||
List<AnchorStatusDTO> anchorStatusList = anchorMapper.anchorStatus(userList);
|
||||
anchorStatusMap = anchorStatusList.stream().collect(Collectors.toMap(AnchorStatusDTO::getUserId, Function.identity()));
|
||||
}
|
||||
long lastLove = 0;
|
||||
for (int i = 0; i < rankNodeList.size(); i++) {
|
||||
RankNode rankNode = rankNodeList.get(i);
|
||||
|
||||
Reference in New Issue
Block a user