|  | @ -263,7 +263,9 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTota | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     @Override |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |     public List<GroupPointRankingResultDTO> listGroupPointRandingInPercificScope(SearchScopeTypeEnum searchScopeType, String searchScopeId, Integer pageNo, Integer pageSize) { |  |  |     public List<GroupPointRankingResultDTO> listGroupPointRandingInPercificScope(SearchScopeTypeEnum searchScopeType, String searchScopeId, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |                                                                                  Integer pageNo, Integer pageSize, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                                                                                  String currentUserId) { | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         // 1.查询有积分的小组得分排名
 |  |  |         // 1.查询有积分的小组得分排名
 | 
			
		
	
		
		
			
				
					|  |  |         PageInfo<BizPointTotalDetailEntity> entityPageInfo = PageHelper.startPage(pageNo, pageSize).doSelectPageInfo(() -> { |  |  |         PageInfo<BizPointTotalDetailEntity> entityPageInfo = PageHelper.startPage(pageNo, pageSize).doSelectPageInfo(() -> { | 
			
		
	
	
		
		
			
				
					|  | @ -283,7 +285,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTota | 
			
		
	
		
		
			
				
					|  |  |         List<String> groupIds = groupList.stream().map(g -> g.getObjectId()).collect(Collectors.toList()); |  |  |         List<String> groupIds = groupList.stream().map(g -> g.getObjectId()).collect(Collectors.toList()); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         // 2.将列表填充基本信息并且转换为dto
 |  |  |         // 2.将列表填充基本信息并且转换为dto
 | 
			
		
	
		
		
			
				
					
					|  |  |         List<GroupPointRankingResultDTO> rankingInfoDTOs = convertGroupRankingInfoEntity2DTOs(groupIds, groupList); |  |  |         List<GroupPointRankingResultDTO> rankingInfoDTOs = convertGroupRankingInfoEntity2DTOs(groupIds, groupList, currentUserId); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         Page page = new Page(pageNo, pageSize); |  |  |         Page page = new Page(pageNo, pageSize); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -304,7 +306,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTota | 
			
		
	
		
		
			
				
					|  |  |             // 不足0的从0开始
 |  |  |             // 不足0的从0开始
 | 
			
		
	
		
		
			
				
					|  |  |             startRow = Math.max(startRow, 0); |  |  |             startRow = Math.max(startRow, 0); | 
			
		
	
		
		
			
				
					|  |  |             List<GroupPointRankingResultDTO> gap; |  |  |             List<GroupPointRankingResultDTO> gap; | 
			
		
	
		
		
			
				
					
					|  |  |             gap = fillGroupPageGap(existingGroupIds, searchScopeType, searchScopeId, startRow, pageSize - groupList.size()); |  |  |             gap = fillGroupPageGap(existingGroupIds, searchScopeType, searchScopeId, startRow, pageSize - groupList.size(), currentUserId); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |             rankingInfoDTOs.addAll(gap); |  |  |             rankingInfoDTOs.addAll(gap); | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -336,7 +338,8 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTota | 
			
		
	
		
		
			
				
					|  |  |      * @author wxz |  |  |      * @author wxz | 
			
		
	
		
		
			
				
					|  |  |      * @date 2021.09.07 16:30:28 |  |  |      * @date 2021.09.07 16:30:28 | 
			
		
	
		
		
			
				
					|  |  |      */ |  |  |      */ | 
			
		
	
		
		
			
				
					
					|  |  |     private List<GroupPointRankingResultDTO> fillGroupPageGap(List<String> existingGroupIds, SearchScopeTypeEnum searchScopeType, String searchScopeObjectId, Integer startRow, Integer rowCount) { |  |  |     private List<GroupPointRankingResultDTO> fillGroupPageGap(List<String> existingGroupIds, SearchScopeTypeEnum searchScopeType, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |                                                               String searchScopeObjectId, Integer startRow, Integer rowCount, String currentUserId) { | 
			
		
	
		
		
			
				
					|  |  |         GroupFormDTO form = new GroupFormDTO(); |  |  |         GroupFormDTO form = new GroupFormDTO(); | 
			
		
	
		
		
			
				
					|  |  |         form.setExcludeGroupIds(existingGroupIds); |  |  |         form.setExcludeGroupIds(existingGroupIds); | 
			
		
	
		
		
			
				
					|  |  |         form.setOrder(GroupFormDTO.OrderTypeEnum.DESC); |  |  |         form.setOrder(GroupFormDTO.OrderTypeEnum.DESC); | 
			
		
	
	
		
		
			
				
					|  | @ -359,6 +362,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTota | 
			
		
	
		
		
			
				
					|  |  |             dto.setGroupName(g.getGroupName()); |  |  |             dto.setGroupName(g.getGroupName()); | 
			
		
	
		
		
			
				
					|  |  |             dto.setGroupId(g.getGroupId()); |  |  |             dto.setGroupId(g.getGroupId()); | 
			
		
	
		
		
			
				
					|  |  |             dto.setGridId(g.getGridId()); |  |  |             dto.setGridId(g.getGridId()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setGroupLeaderFlag(g.getLeaderId().equals(currentUserId) ? "leader" : "member"); | 
			
		
	
		
		
			
				
					|  |  |             return dto; |  |  |             return dto; | 
			
		
	
		
		
			
				
					|  |  |         }).collect(Collectors.toList()); |  |  |         }).collect(Collectors.toList()); | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
	
		
		
			
				
					|  | @ -371,7 +375,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTota | 
			
		
	
		
		
			
				
					|  |  |      * @author wxz |  |  |      * @author wxz | 
			
		
	
		
		
			
				
					|  |  |      * @date 2021.09.07 15:52:17 |  |  |      * @date 2021.09.07 15:52:17 | 
			
		
	
		
		
			
				
					|  |  |      */ |  |  |      */ | 
			
		
	
		
		
			
				
					
					|  |  |     private List<GroupPointRankingResultDTO> convertGroupRankingInfoEntity2DTOs(List<String> groupIds, List<BizPointTotalDetailEntity> groupList) { |  |  |     private List<GroupPointRankingResultDTO> convertGroupRankingInfoEntity2DTOs(List<String> groupIds, List<BizPointTotalDetailEntity> groupList, String currentUserId) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |         if (CollectionUtils.isEmpty(groupIds)) { |  |  |         if (CollectionUtils.isEmpty(groupIds)) { | 
			
		
	
		
		
			
				
					|  |  |             return new ArrayList<>(); |  |  |             return new ArrayList<>(); | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
	
		
		
			
				
					|  | @ -394,6 +398,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTota | 
			
		
	
		
		
			
				
					|  |  |             dto.setPoint(g.getTotalPoint().toString()); |  |  |             dto.setPoint(g.getTotalPoint().toString()); | 
			
		
	
		
		
			
				
					|  |  |             dto.setGroupHeadPhoto(groupInfo.getGroupHeadPhoto()); |  |  |             dto.setGroupHeadPhoto(groupInfo.getGroupHeadPhoto()); | 
			
		
	
		
		
			
				
					|  |  |             dto.setGridId(g.getGridId()); |  |  |             dto.setGridId(g.getGridId()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setGroupLeaderFlag(groupInfo.getLeaderId().equals(currentUserId) ? "leader" : "member"); | 
			
		
	
		
		
			
				
					|  |  |             return dto; |  |  |             return dto; | 
			
		
	
		
		
			
				
					|  |  |         }).collect(Collectors.toList()); |  |  |         }).collect(Collectors.toList()); | 
			
		
	
		
		
			
				
					|  |  |         return rankingDTOs; |  |  |         return rankingDTOs; | 
			
		
	
	
		
		
			
				
					|  | @ -483,6 +488,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTota | 
			
		
	
		
		
			
				
					|  |  |             dto.setPoint(point.toString()); |  |  |             dto.setPoint(point.toString()); | 
			
		
	
		
		
			
				
					|  |  |             dto.setGridRanking(gridRanking); |  |  |             dto.setGridRanking(gridRanking); | 
			
		
	
		
		
			
				
					|  |  |             dto.setCustomerRanking(customerRanking); |  |  |             dto.setCustomerRanking(customerRanking); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setGroupLeaderFlag(g.getGroupLeaderFlag()); | 
			
		
	
		
		
			
				
					|  |  |             return dto; |  |  |             return dto; | 
			
		
	
		
		
			
				
					|  |  |         }).collect(Collectors.toList()); |  |  |         }).collect(Collectors.toList()); | 
			
		
	
		
		
			
				
					|  |  |         return groupDtoList; |  |  |         return groupDtoList; | 
			
		
	
	
		
		
			
				
					|  | 
 |