This commit is contained in:
mmm8955405 2024-03-15 01:08:33 +08:00
parent 72fe79a7a4
commit 43e1cc6ec9
5 changed files with 28 additions and 28 deletions

View File

@ -345,7 +345,7 @@
<username>sa</username>
<password></password>
<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>
<password>open123</password>

View File

@ -284,7 +284,7 @@ public class ContractInfoController {
String symbol = StringUtils.substringBefore(contractInfo.getTs_code(), ".");
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;
System.out.println(url);
InputStream stean = Request.Get(url)
@ -341,7 +341,7 @@ public class ContractInfoController {
// };
//
// 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;
// System.out.println(url);
// InputStream stean = Request.Get(url)

View File

@ -44,7 +44,7 @@ public class ContractInfoMinute {
}
try {
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
+ "&period=" + parm.getPeriod();
System.out.println(url);

View File

@ -328,29 +328,29 @@ public class GetFutDailyController {
@Operation(summary = "合约信息", description = "")
@GetMapping("/init")
public Object init() throws Exception {
List<Exchange> exchanges = Arrays.asList(Exchange.values());
exchanges.forEach(i->{
HashMap<Object,Object> h = new HashMap<Object,Object>();
h.put("api_name", "fut_basic");
h.put("token", TushareConfig.TOKEN);
HashMap<Object,Object> params = new HashMap<Object,Object>();
params.put("exchange", i);
h.put("params", params);
try {
this.getExchangeDate(i, h);
} catch (Exception e) {
e.printStackTrace();
}
});
return R.SUCCESS("ok");
}
// @Operation(summary = "合约信息", description = "")
// @GetMapping("/init")
// public Object init() throws Exception {
//
// List<Exchange> exchanges = Arrays.asList(Exchange.values());
//
// exchanges.forEach(i->{
// HashMap<Object,Object> h = new HashMap<Object,Object>();
// h.put("api_name", "fut_basic");
// h.put("token", TushareConfig.TOKEN);
// HashMap<Object,Object> params = new HashMap<Object,Object>();
// params.put("exchange", i);
// h.put("params", params);
// try {
// this.getExchangeDate(i, h);
// } catch (Exception e) {
// e.printStackTrace();
// }
//
// });
// return R.SUCCESS("ok");
//
// }
public void getExchangeDate(Exchange exchange, HashMap<Object,Object> parm) throws Exception{
logger.debug("tushare:" + objectMapper.writeValueAsString(parm));

View File

@ -13,7 +13,7 @@ spring:
password:
hikari:
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
# password: open123
# hikari: