|  | @@ -22,10 +22,7 @@ import org.springframework.beans.factory.annotation.Value;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import java.io.StringReader;
 | 
	
		
			
				|  |  | -import java.util.Collections;
 | 
	
		
			
				|  |  | -import java.util.HashMap;
 | 
	
		
			
				|  |  | -import java.util.List;
 | 
	
		
			
				|  |  | -import java.util.Map;
 | 
	
		
			
				|  |  | +import java.util.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * @author dyp
 | 
	
	
		
			
				|  | @@ -119,7 +116,7 @@ public class UserManagementService {
 | 
	
		
			
				|  |  |          resetUserGroup(gzhId);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    private void resetUserGroup(String gzhId) {
 | 
	
		
			
				|  |  | +    public void resetUserGroup(String gzhId) {
 | 
	
		
			
				|  |  |          Long count = getGzhUserCount(gzhId);
 | 
	
		
			
				|  |  |          long pageSize = gzhUserGroupPerCount;
 | 
	
		
			
				|  |  |          int pageNum = 1;
 | 
	
	
		
			
				|  | @@ -218,7 +215,6 @@ public class UserManagementService {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      private void handleSubscribe(String gzhId, String openId) {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          ArticleUserGroup group = articleUserGroupMapperExt.selectByGzhIdAndOpenId(gzhId, openId);
 | 
	
		
			
				|  |  |          Long count = getGzhUserCount(gzhId);
 | 
	
		
			
				|  |  |          if (group == null) {
 | 
	
	
		
			
				|  | @@ -250,6 +246,7 @@ public class UserManagementService {
 | 
	
		
			
				|  |  |      private Integer getUserGroupId(List<UserGroupCountDTO> userGroupCountDTOList, long count) {
 | 
	
		
			
				|  |  |          if (count >= ((long) gzhUserGroupSize * gzhUserGroupPerCount)
 | 
	
		
			
				|  |  |                  || userGroupCountDTOList.size() > gzhUserGroupSize) {
 | 
	
		
			
				|  |  | +            userGroupCountDTOList.sort(Comparator.comparing(UserGroupCountDTO::getUserGroupId));
 | 
	
		
			
				|  |  |              UserGroupCountDTO max = userGroupCountDTOList.get(userGroupCountDTOList.size() - 1);
 | 
	
		
			
				|  |  |              if (max.getCount() < gzhUserGroupPerCount) {
 | 
	
		
			
				|  |  |                  return max.getUserGroupId();
 |