xg
This commit is contained in:
parent
72fe79a7a4
commit
43e1cc6ec9
2
pom.xml
2
pom.xml
@ -345,7 +345,7 @@
|
|||||||
<username>sa</username>
|
<username>sa</username>
|
||||||
<password></password>
|
<password></password>
|
||||||
<driver>org.mariadb.jdbc.Driver</driver>
|
<driver>org.mariadb.jdbc.Driver</driver>
|
||||||
<url>jdbc:mariadb://173.249.203.214:3306/finance</url>
|
<url>jdbc:mariadb://119.45.61.64:3306/finance</url>
|
||||||
<username>root</username>
|
<username>root</username>
|
||||||
<password>open123</password>
|
<password>open123</password>
|
||||||
|
|
||||||
|
|||||||
@ -284,7 +284,7 @@ public class ContractInfoController {
|
|||||||
|
|
||||||
String symbol = StringUtils.substringBefore(contractInfo.getTs_code(), ".");
|
String symbol = StringUtils.substringBefore(contractInfo.getTs_code(), ".");
|
||||||
String url =
|
String url =
|
||||||
"http://173.249.203.214:8080/api/public/futures_zh_spot?"
|
"http://119.45.61.64:8080/api/public/futures_zh_spot?"
|
||||||
+ "symbol=" + symbol;
|
+ "symbol=" + symbol;
|
||||||
System.out.println(url);
|
System.out.println(url);
|
||||||
InputStream stean = Request.Get(url)
|
InputStream stean = Request.Get(url)
|
||||||
@ -341,7 +341,7 @@ public class ContractInfoController {
|
|||||||
// };
|
// };
|
||||||
//
|
//
|
||||||
// String url =
|
// String url =
|
||||||
// "http://173.249.203.214:8080/api/public/futures_zh_spot?"
|
// "http://119.45.61.64:8080/api/public/futures_zh_spot?"
|
||||||
// + "symbol=" + symbols;
|
// + "symbol=" + symbols;
|
||||||
// System.out.println(url);
|
// System.out.println(url);
|
||||||
// InputStream stean = Request.Get(url)
|
// InputStream stean = Request.Get(url)
|
||||||
|
|||||||
@ -44,7 +44,7 @@ public class ContractInfoMinute {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
String url =
|
String url =
|
||||||
"http://173.249.203.214:8080/api/public/futures_zh_minute_sina?"
|
"http://119.45.61.64:8080/api/public/futures_zh_minute_sina?"
|
||||||
+ "symbol=" + symbol
|
+ "symbol=" + symbol
|
||||||
+ "&period=" + parm.getPeriod();
|
+ "&period=" + parm.getPeriod();
|
||||||
System.out.println(url);
|
System.out.println(url);
|
||||||
|
|||||||
@ -328,29 +328,29 @@ public class GetFutDailyController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Operation(summary = "合约信息", description = "")
|
// @Operation(summary = "合约信息", description = "")
|
||||||
@GetMapping("/init")
|
// @GetMapping("/init")
|
||||||
public Object init() throws Exception {
|
// public Object init() throws Exception {
|
||||||
|
//
|
||||||
List<Exchange> exchanges = Arrays.asList(Exchange.values());
|
// List<Exchange> exchanges = Arrays.asList(Exchange.values());
|
||||||
|
//
|
||||||
exchanges.forEach(i->{
|
// exchanges.forEach(i->{
|
||||||
HashMap<Object,Object> h = new HashMap<Object,Object>();
|
// HashMap<Object,Object> h = new HashMap<Object,Object>();
|
||||||
h.put("api_name", "fut_basic");
|
// h.put("api_name", "fut_basic");
|
||||||
h.put("token", TushareConfig.TOKEN);
|
// h.put("token", TushareConfig.TOKEN);
|
||||||
HashMap<Object,Object> params = new HashMap<Object,Object>();
|
// HashMap<Object,Object> params = new HashMap<Object,Object>();
|
||||||
params.put("exchange", i);
|
// params.put("exchange", i);
|
||||||
h.put("params", params);
|
// h.put("params", params);
|
||||||
try {
|
// try {
|
||||||
this.getExchangeDate(i, h);
|
// this.getExchangeDate(i, h);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
});
|
// });
|
||||||
return R.SUCCESS("ok");
|
// return R.SUCCESS("ok");
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
public void getExchangeDate(Exchange exchange, HashMap<Object,Object> parm) throws Exception{
|
public void getExchangeDate(Exchange exchange, HashMap<Object,Object> parm) throws Exception{
|
||||||
logger.debug("tushare:" + objectMapper.writeValueAsString(parm));
|
logger.debug("tushare:" + objectMapper.writeValueAsString(parm));
|
||||||
|
|||||||
@ -13,7 +13,7 @@ spring:
|
|||||||
password:
|
password:
|
||||||
hikari:
|
hikari:
|
||||||
driver-class-name: org.h2.Driver
|
driver-class-name: org.h2.Driver
|
||||||
# url: jdbc:mariadb://173.249.203.214:3306/test
|
# url: jdbc:mariadb://119.45.61.64:3306/test
|
||||||
# username: root
|
# username: root
|
||||||
# password: open123
|
# password: open123
|
||||||
# hikari:
|
# hikari:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user