@@ -12,6 +12,7 @@ | |||||
<fileSet> | <fileSet> | ||||
<directory>src/main/resources/scripts</directory> | <directory>src/main/resources/scripts</directory> | ||||
<outputDirectory>bin</outputDirectory> | <outputDirectory>bin</outputDirectory> | ||||
<lineEnding>unix</lineEnding> | |||||
</fileSet> | </fileSet> | ||||
<fileSet> | <fileSet> | ||||
<directory>src/main/resources/config</directory> | <directory>src/main/resources/config</directory> | ||||
@@ -1768,7 +1768,7 @@ KVInfoVO对应格式如下: | |||||
KVInfoVO说明: | KVInfoVO说明: | ||||
+ 1)支持多个Key作为入参; | + 1)支持多个Key作为入参; | ||||
+ 2)每个Key支持多个version; | + 2)每个Key支持多个version; | ||||
@@ -1808,6 +1808,57 @@ http://localhost/ledgers/657TQAw6ssVoeKniWGwbovk7njvCTvikPambM9eBv6ezs/accounts/ | |||||
|type|value类型| | |type|value类型| | ||||
|value|值| | |value|值| | ||||
### 6.9 查询某数据账户键数量 | |||||
``` | |||||
GET /ledgers/{ledger}/accounts/address/{address}/keys/count/search?keyword={keyword} | |||||
``` | |||||
#### 参数 | |||||
请求类型 | 名称 | 是否必需 | 说明 | 数据类型 | |||||
--- | --- | --- | --- | --- | |||||
path | ledger | 是 | 所要搜索的账本,需要完整的账本哈希 | string | |||||
path | address | 是 | 所要搜索的数据账户地址,需要完整的数据账户地址 | string | |||||
query | keyword | 否 | 键的部分字符,空表示全部 | string | |||||
#### 请求实例 | |||||
``` | |||||
http://localhost/ledgers/657TQAw6ssVoeKniWGwbovk7njvCTvikPambM9eBv6ezs/accounts/address/5Sm4gWXrNpDWW9Boi4xZCzZMHboRvEDm29Fa/keys/count/search?keyword=j | |||||
``` | |||||
#### 返回实例 | |||||
``` | |||||
{ "data": 66, "success": true } | |||||
``` | |||||
说明 | |||||
名称 | 说明 | |||||
--- | --- | |||||
data | 条件查询键总数 | |||||
### 6.10 查询某数据账户键 | |||||
``` | |||||
GET /ledgers/{ledger}/accounts/address/{address}/keys/search?keyword={keyword}&fromIndex={start_index}&count={count} | |||||
``` | |||||
#### 参数 | |||||
请求类型 | 名称 | 是否必需 | 说明 | 数据类型 | |||||
--- | --- | --- | --- | --- | |||||
path | ledger | 是 | 所要搜索的账本,需要完整的账本哈希 | string | |||||
path | address | 是 | 所要搜索的数据账户地址,需要完整的数据账户地址 | string | |||||
query | keyword | 否 | 键的部分字符,空表示全部 | string | |||||
query | start_index | 否 | 查询数据账户对应Key的起始序号,默认为0 | 数字 | |||||
query | count | 否 | 查询返回数据账户对应Key的数量,默认最大返回值为100,小于0或大于100均返回最大可返回结果集 | 数字 | |||||
#### 请求实例 | |||||
``` | |||||
http://localhost/ledgers/657TQAw6ssVoeKniWGwbovk7njvCTvikPambM9eBv6ezs/accounts/address/5Sm4gWXrNpDWW9Boi4xZCzZMHboRvEDm29Fa/keys/search?keyword=j&fromIndex=0&count=-1 | |||||
``` | |||||
#### 返回实例 | |||||
``` | |||||
{ "data": [ { "key": "jd" }, { "key": "jdchain" }], "success": true } | |||||
``` | |||||
说明 | |||||
名称 | 说明 | |||||
--- | --- | |||||
key | 键 | |||||
## 7 搜索 | ## 7 搜索 | ||||
@@ -12,6 +12,7 @@ | |||||
<fileSet> | <fileSet> | ||||
<directory>src/main/resources/scripts</directory> | <directory>src/main/resources/scripts</directory> | ||||
<outputDirectory>bin</outputDirectory> | <outputDirectory>bin</outputDirectory> | ||||
<lineEnding>unix</lineEnding> | |||||
</fileSet> | </fileSet> | ||||
<fileSet> | <fileSet> | ||||
<directory>src/main/resources/config</directory> | <directory>src/main/resources/config</directory> | ||||
@@ -515,7 +515,63 @@ | |||||
<javadoc.opts>-Xdoclint:none</javadoc.opts> | <javadoc.opts>-Xdoclint:none</javadoc.opts> | ||||
</properties> | </properties> | ||||
</profile> | </profile> | ||||
<!-- mvn repository;--> | |||||
<profile> | |||||
<id>sonatype-oss-release</id> | |||||
<build> | |||||
<plugins> | |||||
<plugin> | |||||
<groupId>org.apache.maven.plugins</groupId> | |||||
<artifactId>maven-source-plugin</artifactId> | |||||
<version>2.1.2</version> | |||||
<executions> | |||||
<execution> | |||||
<id>attach-sources</id> | |||||
<goals> | |||||
<goal>jar-no-fork</goal> | |||||
</goals> | |||||
</execution> | |||||
</executions> | |||||
</plugin> | |||||
<plugin> | |||||
<groupId>org.apache.maven.plugins</groupId> | |||||
<artifactId>maven-javadoc-plugin</artifactId> | |||||
<version>2.7</version> | |||||
<executions> | |||||
<execution> | |||||
<id>attach-javadocs</id> | |||||
<goals> | |||||
<goal>jar</goal> | |||||
</goals> | |||||
</execution> | |||||
</executions> | |||||
</plugin> | |||||
<plugin> | |||||
<groupId>org.apache.maven.plugins</groupId> | |||||
<artifactId>maven-gpg-plugin</artifactId> | |||||
<version>1.1</version> | |||||
<executions> | |||||
<execution> | |||||
<id>sign-artifacts</id> | |||||
<phase>verify</phase> | |||||
<goals> | |||||
<goal>sign</goal> | |||||
</goals> | |||||
</execution> | |||||
</executions> | |||||
</plugin> | |||||
</plugins> | |||||
</build> | |||||
</profile> | |||||
</profiles> | </profiles> | ||||
<distributionManagement> | |||||
<repository> | |||||
<id>sonatype-nexus-staging</id> | |||||
<name>Nexus Release Repository</name> | |||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> | |||||
</repository> | |||||
</distributionManagement> | |||||
</project> | </project> |
@@ -53,6 +53,7 @@ public class LedgerInitializeWeb4Nodes { | |||||
System.setProperty("peer.log", path); | System.setProperty("peer.log", path); | ||||
System.setProperty("init.log", path); | System.setProperty("init.log", path); | ||||
System.setProperty("gateway.log", path); | System.setProperty("gateway.log", path); | ||||
System.setProperty("jdchain.log", path); | |||||
} catch (Exception e) { | } catch (Exception e) { | ||||
e.printStackTrace(); | e.printStackTrace(); | ||||
} | } | ||||