|
@@ -31,6 +31,10 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.temporal.ChronoUnit;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
+
|
|
|
/**
|
|
|
* @author frwcloud
|
|
|
* <p>
|
|
@@ -53,7 +57,7 @@ public class SysJobLogController {
|
|
|
*/
|
|
|
@GetMapping("/page")
|
|
|
@ApiOperation(value = "分页定时任务日志查询")
|
|
|
- public R getSysJobLogPage(Page page, SysJobLog sysJobLog) {
|
|
|
+ public R getSysJobLogPage(Page<SysJobLog> page, SysJobLog sysJobLog) {
|
|
|
|
|
|
|
|
|
sysJobLogService.page(page, Wrappers.<SysJobLog>lambdaQuery()
|
|
@@ -63,6 +67,14 @@ public class SysJobLogController {
|
|
|
.between(sysJobLog.getStartTime() != null && sysJobLog.getEndTime() != null, SysJobLog::getCreateTime, sysJobLog.getStartTime(), sysJobLog.getEndTime())
|
|
|
);
|
|
|
|
|
|
+ page.getRecords().forEach(r -> {
|
|
|
+ LocalDateTime createTime = r.getCreateTime();
|
|
|
+ String executeTime = r.getExecuteTime();
|
|
|
+ int execTime = StrUtil.isBlank(executeTime)? 0 : Integer.parseInt(executeTime);
|
|
|
+ LocalDateTime plus = createTime.plus(execTime, ChronoUnit.MILLIS);
|
|
|
+ r.setEndTime(plus);
|
|
|
+ });
|
|
|
+
|
|
|
return R.ok(page);
|
|
|
}
|
|
|
|