publish
This commit is contained in:
@@ -192,5 +192,11 @@ public class AppJobController extends BaseController
|
|||||||
rspData.setTotal(total > 200 ? 200 : total);
|
rspData.setTotal(total > 200 ? 200 : total);
|
||||||
return rspData;
|
return rspData;
|
||||||
}
|
}
|
||||||
|
@BussinessLog(title = "移动端发布岗位")
|
||||||
|
@PostMapping("/publishJob")
|
||||||
|
public AjaxResult fix(@RequestBody Job job)
|
||||||
|
{
|
||||||
|
jobService.publishJob(job);
|
||||||
|
return success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -88,4 +88,5 @@ public interface IJobService
|
|||||||
|
|
||||||
List<ESJobDocument> littleVideoRandom(String uuid, Integer count,String jobTitle);
|
List<ESJobDocument> littleVideoRandom(String uuid, Integer count,String jobTitle);
|
||||||
|
|
||||||
|
void publishJob(Job job);
|
||||||
}
|
}
|
||||||
|
@@ -737,4 +737,15 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
|||||||
return jobs;
|
return jobs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void publishJob(Job job) {
|
||||||
|
job.setIsPublish(0);
|
||||||
|
Long userId = SecurityUtils.getUserId();
|
||||||
|
Company company = companyMapper.selectOne(Wrappers.<Company>lambdaQuery().eq(Company::getUserId, userId).eq(Company::getStatus, 1));
|
||||||
|
if(Objects.isNull(company)){
|
||||||
|
throw new ServiceException("请先完成招聘企业登记");
|
||||||
|
}
|
||||||
|
job.setCompanyId(company.getCompanyId());
|
||||||
|
jobMapper.insert(job);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user