首页 > 代码库 > 分页发送
分页发送
Integer synchronizeNum = Integer.parseInt( Global.getConfig( "SYNCHRONIZE_NUM" ) );
HashMap<String, Object> map = new HashMap<String, Object>();
map.put( "lastTime", lastTime );
int total = linkManService.findAllCount( map );
logger.debug( "联系人总数============" + total );
PageObject pageObj = new PageObject();
pageObj.setTotalCount( total );
pageObj.setPageSize( synchronizeNum );
int pageNum = pageObj.getTotalCount();
List<LinkmanVO> list = null;
String token = AccessTokenUtil.getAccessToken();
for (int i = 1; i <= pageNum; i++) {
pageObj.setPage( i );
map.put( "startIndex", pageObj.getStartIndex() );
map.put( "endIndex", pageObj.getEndIndex() );
list = linkManService.findList( map );
processMobile( list );
processEmail( list );
accessLinkMan( token, JSON.toJSONString( list ) );
}
分页发送