Skip to content

Commit

Permalink
Merge pull request #279 from WeBankFinTech/release/1.7.0
Browse files Browse the repository at this point in the history
Release/1.7.0
  • Loading branch information
yanggang-JV committed Nov 20, 2020
2 parents e9c35d1 + f71f9c0 commit 1e61bff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.7
1.7.0
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ dependencies {
localDeps 'org.projectlombok:lombok:1.18.10'
if (!gradle.startParameter.isOffline()) {
compile logger, lombok, apache_commons, json, mysql_driver, redisson, zxing, rpc, pdfbox, protobuf, caffeine, oval
compile("com.webank:weid-contract-java:1.2.27-rc.8-SNAPSHOT") {
compile("com.webank:weid-contract-java:1.2.27") {
exclude group: "org.slf4j", module: "slf4j-log4j12"
}
compile fileTree(dir: 'lib', include: '*.jar')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,12 @@ public ResponseData<List<WeIdPojo>> getWeIdList(
boolean direction
) throws Exception {
LinkedList<WeIdPojo> result = new LinkedList<WeIdPojo>();
if (pageSize == null || indexInBlock == null || blockNumber == null) {
return new ResponseData<>(result, ErrorCode.ILLEGAL_INPUT);
}
if (pageSize <= 0) {
return new ResponseData<>(result, ErrorCode.SUCCESS);
}
// 处理块高
Integer firstBlockNumer = this.getFirstBlockNum();
Integer latestBlockNumer = this.getLatestBlockNum();
Expand Down Expand Up @@ -726,7 +732,7 @@ public ResponseData<List<WeIdPojo>> getWeIdList(
} else {
// 没换块
// 如果index大于当前块最大位置 则index为当前最大位置
if (beginIndex > weIdListByBlockNumber.size()) {
if (beginIndex > weIdListByBlockNumber.size() - 1) {
beginIndex = weIdListByBlockNumber.size() - 1;
}
}
Expand Down Expand Up @@ -764,7 +770,7 @@ public ResponseData<List<WeIdPojo>> getWeIdList(
if (beginIndex < 0) {
beginIndex = 0;
}
if (beginIndex > weIdListByBlockNumber.size()) {
if (beginIndex > weIdListByBlockNumber.size() - 1) {
// 换块
queryBlockNumber = this.getNextBlockNum(queryBlockNumber);
changeBlock = true;
Expand Down

0 comments on commit 1e61bff

Please sign in to comment.