From b2c5a5aad4a577df5e3ff9b82521c4a0b2a5eabd Mon Sep 17 00:00:00 2001 From: shizhendong Date: Wed, 23 Oct 2024 10:21:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=20job=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=8F=82=E6=95=B0=E6=A0=A1=E9=AA=8C=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../geedge/asw/module/runner/controller/JobController.java | 6 ++---- .../asw/module/runner/service/impl/JobServiceImpl.java | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/geedge/asw/module/runner/controller/JobController.java b/src/main/java/net/geedge/asw/module/runner/controller/JobController.java index f0f886d..a40ccd9 100644 --- a/src/main/java/net/geedge/asw/module/runner/controller/JobController.java +++ b/src/main/java/net/geedge/asw/module/runner/controller/JobController.java @@ -31,8 +31,6 @@ public class JobController { @GetMapping("/{workspaceId}/job") public R list(@PathVariable("workspaceId") String workspaceId, @RequestParam Map params) { - T.VerifyUtil.is(params).notNull() - .and(workspaceId).notEmpty(RCode.WORKSPACE_ID_CANNOT_EMPTY); params.put("workspaceId", workspaceId); Page page = jobService.queryList(params); return R.ok(page); @@ -44,9 +42,9 @@ public class JobController { T.VerifyUtil.is(entity).notNull() .and(entity.getEnvironmentId()).notEmpty(RCode.ENVIRONMENT_ID_CANNOT_EMPTY) .and(entity.getPackageId()).notEmpty(RCode.PACKAGE_ID_CANNOT_EMPTY) - .and(entity.getPlaybookId()).notEmpty(RCode.PLAYBOOK_ID_CANNOT_EMPTY) - .and(entity.getWorkspaceId()).notEmpty(RCode.WORKSPACE_ID_CANNOT_EMPTY); + .and(entity.getPlaybookId()).notEmpty(RCode.PLAYBOOK_ID_CANNOT_EMPTY); + entity.setWorkspaceId(workspaceId); entity.setEnvId(entity.getEnvironmentId()); JobEntity jobEntity = jobService.saveJob(entity); diff --git a/src/main/java/net/geedge/asw/module/runner/service/impl/JobServiceImpl.java b/src/main/java/net/geedge/asw/module/runner/service/impl/JobServiceImpl.java index c530fd5..7e4baf2 100644 --- a/src/main/java/net/geedge/asw/module/runner/service/impl/JobServiceImpl.java +++ b/src/main/java/net/geedge/asw/module/runner/service/impl/JobServiceImpl.java @@ -47,7 +47,7 @@ public class JobServiceImpl extends ServiceImpl implements IJ * @return */ private String getJobResultPath(String jobId) { - return T.FileUtil.file(T.WebPathUtil.getRootPath(), "result", jobId).getPath(); + return T.FileUtil.file(T.WebPathUtil.getRootPath(), "job_result", jobId).getPath(); } @Override