feat: 分页接口

Signed-off-by: skyyemperor <skyyemperor@qq.com>
This commit is contained in:
2022-09-30 10:37:21 +08:00
parent b984c8c497
commit 7367119d4a
4 changed files with 30 additions and 7 deletions

View File

@@ -172,6 +172,11 @@ public class JobService {
return Result.success(jobs.stream().map(JobLessDto::parseJob).collect(Collectors.toList()));
}
public Result getJobList(Integer type, Integer page, Integer size) {
List<Job> jobs = jobMapper.selectJobListByPage(type, (page - 1) * size, size);
return Result.success(jobs.stream().map(JobLessDto::parseJob).collect(Collectors.toList()));
}
/**
* 运行下一个job
*/
@@ -232,7 +237,6 @@ public class JobService {
String param1 = job.getJobId().toString();
String param2 = job.getRequestTime().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + job.getJobId();
String content = null;
switch (status) {
case WAIT: