From f4567f94b6a3775e928520b08f5029e7011ed0f1 Mon Sep 17 00:00:00 2001 From: rplees Date: Thu, 29 Feb 2024 09:57:19 +0000 Subject: [PATCH 1/4] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e6f4525..f8eba70 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,7 +46,7 @@ webhook: - ls - apt-get update - apt-get install -y curl - - curl --max-time 30 http://43.132.212.180:11113/api/webhook/justpull?project=india_market_java\&setenv_file=alpha.sh\&publish_env=alpha\&shell=deploy-test.sh + - curl --max-time 30 http://46.250.238.241:11113/api/webhook/justpull?project=india_market_java\&setenv_file=alpha.sh\&publish_env=alpha\&shell=deploy-test.sh - echo ">>>>>>Start Deploy Finish<<<<<<" From df22b2fd2283f2f2b39be054ab4bab69da57353b Mon Sep 17 00:00:00 2001 From: Achilles Date: Wed, 13 Mar 2024 09:25:14 +0800 Subject: [PATCH 2/4] =?UTF-8?q?k=E7=BA=BF=E5=B0=8F=E6=97=B6=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E8=BF=9B=E8=A1=8C=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stock/market/domain/basic/service/StockService.java | 6 ++++++ src/main/java/cn/stock/market/web/MoneyApiController.java | 8 ++++---- src/main/resources/application-base-alpha.yml | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/cn/stock/market/domain/basic/service/StockService.java b/src/main/java/cn/stock/market/domain/basic/service/StockService.java index 1f33ee9..ccd03f2 100644 --- a/src/main/java/cn/stock/market/domain/basic/service/StockService.java +++ b/src/main/java/cn/stock/market/domain/basic/service/StockService.java @@ -36,6 +36,12 @@ import okhttp3.Request; import okhttp3.Request.Builder; import org.apache.commons.lang3.StringUtils; import cn.stock.market.infrastructure.db.po.QStockPO; +import org.apache.http.HttpResponse; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.utils.HttpClientUtils; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.util.EntityUtils; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; diff --git a/src/main/java/cn/stock/market/web/MoneyApiController.java b/src/main/java/cn/stock/market/web/MoneyApiController.java index d0bc595..916e892 100644 --- a/src/main/java/cn/stock/market/web/MoneyApiController.java +++ b/src/main/java/cn/stock/market/web/MoneyApiController.java @@ -647,7 +647,7 @@ public class MoneyApiController { @ApiImplicitParam(name = "currencyCode", value = "INR 不变", required = true, dataType = "String", paramType = "query") }) @ResponseBody - @EncryptFilter(decryptRequest = false) + @EncryptFilter(decryptRequest = false) public ResponseEntity getStockHistory( @RequestParam String symbol, @RequestParam String resolution ) { @@ -659,9 +659,9 @@ public class MoneyApiController { int countback = 5; if(StringUtils.equals("H",resolution)){ to = (long) (System.currentTimeMillis() / 1000); - from = to - (1 * 60 * 60 ); - countback = 60; - request.setResolution("1"); + from = to - (1* 24 * 60 * 60 ); + countback = 16; + request.setResolution("60"); }else if(StringUtils.equals("D",resolution)){ to = (long) (System.currentTimeMillis() / 1000); from = to - (24 * 60 * 60 ); diff --git a/src/main/resources/application-base-alpha.yml b/src/main/resources/application-base-alpha.yml index eaf2c47..35365d4 100644 --- a/src/main/resources/application-base-alpha.yml +++ b/src/main/resources/application-base-alpha.yml @@ -17,9 +17,9 @@ spring: datasource: stock-market: driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://43.132.212.180:33306/india_stock?useUnicode=true&characterEncoding=utf-8 + url: jdbc:mysql://46.250.238.241:33306/india_stock?useUnicode=true&characterEncoding=utf-8 username: root - password: 33BsUUcnXRYgwt + password: 33BsUUcnXRYgwtIND maxActive: 500 testWhileIdle: true validationQuery: SELECT 1 From c1e0bbd77d3dff2572b662377b06901a12f8a82a Mon Sep 17 00:00:00 2001 From: zhangjian Date: Wed, 13 Mar 2024 13:52:24 +0800 Subject: [PATCH 3/4] update pom --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a25d07d..870d991 100644 --- a/pom.xml +++ b/pom.xml @@ -264,7 +264,7 @@ nexus - https://nexus.duofu88.com/repository/maven-public/ + https://nexus.main99.com/repository/maven-public/ true From 11d4062859e2914733ab8c7f66cc97005cd614d8 Mon Sep 17 00:00:00 2001 From: zhangjian Date: Wed, 13 Mar 2024 14:14:17 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96money?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E7=9A=84kline=E6=97=A5/=E5=91=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=94=E5=9B=9E=E6=9D=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cn/stock/market/web/MoneyApiController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/stock/market/web/MoneyApiController.java b/src/main/java/cn/stock/market/web/MoneyApiController.java index 916e892..0ad9990 100644 --- a/src/main/java/cn/stock/market/web/MoneyApiController.java +++ b/src/main/java/cn/stock/market/web/MoneyApiController.java @@ -665,12 +665,12 @@ public class MoneyApiController { }else if(StringUtils.equals("D",resolution)){ to = (long) (System.currentTimeMillis() / 1000); from = to - (24 * 60 * 60 ); - countback = 9; + countback = 30; request.setResolution("60"); }else if(StringUtils.equals("W",resolution)){ to = (long) (System.currentTimeMillis() / 1000); from = to - (10 * 24 * 60 * 60 ); - countback = 7; + countback = 30; request.setResolution("1D"); }else if(StringUtils.equals("M",resolution)){ to = (long) (System.currentTimeMillis() / 1000);