k线小时单位进行展示
This commit is contained in:
@@ -36,6 +36,12 @@ import okhttp3.Request;
|
|||||||
import okhttp3.Request.Builder;
|
import okhttp3.Request.Builder;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import cn.stock.market.infrastructure.db.po.QStockPO;
|
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.Jsoup;
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
import org.jsoup.nodes.Element;
|
import org.jsoup.nodes.Element;
|
||||||
|
|||||||
@@ -647,7 +647,7 @@ public class MoneyApiController {
|
|||||||
@ApiImplicitParam(name = "currencyCode", value = "INR 不变", required = true, dataType = "String", paramType = "query")
|
@ApiImplicitParam(name = "currencyCode", value = "INR 不变", required = true, dataType = "String", paramType = "query")
|
||||||
})
|
})
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@EncryptFilter(decryptRequest = false)
|
@EncryptFilter(decryptRequest = false)
|
||||||
public ResponseEntity<StockHistoryResponse> getStockHistory( @RequestParam String symbol,
|
public ResponseEntity<StockHistoryResponse> getStockHistory( @RequestParam String symbol,
|
||||||
@RequestParam String resolution
|
@RequestParam String resolution
|
||||||
) {
|
) {
|
||||||
@@ -659,9 +659,9 @@ public class MoneyApiController {
|
|||||||
int countback = 5;
|
int countback = 5;
|
||||||
if(StringUtils.equals("H",resolution)){
|
if(StringUtils.equals("H",resolution)){
|
||||||
to = (long) (System.currentTimeMillis() / 1000);
|
to = (long) (System.currentTimeMillis() / 1000);
|
||||||
from = to - (1 * 60 * 60 );
|
from = to - (1* 24 * 60 * 60 );
|
||||||
countback = 60;
|
countback = 16;
|
||||||
request.setResolution("1");
|
request.setResolution("60");
|
||||||
}else if(StringUtils.equals("D",resolution)){
|
}else if(StringUtils.equals("D",resolution)){
|
||||||
to = (long) (System.currentTimeMillis() / 1000);
|
to = (long) (System.currentTimeMillis() / 1000);
|
||||||
from = to - (24 * 60 * 60 );
|
from = to - (24 * 60 * 60 );
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
stock-market:
|
stock-market:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
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
|
username: root
|
||||||
password: 33BsUUcnXRYgwt
|
password: 33BsUUcnXRYgwtIND
|
||||||
maxActive: 500
|
maxActive: 500
|
||||||
testWhileIdle: true
|
testWhileIdle: true
|
||||||
validationQuery: SELECT 1
|
validationQuery: SELECT 1
|
||||||
|
|||||||
Reference in New Issue
Block a user