调度日志新增调度下拉接口

This commit is contained in:
zCans
2022-09-26 22:09:36 +08:00
parent a83f06339b
commit 2c7f5522db
2 changed files with 13 additions and 0 deletions
@@ -29,10 +29,13 @@ import fun.asgc.neutrino.core.web.annotation.*;
import fun.asgc.neutrino.proxy.server.base.rest.annotation.OnlyAdmin;
import fun.asgc.neutrino.proxy.server.controller.req.*;
import fun.asgc.neutrino.proxy.server.controller.res.*;
import fun.asgc.neutrino.proxy.server.dal.entity.JobInfoDO;
import fun.asgc.neutrino.proxy.server.service.JobInfoService;
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
/**
*
* @author: aoshiguchen
@@ -52,6 +55,11 @@ public class JobInfoController {
return jobInfoService.page(pageQuery, req);
}
@GetMapping("findList")
public List<JobInfoDO> findList() {
return jobInfoService.findList();
}
@OnlyAdmin
@PostMapping("update/enable-status")
public JobInfoUpdateEnableStatusRes updateEnableStatus(@RequestBody JobInfoUpdateEnableStatusReq req) {
@@ -63,6 +63,11 @@ public class JobInfoService implements IJobSource {
return page;
}
public List<JobInfoDO> findList() {
List<JobInfoDO> jobInfoDOList = jobInfoMapper.findList();
return jobInfoDOList;
}
public JobInfoUpdateEnableStatusRes updateEnableStatus(JobInfoUpdateEnableStatusReq req) {
JobInfoDO jobInfoDO = jobInfoMapper.findById(req.getId());
ParamCheckUtil.checkNotNull(jobInfoDO, ExceptionConstant.JOB_INFO_NOT_EXIST);