添加岗位下架功
This commit is contained in:
@@ -230,6 +230,7 @@ public class AppJobController extends BaseController
|
||||
String errorMsg = "描述中包含敏感词:" + String.join("、", sensitiveWords);
|
||||
return AjaxResult.error(errorMsg);
|
||||
}
|
||||
job.setJobStatus("0");//上架
|
||||
jobService.publishJob(job);
|
||||
return success();
|
||||
}
|
||||
@@ -283,4 +284,22 @@ public class AppJobController extends BaseController
|
||||
List<Job> list=jobApplyService.selectCencalList(queryApply);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("岗位下架")
|
||||
@PutMapping("/jobDown/{jobId}")
|
||||
public AjaxResult jobDown(@ApiParam("岗位id") @PathVariable Long jobId){
|
||||
if(jobId==null){
|
||||
return error("岗位id为空");
|
||||
}
|
||||
return toAjax(jobService.jobDown(jobId));
|
||||
}
|
||||
|
||||
@ApiOperation("岗位上架")
|
||||
@PutMapping("/jobUp/{jobId}")
|
||||
public AjaxResult jobUp(@ApiParam("岗位id") @PathVariable Long jobId){
|
||||
if(jobId==null){
|
||||
return error("岗位id为空");
|
||||
}
|
||||
return toAjax(jobService.jobUp(jobId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ public class CmsJobController extends BaseController
|
||||
String errorMsg = "描述中包含敏感词:" + String.join("、", sensitiveWords);
|
||||
return AjaxResult.error(errorMsg);
|
||||
}
|
||||
job.setJobStatus("0");//上架
|
||||
// 无敏感词,执行插入
|
||||
return toAjax(jobService.insertJob(job));
|
||||
}
|
||||
@@ -442,4 +443,22 @@ public class CmsJobController extends BaseController
|
||||
ou.close();
|
||||
in.close();
|
||||
}
|
||||
|
||||
@ApiOperation("岗位下架")
|
||||
@PutMapping("/jobDown/{jobId}")
|
||||
public AjaxResult jobDown(@PathVariable("jobId") Long jobId){
|
||||
if(jobId==null){
|
||||
return error("岗位id为空");
|
||||
}
|
||||
return toAjax(jobService.jobDown(jobId));
|
||||
}
|
||||
|
||||
@ApiOperation("岗位上架")
|
||||
@PutMapping("/jobUp/{jobId}")
|
||||
public AjaxResult jobUp(@PathVariable("jobId") Long jobId){
|
||||
if(jobId==null){
|
||||
return error("岗位id为空");
|
||||
}
|
||||
return toAjax(jobService.jobUp(jobId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user