This commit is contained in:
2025-11-03 10:33:30 +08:00
parent 148583cdaa
commit e924e8c0e6
46 changed files with 1151 additions and 428 deletions

View File

@@ -25,25 +25,55 @@ import quant.rich.emoney.mybatis.typehandler.JsonStringTypeHandler;
@TableName(value = "plan", autoResultMap = true)
public class Plan {
/**
* 键 ID
*/
@TableId(type = IdType.AUTO)
private String planId;
private String cronExpression;
/**
* 计划任务表达式
*/
private String cronExpr;
/**
* 计划名称
*/
private String planName;
/**
* 指标代码
*/
private String indexCode;
/**
* 需要抓取的指标周期
*/
@TableField(typeHandler = CommaListTypeHandler.class)
private List<String> periods;
/**
* 参数
*/
@TableField(typeHandler = JsonStringTypeHandler.class)
private JsonNode params;
/**
* 是否启用
*/
private Boolean enabled;
/**
* 交易日检查,若为 true则任务执行时判断当日是否为交易日若是则不执行任务
* 反之无论是否为交易日都执行
*/
private Boolean openDayCheck;
/**
* 设置抓取周期并去重
* @param periods
* @return
*/
public Plan setPeriods(List<String> periods) {
if (CollectionUtils.isEmpty(periods)) {
this.periods = Collections.emptyList();
@@ -59,6 +89,10 @@ public class Plan {
return this;
}
/**
* 获取抓取周期。已去重
* @return
*/
public List<String> getPeriods() {
setPeriods(periods);
return periods;