lzq 2025-12-18 13:42:22 +08:00
parent 5e0fea8b5c
commit 5c4ee89d05
3 changed files with 3 additions and 2 deletions

View File

@ -65,7 +65,7 @@ public class TaskController {
* *
*/ */
@GetMapping("/fn") @GetMapping("/fn")
public R<List<Map<Object, Object>>> fn(String keywords) { public R<List<Map<Object, Object>>> fn(@RequestParam(value = "keywords", required = false) String keywords) {
return R.success(TaskStore.searchFn(keywords)); return R.success(TaskStore.searchFn(keywords));
} }

View File

@ -109,6 +109,7 @@ public class DbTaskService extends ServiceImpl<TaskMapper, TaskEntity> implement
long criticalTiming = TaskUtil.computedNextTiming(scheduleType, taskInfo.getScheduleConf()); long criticalTiming = TaskUtil.computedNextTiming(scheduleType, taskInfo.getScheduleConf());
boolean disabled = scheduleType != ScheduleType.Manually && (criticalTiming <= 0 || taskInfo.isDisabled()); boolean disabled = scheduleType != ScheduleType.Manually && (criticalTiming <= 0 || taskInfo.isDisabled());
TaskEntity taskEntity = BeanUtil.copyProperties(taskInfo, TaskEntity.class) TaskEntity taskEntity = BeanUtil.copyProperties(taskInfo, TaskEntity.class)
.setId(null)
.setCriticalTiming(criticalTiming) .setCriticalTiming(criticalTiming)
.setDisabled(disabled); .setDisabled(disabled);
TaskLogLevel logLevel = taskInfo.getLogLevel(); TaskLogLevel logLevel = taskInfo.getLogLevel();

View File

@ -9,7 +9,7 @@ import lombok.extern.slf4j.Slf4j;
@org.springframework.stereotype.Component @org.springframework.stereotype.Component
public class Example { public class Example {
@Task(period = 6) @Task
public void a() { public void a() {
Thread thread = Thread.currentThread(); Thread thread = Thread.currentThread();
boolean virtual = thread.isVirtual(); boolean virtual = thread.isVirtual();