mm
This commit is contained in:
parent
03b175c8a1
commit
1fb6e66f5b
@ -149,7 +149,7 @@ public class GetFutDailyController {
|
||||
@GetMapping("/getDateNow")
|
||||
public Object getDateNow() {
|
||||
|
||||
LocalDate d = LocalDate.of(2024, 02, 20);
|
||||
LocalDate d = LocalDate.now();
|
||||
var from = select(ContractInfoMapper.selectList)
|
||||
.from(ContractInfoDynamicSqlSupport.contractInfo)
|
||||
.where(ContractInfoDynamicSqlSupport.contractInfo.delist_date, isGreaterThan(d))
|
||||
@ -161,9 +161,11 @@ public class GetFutDailyController {
|
||||
|
||||
|
||||
DeleteStatementProvider delete = deleteFrom(FutDailyDynamicSqlSupport.futDaily)
|
||||
.where(FutDailyDynamicSqlSupport.ts_code, isIn(select(ContractInfoDynamicSqlSupport.ts_code)
|
||||
.where(FutDailyDynamicSqlSupport.ts_code, isIn(
|
||||
select(ContractInfoDynamicSqlSupport.ts_code)
|
||||
.from(ContractInfoDynamicSqlSupport.contractInfo)
|
||||
.where(ContractInfoDynamicSqlSupport.contractInfo.delist_date, isGreaterThan(d))))
|
||||
.where(ContractInfoDynamicSqlSupport.contractInfo.delist_date, isGreaterThan(d)))
|
||||
)
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3);
|
||||
futDailyMapper.delete(delete);
|
||||
@ -330,29 +332,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));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user