Merge branch 'develop' into 'main'

Develop

See merge request india/india_market_java!17
This commit is contained in:
rplees
2024-03-15 06:07:14 +00:00
5 changed files with 16 additions and 10 deletions

View File

@@ -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<<<<<<"

View File

@@ -264,7 +264,7 @@
<repositories>
<repository>
<id>nexus</id>
<url>https://nexus.duofu88.com/repository/maven-public/</url>
<url>https://nexus.main99.com/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>

View File

@@ -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;

View File

@@ -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<StockHistoryResponse> getStockHistory( @RequestParam String symbol,
@RequestParam String resolution
) {
@@ -659,18 +659,18 @@ 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 );
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);

View File

@@ -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