Skip to content

Commit 357ef79

Browse files
Dev (#28)
* build script update: add gradle -g option in build script * sdk add
1 parent 65994d2 commit 357ef79

142 files changed

Lines changed: 9823 additions & 7 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ChangeLog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# 更新历史
22

3+
### V1.7.0 (2021-02-05)
4+
- 增加SDK调用方式,去Spring等框架依赖,更好地支持第三方以jar形式引入;
5+
- SDK升级分库分表和分布式调度等基础库;
6+
- SDK提供导出启停的API接口;
7+
- SDK提供导出数据类型可选功能;
8+
- SDK支持多链多群组调用
9+
10+
311
### V1.6.0 (2020-12-08)
412
- 增加ES存储支持
513
- web3sdk替换为新版java sdk

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ WeBankBlockchain-Data-Export可以导出区块链上的基础数据,如当前
3939

4040
- 提供可视化的互动API控制台
4141

42+
- 提供SDK的集成方式
43+
4244
## 环境要求
4345

4446
在使用本组件前,请确认系统环境已安装相关依赖软件,清单如下:

WeBankBlockchain-Data-Export-db/src/main/java/com/webank/blockchain/data/export/db/dao/ESHandleDao.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
*/
4444
@Component
4545
@ConditionalOnProperty(name = "es.enabled", havingValue = "true")
46+
@SuppressWarnings("deprecation")
4647
public class ESHandleDao {
4748

4849
@Autowired
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
/bin/
4+
bin/*
5+
config/*
6+
/.gradle/
7+
8+
9+
10+
### STS ###
11+
.apt_generated
12+
.classpath
13+
.factorypath
14+
.project
15+
.settings
16+
.springBeans
17+
.sts4-cache
18+
19+
### IntelliJ IDEA ###
20+
.idea
21+
*.iws
22+
*.iml
23+
*.ipr
24+
25+
### NetBeans ###
26+
/nbproject/private/
27+
/build/
28+
/nbbuild/
29+
/dist/
30+
/nbdist/
31+
/.nb-gradle/
32+
33+
src/main/scripts
34+
src/main/resources
35+
36+
## contracts ##
37+
src/main/java/com/webank/bcosexport/generated
38+
src/main/java/com/webank/blockchain.data.export/generated
39+
src/main/java/org
40+
my.log*
41+
*.log
42+
43+
src/test/java/com/webank/webaseexport/contract/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
clean {
2+
println "delete ${projectDir}/dist"
3+
delete "${projectDir}/dist"
4+
}
5+
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/**
2+
* Copyright 2020 Webank.
3+
*
4+
* <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
5+
* except in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* <p>http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* <p>Unless required by applicable law or agreed to in writing, software distributed under the
10+
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11+
* express or implied. See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
package com.webank.blockchain.data.export.common.bo.contract;
15+
16+
import com.webank.blockchain.data.export.common.bo.data.ContractInfoBO;
17+
import lombok.Data;
18+
import lombok.experimental.Accessors;
19+
20+
import java.util.List;
21+
22+
/**
23+
* ContractMethodInfo
24+
*
25+
* @Description: ContractMethodInfo storages all contracts info for parsing method data.
26+
* @author graysonzhang
27+
* @data 2018-12-17 11:48:31
28+
*
29+
*/
30+
@Data
31+
@Accessors(chain = true)
32+
public class ContractDetail {
33+
34+
private ContractInfoBO contractInfoBO;
35+
36+
private List<MethodMetaInfo> methodMetaInfos;
37+
38+
private List<EventMetaInfo> eventMetaInfos;
39+
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* Copyright 2020 Webank.
3+
*
4+
* <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
5+
* except in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* <p>http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* <p>Unless required by applicable law or agreed to in writing, software distributed under the
10+
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11+
* express or implied. See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
package com.webank.blockchain.data.export.common.bo.contract;
15+
16+
import lombok.Data;
17+
import lombok.experimental.Accessors;
18+
19+
import java.util.Map;
20+
21+
/**
22+
* ContractMapsInfo
23+
*
24+
* @Description: ContractMapsInfo storages contract info, that will used to parse method data.
25+
* @author graysonzhang
26+
* @data 2018-12-17 14:55:20
27+
*
28+
*/
29+
@Data
30+
@Accessors(chain = true)
31+
public class ContractMapsInfo {
32+
33+
/** @Fields methodIdMap : use to storage methodId map , key:methodId, value:(contractName, methodName) */
34+
private Map<String, MethodMetaInfo> methodIdMap;
35+
36+
/** @Fields contractBinaryMap : use to storage contract binary map, key:contract binary, value:contract name */
37+
private Map<String, ContractDetail> contractBinaryMap;
38+
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Copyright 2020 Webank.
3+
*
4+
* <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
5+
* except in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* <p>http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* <p>Unless required by applicable law or agreed to in writing, software distributed under the
10+
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11+
* express or implied. See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
package com.webank.blockchain.data.export.common.bo.contract;
15+
16+
import lombok.Data;
17+
import lombok.NoArgsConstructor;
18+
import lombok.experimental.Accessors;
19+
20+
import java.util.List;
21+
22+
/**
23+
* EventMetaInfo
24+
*
25+
* @Description: EventMetaInfo storages event config data for parsing event data
26+
* @author maojiayu
27+
* @author graysonzhang
28+
* @data 2018-11-08 22:03:20
29+
*
30+
*/
31+
@Data
32+
@NoArgsConstructor
33+
@Accessors(chain = true)
34+
public class EventMetaInfo {
35+
36+
/** @Fields eventName : event name */
37+
private String eventName;
38+
39+
/** @Fields contractName : contract name */
40+
private String contractName;
41+
42+
/** @Fields list : event filed list */
43+
private List<FieldVO> list;
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Copyright 2020 Webank.
3+
*
4+
* <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
5+
* except in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* <p>http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* <p>Unless required by applicable law or agreed to in writing, software distributed under the
10+
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11+
* express or implied. See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
package com.webank.blockchain.data.export.common.bo.contract;
15+
16+
import lombok.Data;
17+
import lombok.experimental.Accessors;
18+
19+
/**
20+
* FieldVO stores one single field of a contract field.
21+
*
22+
* @author maojiayu
23+
* @data Dec 28, 2018 5:06:04 PM
24+
*
25+
*/
26+
@Data
27+
@Accessors(chain = true)
28+
public class FieldVO {
29+
private String sqlName;
30+
private String solidityName;
31+
private String javaName;
32+
private String sqlType;
33+
private String solidityType;
34+
private String javaType;
35+
private String javaCapName; // 首字母大写
36+
private String typeMethod; // 转化方法
37+
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* Copyright 2020 Webank.
3+
*
4+
* <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
5+
* except in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* <p>http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* <p>Unless required by applicable law or agreed to in writing, software distributed under the
10+
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11+
* express or implied. See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
package com.webank.blockchain.data.export.common.bo.contract;
15+
16+
import lombok.Data;
17+
import lombok.experimental.Accessors;
18+
import org.fisco.bcos.sdk.abi.wrapper.ABIDefinition.NamedType;
19+
20+
import java.util.List;
21+
22+
/**
23+
* MethodMetaInfo
24+
*
25+
* @Description: MethodMetaInfo storages method config data for parsing method data.
26+
* @author graysonzhang
27+
* @data 2018-12-17 14:20:00
28+
*
29+
*/
30+
@Data
31+
@Accessors(chain = true)
32+
public class MethodMetaInfo {
33+
34+
/** @Fields methodId : method id */
35+
private String methodId;
36+
37+
/** @Fields methodName : method name */
38+
private String methodName;
39+
40+
private String type;
41+
42+
/** @Fields contractName : contract name */
43+
private String contractName;
44+
45+
/** @Fields fieldsList : method input param list */
46+
private List<FieldVO> fieldsList;
47+
48+
private List<FieldVO> outputList;
49+
50+
}

0 commit comments

Comments
 (0)