{"action":"opened","issue":{"url":"https://api.github.com/repos/miemiedev/mybatis-paginator/issues/8","labels_url":"https://api.github.com/repos/miemiedev/mybatis-paginator/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/miemiedev/mybatis-paginator/issues/8/comments","events_url":"https://api.github.com/repos/miemiedev/mybatis-paginator/issues/8/events","html_url":"https://github.com/miemiedev/mybatis-paginator/issues/8","id":66066215,"number":8,"title":"Paginator.generateLinkPageNumbers计算中间页有问题","user":{"login":"oncereply","id":1457297,"avatar_url":"https://avatars.githubusercontent.com/u/1457297?v=3","gravatar_id":"","url":"https://api.github.com/users/oncereply","html_url":"https://github.com/oncereply","followers_url":"https://api.github.com/users/oncereply/followers","following_url":"https://api.github.com/users/oncereply/following{/other_user}","gists_url":"https://api.github.com/users/oncereply/gists{/gist_id}","starred_url":"https://api.github.com/users/oncereply/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oncereply/subscriptions","organizations_url":"https://api.github.com/users/oncereply/orgs","repos_url":"https://api.github.com/users/oncereply/repos","events_url":"https://api.github.com/users/oncereply/events{/privacy}","received_events_url":"https://api.github.com/users/oncereply/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-03T03:29:11Z","updated_at":"2015-04-03T03:29:11Z","closed_at":null,"body":"测试条件: \r\n* currentPageNumber=4\r\n* lastPageNumber=20\r\n* count=5\r\n得到的结果是:[1,2,3,4,5,6],实际应该是[2,3,4,5,6]\r\n\r\n经检查发现:\r\n```java\r\nif (endPageNumber - startPageNumber < count) {\r\n    startPageNumber = endPageNumber - count;\r\n    if (startPageNumber <= 0) {\r\n        startPageNumber = 1;\r\n    }\r\n}\r\n```\r\nif判断有问题.\r\nstartPageNumber,endPageNumber都是已经包含进了,所以相减的时候应该+1,这样才能保证中间页<count"}}