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