Browse Source

Merge remote-tracking branch 'origin/feature/admin1' into ump-local

tags/1.1.0
shaozhuguang 5 years ago
parent
commit
f12667f9ed
1 changed files with 25 additions and 0 deletions
  1. +25
    -0
      source/manager/ump-web/src/main/java/com/jd/blockchain/ump/controller/RetrievalController.java

+ 25
- 0
source/manager/ump-web/src/main/java/com/jd/blockchain/ump/controller/RetrievalController.java View File

@@ -267,4 +267,29 @@ public class RetrievalController {
return new ApiResult(ErrorCode.SERVER_ERROR,e.getMessage());
}
}

@RequestMapping(method = RequestMethod.GET, value = "/ledgers/ip/{gwIp}/port/{gwPort}")
public String getAllLedgers(@PathVariable(name = "gwIp") String gwIp,
@PathVariable(name = "gwPort") int gwPort) {
//generate the url;
String url = "http://"+gwIp+":"+gwPort+"/ledgers";
try {
return dataRetrievalService.retrieval(url);
} catch (Exception e) {
return "{'success':false,'data':'" + e.getMessage() + "'}";
}
}

@RequestMapping(method = RequestMethod.GET, value = "/ledger/{ledgerHash}/ip/{gwIp}/port/{gwPort}")
public String getAllDataAccounts(@PathVariable(name = "ledgerHash") String ledgerHash,
@PathVariable(name = "gwIp") String gwIp,
@PathVariable(name = "gwPort") int gwPort) {
//generate the url;
String url = "http://"+gwIp+":"+gwPort+"/ledgers/"+ledgerHash+"/accounts";
try {
return dataRetrievalService.retrieval(url);
} catch (Exception e) {
return "{'success':false,'data':'" + e.getMessage() + "'}";
}
}
}

Loading…
Cancel
Save