Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
guowl3 committed Jun 27, 2024
1 parent 9d16f49 commit 568677d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
public interface ScheduleTaskRepository extends JpaRepository<ScheduleTaskEntity, Long>,
JpaSpecificationExecutor<ScheduleTaskEntity> {

Optional<ScheduleTaskEntity> findByIdAndJobName(Long id, Long scheduleId);
Optional<ScheduleTaskEntity> findByIdAndJobName(Long id, String scheduleId);

List<ScheduleTaskEntity> findByJobNameAndStatusIn(String jobName, List<TaskStatus> statuses);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ public ScheduleTaskEntity nullSafeGetById(Long id) {
}

public ScheduleTask nullSafeGetByIdAndScheduleId(Long id, Long scheduleId) {
Optional<ScheduleTaskEntity> scheduleEntityOptional = scheduleTaskRepository.findByIdAndJobName(id, scheduleId);
Optional<ScheduleTaskEntity> scheduleEntityOptional =
scheduleTaskRepository.findByIdAndJobName(id, scheduleId.toString());
return scheduleTaskMapper.entityToModel(scheduleEntityOptional
.orElseThrow(() -> new NotFoundException(ResourceType.ODC_SCHEDULE_TASK, "id", id)));
}
Expand Down

0 comments on commit 568677d

Please sign in to comment.