给浪潮提供企业和岗位的新增、修改、删除的接口
This commit is contained in:
@@ -498,5 +498,67 @@ public class CmsJobController extends BaseController
|
||||
return toAjax(jobService.jobUp(jobId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 招聘会-新增岗位
|
||||
* @param job
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("招聘会-新增岗位")
|
||||
@PostMapping("/zphJobAdd")
|
||||
public AjaxResult zphJobAdd(@RequestBody Job job)
|
||||
{
|
||||
if(job==null){
|
||||
return error("参数为空!");
|
||||
}
|
||||
// 校验描述中的敏感词
|
||||
List<String> sensitiveWords = sensitiveWordChecker.checkSensitiveWords(job.getDescription());
|
||||
if (!sensitiveWords.isEmpty()) {
|
||||
String errorMsg = "描述中包含敏感词:" + String.join("、", sensitiveWords);
|
||||
return AjaxResult.error(errorMsg);
|
||||
}
|
||||
job.setJobStatus("0");//上架
|
||||
if(StringUtils.isBlank(job.getDownTime())){
|
||||
job.setDownTime(DateUtils.getMonthThree(DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
}
|
||||
// 无敏感词,执行插入
|
||||
return toAjax(jobService.insertJob(job));
|
||||
}
|
||||
|
||||
/**
|
||||
* 招聘会-修改岗位
|
||||
*/
|
||||
@ApiOperation("招聘会-修改岗位")
|
||||
@PutMapping("/zphJobEdit")
|
||||
public AjaxResult zphJobEdit(@RequestBody Job job)
|
||||
{
|
||||
if(job==null){
|
||||
return error("参数为空!");
|
||||
}
|
||||
if(job.getJobId()==null){
|
||||
return error("jobId为空!");
|
||||
}
|
||||
// 校验描述中的敏感词
|
||||
List<String> sensitiveWords = sensitiveWordChecker.checkSensitiveWords(job.getDescription());
|
||||
if (!sensitiveWords.isEmpty()) {
|
||||
String errorMsg = "描述中包含敏感词:" + String.join("、", sensitiveWords);
|
||||
return AjaxResult.error(errorMsg);
|
||||
}
|
||||
if(StringUtils.isBlank(job.getDownTime())){
|
||||
job.setDownTime(DateUtils.getMonthThree(DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
}
|
||||
return toAjax(jobService.updateJob(job));
|
||||
}
|
||||
|
||||
/**
|
||||
* 招聘会-删除岗位
|
||||
*/
|
||||
@ApiOperation("招聘会-删除岗位")
|
||||
@DeleteMapping("/zphJob/{jobIds}")
|
||||
public AjaxResult zphJobRemove(@PathVariable Long[] jobIds)
|
||||
{
|
||||
if (jobIds == null || jobIds.length == 0) {
|
||||
return error("参数jobIds不能为空");
|
||||
}
|
||||
return toAjax(jobService.deleteJobByJobIds(jobIds));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,6 @@ public class CompanyController extends BaseController
|
||||
/**
|
||||
* 新增公司
|
||||
*/
|
||||
@Anonymous
|
||||
@ApiOperation("新增公司")
|
||||
// @PreAuthorize("@ss.hasPermi('app:company:add')")
|
||||
@Log(title = "公司", businessType = BusinessType.INSERT)
|
||||
@@ -105,7 +104,6 @@ public class CompanyController extends BaseController
|
||||
/**
|
||||
* 修改公司
|
||||
*/
|
||||
@Anonymous
|
||||
@ApiOperation("修改公司")
|
||||
// @PreAuthorize("@ss.hasPermi('app:company:edit')")
|
||||
@Log(title = "公司", businessType = BusinessType.UPDATE)
|
||||
@@ -124,7 +122,6 @@ public class CompanyController extends BaseController
|
||||
/**
|
||||
* 删除公司
|
||||
*/
|
||||
@Anonymous
|
||||
@ApiOperation("删除公司")
|
||||
// @PreAuthorize("@ss.hasPermi('app:company:remove')")
|
||||
@Log(title = "公司", businessType = BusinessType.DELETE)
|
||||
@@ -221,4 +218,49 @@ public class CompanyController extends BaseController
|
||||
}
|
||||
return toAjax(companyCollectionService.companySysCancel(companyId,userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增公司
|
||||
*/
|
||||
@Anonymous
|
||||
@ApiOperation("新增公司")
|
||||
@PostMapping("/zphCompanyAdd")
|
||||
public AjaxResult zphCompanyAdd(@RequestBody Company company)
|
||||
{
|
||||
if(company==null){
|
||||
return error("参数为空");
|
||||
}
|
||||
return toAjax(companyService.insertCompany(company));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改公司
|
||||
*/
|
||||
@Anonymous
|
||||
@ApiOperation("修改公司")
|
||||
@PutMapping("/zphCompanyEdit")
|
||||
public AjaxResult zphCompanyEdit(@RequestBody Company company)
|
||||
{
|
||||
if(company==null){
|
||||
return error("参数为空");
|
||||
}
|
||||
if(company.getCompanyId()==null){
|
||||
return error("企业id为空");
|
||||
}
|
||||
return toAjax(companyService.updateCompany(company));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除公司
|
||||
*/
|
||||
@Anonymous
|
||||
@ApiOperation("删除公司")
|
||||
@DeleteMapping("/zphCompany/{companyIds}")
|
||||
public AjaxResult zphCompanyRemove(@PathVariable Long[] companyIds)
|
||||
{
|
||||
if (companyIds == null || companyIds.length == 0) {
|
||||
return error("参数companyIds不能为空");
|
||||
}
|
||||
return toAjax(companyService.deleteCompanyByCompanyIds(companyIds));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user