Skip to content

Commit

Permalink
Merge pull request #201 from WeBankFinTech/release/1.0.26
Browse files Browse the repository at this point in the history
Release/1.0.26
  • Loading branch information
yanggang-JV authored Apr 25, 2021
2 parents 548a233 + 1fb6f0b commit 78f2e43
Show file tree
Hide file tree
Showing 38 changed files with 400 additions and 202 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### V1.0.26 (2021-04-15)

* 优化功能:
1. 白名单支持链上分页查询与删除


### V1.0.25 (2021-04-09)

* 优化功能:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ WeIdentity JAVA SDK安装部署工具

| weid-build-tools 版本 | weid-java-sdk 版本 | weid-contract-java 版本 | 备注 |
| :---- | :---- | :---- | :---- |
| v1.0.26 | v1.8.1 | v1.2.30 | - |
| v1.0.25 | v1.8.0 | v1.2.29 | - |
| v1.0.24 | v1.8.0 | v1.2.29 | 1.0.23的重构(前端重构)版本 |
| v1.0.23 | v1.8.0 | v1.2.29 | - |
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.25
1.0.26
59 changes: 44 additions & 15 deletions check_info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ ca_crt="$classpathDir/ca.crt"
client_keystore="$classpathDir/client.keystore"
node_crt="$classpathDir/node.crt"
node_key="$classpathDir/node.key"

gmca_crt="$classpathDir/gmca.crt"
gmensdk_crt="$classpathDir/gmensdk.crt"
gmensdk_key="$classpathDir/gmensdk.key"
gmsdk_crt="$classpathDir/gmsdk.crt"
gmsdk_key="$classpathDir/gmsdk.key"
sdk_version=

# check the user configure
Expand All @@ -132,24 +138,15 @@ function check_user_config() {
else
echo "the weidentity.properties is exists."
fi
if [ ! -f "$ca_crt" ];
then
echo "ERROR: the ca.crt does not exists."
else
echo "the ca.crt is exists and the MD5 is `md5sum $ca_crt | cut -d " " -f1`"
fi

bcos_version=$(grep "bcos\.version" $fisco_properties |awk -F"=" '{print $2}')
if [[ $bcos_version == 1* ]];
encrypt_type=$(grep "encrypt\.type" $fisco_properties |awk -F"=" '{print $2}')
if [[ $encrypt_type == 0 ]];
then
if [ ! -f "$client_keystore" ];
if [ ! -f "$ca_crt" ];
then
echo "ERROR: the client.keystore does not exists."
echo "ERROR: the ca.crt does not exists."
else
echo "the client.keystore is exists and the MD5 is `md5sum $client_keystore | cut -d " " -f1`"
echo "the ca.crt is exists and the MD5 is `md5sum $ca_crt | cut -d " " -f1`"
fi
elif [[ $bcos_version == 2* ]];
then
if [ ! -f "$node_crt" ];
then
echo "ERROR: the node.crt does not exists."
Expand All @@ -162,8 +159,40 @@ function check_user_config() {
else
echo "the node.key is exists and the MD5 is `md5sum $node_key | cut -d " " -f1`"
fi
elif [[ $encrypt_type == 1 ]];
then
if [ ! -f "$gmca_crt" ];
then
echo "ERROR: the gmca.crt does not exists."
else
echo "the gmca.crt is exists and the MD5 is `md5sum $gmca_crt | cut -d " " -f1`"
fi
if [ ! -f "$gmensdk_crt" ];
then
echo "ERROR: the gmca.crt does not exists."
else
echo "the gmensdk.crt is exists and the MD5 is `md5sum $gmensdk_crt | cut -d " " -f1`"
fi
if [ ! -f "$gmensdk_key" ];
then
echo "ERROR: the gmca.crt does not exists."
else
echo "the gmensdk.key is exists and the MD5 is `md5sum $gmensdk_key | cut -d " " -f1`"
fi
if [ ! -f "$gmsdk_crt" ];
then
echo "ERROR: the gmca.crt does not exists."
else
echo "the gmsdk.crt is exists and the MD5 is `md5sum $gmsdk_crt | cut -d " " -f1`"
fi
if [ ! -f "$gmsdk_key" ];
then
echo "ERROR: the gmca.crt does not exists."
else
echo "the gmsdk.key is exists and the MD5 is `md5sum $gmsdk_key | cut -d " " -f1`"
fi
else
echo "ERROR: the bcos.version value is invalid."
echo "ERROR: the encrypt.type value is invalid."
fi

blockchain_orgid=$(grep "blockchain\.orgid=" $weidentity_properties |awk -F"=" '{print $2}')
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
weidSdkVersion=1.8.0
weidSdkVersion=1.8.1
repoType=cn
jdkTlsNamedGroups=secp256r1,secp256k1
signing.keyId=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public ResponseData<DeployInfo> getDeployInfo(@PathVariable("hash") String hash)
return new ResponseData<>(contractService.getDeployInfoByHashFromChain(hash), ErrorCode.SUCCESS);
}

@GetMapping("/removeHash/{hash}/{type}")
@PostMapping("/removeHash/{hash}/{type}")
public ResponseData<Boolean> removeHash(@PathVariable("hash") String hash, @PathVariable("type") Integer type){
log.info("start removeHash, hash:{}, type:{}", hash, type);
if (type != 1 && type != 2) {
Expand Down
42 changes: 33 additions & 9 deletions src/main/java/com/webank/weid/controller/WeIdSdkController.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
import com.webank.weid.dto.CptInfo;
import com.webank.weid.dto.DataPanel;
import com.webank.weid.dto.Issuer;
import com.webank.weid.dto.IssuerType;
import com.webank.weid.dto.PageDto;
import com.webank.weid.dto.PojoInfo;
import com.webank.weid.dto.PolicyInfo;
import com.webank.weid.dto.WeIdInfo;
import com.webank.weid.protocol.base.AuthorityIssuer;
import com.webank.weid.protocol.base.IssuerType;
import com.webank.weid.protocol.response.ResponseData;
import com.webank.weid.service.BaseService;
import com.webank.weid.service.ContractService;
Expand Down Expand Up @@ -81,13 +81,24 @@ public ResponseData<PageDto<WeIdInfo>> getWeIdList(

@Description("查询issuer type列表")
@GetMapping("/getIssuerTypeList")
public ResponseData<List<IssuerType>> getIssuerTypeList() {
log.info("begin getIssuerTypeList.");
return new ResponseData<>(weIdSdkService.getIssuerTypeList(), ErrorCode.SUCCESS);
public ResponseData<PageDto<IssuerType>> getIssuerTypeList(
@RequestParam(value = "iDisplayStart") int iDisplayStart,
@RequestParam(value = "iDisplayLength") int iDisplayLength
) {
log.info("begin get issuer type list, iDisplayStart:{}, iDisplayLength:{}", iDisplayStart, iDisplayLength);
PageDto<IssuerType> pageDto = new PageDto<IssuerType>(iDisplayStart, iDisplayLength);
return weIdSdkService.getIssuerTypeList(pageDto);
}

@Description("删除issuer type列表")
@PostMapping("/removeIssuerType")
public ResponseData<Boolean> removeIssuerType(@RequestParam("issuerType") String type) {
log.info("begin remove issuer type: {}", type);
return weIdSdkService.removeIssuerType(type);
}

@Description("系统自动生成公私钥生成weId")
@GetMapping("/createWeId")
@PostMapping("/createWeId")
public ResponseData<String> createWeId() {
log.info("[createWeId] begin create weid...");
return weIdSdkService.createWeId(DataFrom.WEB_BY_DEFAULT);
Expand Down Expand Up @@ -156,12 +167,25 @@ public ResponseData<Boolean> registerIssuerType(@RequestParam("issuerType") Stri
}

@Description("查询issuer成员列表")
@PostMapping("/getAllIssuerInType")
public ResponseData<List<AuthorityIssuer>> getAllIssuerInType(@RequestParam("issuerType") String type) {
log.info("begin getAllIssuerInType. issuerType:{}", type);
return new ResponseData<>(weIdSdkService.getAllSpecificTypeIssuerList(type), ErrorCode.SUCCESS);
@PostMapping("/getIssuerListInType")
public ResponseData<PageDto<AuthorityIssuer>> getIssuerListInType(
@RequestParam("issuerType") String type,
@RequestParam(value = "iDisplayStart") int iDisplayStart,
@RequestParam(value = "iDisplayLength") int iDisplayLength
) {
log.info("begin get issuer list in type, iDisplayStart:{}, iDisplayLength:{}", iDisplayStart, iDisplayLength);
PageDto<AuthorityIssuer> pageDto = new PageDto<AuthorityIssuer>(iDisplayStart, iDisplayLength);
return weIdSdkService.getSpecificTypeIssuerList(pageDto, type);
}

@Description("查询type中issuer成员总数")
@GetMapping("/getSpecificTypeIssuerSize")
public ResponseData<Integer> getSpecificTypeIssuerSize(
@RequestParam("issuerType") String type
) {
return weIdSdkService.getSpecificTypeIssuerSize(type);
}

@Description("向IssuerType中添加成员")
@PostMapping("/addIssuerIntoIssuerType")
public ResponseData<Boolean> addIssuerIntoIssuerType(
Expand Down
35 changes: 0 additions & 35 deletions src/main/java/com/webank/weid/dto/IssuerType.java

This file was deleted.

Loading

0 comments on commit 78f2e43

Please sign in to comment.