提交 6248dba4 authored 作者: zjm's avatar zjm

fix(区块链): 修改了根据不同环境是否使用区块

修改了根据不同环境是否使用区块
上级 f6cf91ea
...@@ -16,16 +16,13 @@ ...@@ -16,16 +16,13 @@
// * 步骤: // * 步骤:
// * 1.构建请求参数 // * 1.构建请求参数
// * 2.通过rest_template获取数据 // * 2.通过rest_template获取数据
// * // * 测试
// * @author LJJ cnljj1995@gmail.com // * @author LJJ cnljj1995@gmail.com
// * on 2020-08-13 // * on 2020-08-13
// */ // */
//@Slf4j //@Slf4j
//@Component //@Component
//public class BlockChainUtilImplLocal implements BlockChainUtil { //public class BlockChainUtilImpl1 implements BlockChainUtil {
//
//
//
// //
// //
// private String SECRET_KEY = "3mdeM1dw2FfHrd5h6WAuhB3WYdDG6ZAgz96CcM1nzxbiYA8QaaZHW75Je9xKixTTD2rwujyb1gVUNPYm5W6FPZQ8"; // private String SECRET_KEY = "3mdeM1dw2FfHrd5h6WAuhB3WYdDG6ZAgz96CcM1nzxbiYA8QaaZHW75Je9xKixTTD2rwujyb1gVUNPYm5W6FPZQ8";
...@@ -118,6 +115,7 @@ ...@@ -118,6 +115,7 @@
// request, // request,
// BcText.class // BcText.class
// ); // );
//// return new BcText().toData();
// } // }
// //
// @Override // @Override
...@@ -126,6 +124,7 @@ ...@@ -126,6 +124,7 @@
// request.put("content", content); // request.put("content", content);
// request.put("subCode", subCode); // request.put("subCode", subCode);
// request.put("apiSignature", ApiSignatureUtil.getApiSignature(request, SECRET_KEY)); // request.put("apiSignature", ApiSignatureUtil.getApiSignature(request, SECRET_KEY));
//
// return new RestTemplate().postForObject( // return new RestTemplate().postForObject(
// BLOCK_CHAIN_URL + BcUrl.SEND_TEXT, // BLOCK_CHAIN_URL + BcUrl.SEND_TEXT,
// request, // request,
...@@ -133,10 +132,6 @@ ...@@ -133,10 +132,6 @@
// ); // );
// } // }
// //
//// public static void main(String[] args) {
//// new BlockChainUtilImpl().sendHash(1,"阿斯顿好看");
//// }
//
// //
// @Override // @Override
// public BcHash sendHash(Integer index,Integer subCode, String content) { // public BcHash sendHash(Integer index,Integer subCode, String content) {
...@@ -202,10 +197,6 @@ ...@@ -202,10 +197,6 @@
// request, // request,
// BcHash.class // BcHash.class
// ); // );
//// }
//// else {
//// return new BcHash(0, "", new BcHashData("000"));
//// }
// } // }
// //
// @Override // @Override
...@@ -226,6 +217,7 @@ ...@@ -226,6 +217,7 @@
// SortedMap<Object, Object> request = getRequest(); // SortedMap<Object, Object> request = getRequest();
// map.forEach(request::put); // map.forEach(request::put);
// request.put("apiSignature", ApiSignatureUtil.getApiSignature(request, SECRET_KEY)); // request.put("apiSignature", ApiSignatureUtil.getApiSignature(request, SECRET_KEY));
//
// return new RestTemplate().postForObject( // return new RestTemplate().postForObject(
// BLOCK_CHAIN_URL + BcUrl.FETCH_HISTORY, // BLOCK_CHAIN_URL + BcUrl.FETCH_HISTORY,
// request, // request,
...@@ -275,6 +267,7 @@ ...@@ -275,6 +267,7 @@
// BLOCK_CHAIN_URL + BcUrl.APPEND_TEXT, // BLOCK_CHAIN_URL + BcUrl.APPEND_TEXT,
// request, // request,
// BcText.class); // BcText.class);
//// return new BcText().toData();
// } // }
// //
// @Override // @Override
...@@ -285,7 +278,7 @@ ...@@ -285,7 +278,7 @@
// String s = ApiSignatureUtil.getApiSignature(request, SECRET_KEY); // String s = ApiSignatureUtil.getApiSignature(request, SECRET_KEY);
// request.put("apiSignature", s); // request.put("apiSignature", s);
// //
// return new RestTemplate().postForObject( // return new RestTemplate().postForObject(
// BLOCK_CHAIN_URL + BcUrl.APPEND_TEXT, // BLOCK_CHAIN_URL + BcUrl.APPEND_TEXT,
// request, // request,
// BcText.class); // BcText.class);
...@@ -338,6 +331,7 @@ ...@@ -338,6 +331,7 @@
// request, // request,
// BcHash.class // BcHash.class
// ); // );
//// return new BcHash().toDate();
// //
// } // }
// //
...@@ -354,6 +348,7 @@ ...@@ -354,6 +348,7 @@
// request, // request,
// BcHash.class // BcHash.class
// ); // );
//// return new BcHash().toDate();
// } // }
// //
// @Override // @Override
......
...@@ -8,3 +8,4 @@ spring.jpa.hibernate.ddl-auto=update ...@@ -8,3 +8,4 @@ spring.jpa.hibernate.ddl-auto=update
# spring boot admin # spring boot admin
spring.boot.admin.client.url=http://localhost:8769 spring.boot.admin.client.url=http://localhost:8769
spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8087w spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8087w
block.flag=true
...@@ -6,4 +6,5 @@ file.path=C:/Users/dengdiyi/Documents/file/ ...@@ -6,4 +6,5 @@ file.path=C:/Users/dengdiyi/Documents/file/
logging.file=./log/equip.log logging.file=./log/equip.log
preview.path=http://124.70.145.101:8087/equip/file/ preview.path=http://124.70.145.101:8087/equip/file/
# spring boot admin # spring boot admin
spring.boot.admin.client.url=http://localhost:8769 spring.boot.admin.client.url=http://localhost:8769
\ No newline at end of file block.flag=true
\ No newline at end of file
...@@ -6,4 +6,5 @@ spring.datasource.password=szoscar55 ...@@ -6,4 +6,5 @@ spring.datasource.password=szoscar55
spring.jpa.database-platform=org.hibernate.dialect.OscarDialect spring.jpa.database-platform=org.hibernate.dialect.OscarDialect
#file.path=/opt/zb/ #file.path=/opt/zb/
#preview.path=http://10.153.4.11:8088/equip/file/ #preview.path=http://10.153.4.11:8088/equip/file/
#preview.path=http://192.168.0.80:8088/equip/file/ #preview.path=http://192.168.0.80:8088/equip/file/
\ No newline at end of file block.flag=true
\ No newline at end of file
...@@ -6,4 +6,5 @@ spring.datasource.password=szoscar55 ...@@ -6,4 +6,5 @@ spring.datasource.password=szoscar55
spring.jpa.database-platform=org.hibernate.dialect.OscarDialect spring.jpa.database-platform=org.hibernate.dialect.OscarDialect
file.path=/opt/zb/ file.path=/opt/zb/
preview.path=http://10.153.4.11:8088/equip/file/ preview.path=http://10.153.4.11:8088/equip/file/
#preview.path=http://192.168.0.80:8088/equip/file/ #preview.path=http://192.168.0.80:8088/equip/file/
\ No newline at end of file block.flag=true
\ No newline at end of file
...@@ -7,3 +7,4 @@ spring.jpa.database-platform=org.hibernate.dialect.OscarDialect ...@@ -7,3 +7,4 @@ spring.jpa.database-platform=org.hibernate.dialect.OscarDialect
file.path=/opt/zb/ file.path=/opt/zb/
preview.path=http://10.153.4.11:8088/equipTest/file/ preview.path=http://10.153.4.11:8088/equipTest/file/
spring.jmx.enabled=false spring.jmx.enabled=false
block.flag=false
...@@ -8,4 +8,5 @@ file.path=/opt/zb/ ...@@ -8,4 +8,5 @@ file.path=/opt/zb/
#preview.path=http://10.153.4.11:8088/equip/file/ #preview.path=http://10.153.4.11:8088/equip/file/
preview.path=http://192.168.0.80:8088/equip/file/ preview.path=http://192.168.0.80:8088/equip/file/
spring.boot.admin.client.url=http://localhost:8769 spring.boot.admin.client.url=http://localhost:8769
spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8087 spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8087
\ No newline at end of file block.flag=true
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论