mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-10-13 21:30:22 +00:00
概览、任务管理研发 10%
This commit is contained in:
@@ -53,7 +53,7 @@ public class AssignmentJobDAO {
|
||||
assignmentJobMapper.updateById(assignmentJobEntity);
|
||||
}
|
||||
|
||||
public int getCountByStatus(JobStatusEnum status) {
|
||||
public int getCountByStatus(Integer status) {
|
||||
QueryWrapper<AssignmentJobEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(AssignmentJobEntity::getStatus, status);
|
||||
return assignmentJobMapper.selectCount(queryWrapper).intValue();
|
||||
|
@@ -60,6 +60,9 @@ public class OverviewStatisticsResponse {
|
||||
@ApiModelProperty("执行中的Job总数")
|
||||
private Integer runningCount;
|
||||
|
||||
@ApiModelProperty("取消的Job总数")
|
||||
private Integer cancelCount;
|
||||
|
||||
@ApiModelProperty("已经成功的总数")
|
||||
private Integer successfulCount;
|
||||
|
||||
|
@@ -51,11 +51,11 @@ public class OverviewService {
|
||||
AssignmentJobStatistics assignmentJobStatistics = new AssignmentJobStatistics();
|
||||
assignmentJobStatistics.setTotalCount(assignmentJobDAO.getTotalCount());
|
||||
assignmentJobStatistics
|
||||
.setRunningCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.RUNNING));
|
||||
.setRunningCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.RUNNING.getValue()));
|
||||
assignmentJobStatistics
|
||||
.setSuccessfulCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.PASS));
|
||||
assignmentJobStatistics.setFailedCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.FAIL));
|
||||
|
||||
.setSuccessfulCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.PASS.getValue()));
|
||||
assignmentJobStatistics.setFailedCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.FAIL.getValue()));
|
||||
assignmentJobStatistics.setCancelCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.CANCEL.getValue()));
|
||||
response.setAssignmentJobStatistics(assignmentJobStatistics);
|
||||
|
||||
return response;
|
||||
|
Reference in New Issue
Block a user