fix: 调整 job 接口参数校验规则
This commit is contained in:
@@ -31,8 +31,6 @@ public class JobController {
|
||||
@GetMapping("/{workspaceId}/job")
|
||||
public R list(@PathVariable("workspaceId") String workspaceId,
|
||||
@RequestParam Map<String, Object> 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);
|
||||
|
||||
@@ -47,7 +47,7 @@ public class JobServiceImpl extends ServiceImpl<JobDao, JobEntity> 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
|
||||
|
||||
Reference in New Issue
Block a user