|
@@ -19,6 +19,7 @@ import com.citu.module.menduner.system.controller.app.recruit.job.vo.AppRecruitJ
|
|
|
import com.citu.module.menduner.system.controller.base.CommonRespVO;
|
|
|
import com.citu.module.menduner.system.controller.base.analysis.RecruitAnalysisPageReqVO;
|
|
|
import com.citu.module.menduner.system.controller.base.analysis.RecruitJobAnalysisRespVO;
|
|
|
+import com.citu.module.menduner.system.controller.base.fair.JobFairDetailPageReqVO;
|
|
|
import com.citu.module.menduner.system.controller.base.job.JobAdvertisedDetailRespVO;
|
|
|
import com.citu.module.menduner.system.controller.base.job.JobAdvertisedPageReqVO;
|
|
|
import com.citu.module.menduner.system.controller.base.job.JobAdvertisedReqVO;
|
|
@@ -27,6 +28,8 @@ import com.citu.module.menduner.system.controller.base.job.cv.JobCvRelDetailResp
|
|
|
import com.citu.module.menduner.system.dal.dataobject.area.AreaDO;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.enterprise.EnterpriseDO;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.enterprise.EnterpriseUserBindDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.fair.FairDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.fair.FairDetailDO;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.job.JobAdvertisedDO;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.job.JobCvRelDO;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.person.PersonJobFavoriteDO;
|
|
@@ -41,6 +44,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -95,6 +99,26 @@ public interface JobAdvertisedMapper extends BaseMapperX<JobAdvertisedDO> {
|
|
|
.orderByDesc(JobAdvertisedDO::getId));
|
|
|
}
|
|
|
|
|
|
+ default List<Long> getJobPostionIds(Long enterpriseId, Long userId, String status){
|
|
|
+ List<Long> res =new ArrayList<>();
|
|
|
+
|
|
|
+ List<JobAdvertisedDO> jobAdvertisedDOS = selectList(new LambdaQueryWrapperX<JobAdvertisedDO>()
|
|
|
+ .eqIfPresent(JobAdvertisedDO::getEnterpriseId, enterpriseId)
|
|
|
+ .eqIfPresent(JobAdvertisedDO::getUserId, userId)
|
|
|
+ .eqIfPresent(JobAdvertisedDO::getStatus, status)
|
|
|
+ .orderByDesc(JobAdvertisedDO::getId)
|
|
|
+ .select(JobAdvertisedDO::getPositionId, JobAdvertisedDO::getId)
|
|
|
+ );
|
|
|
+
|
|
|
+ for (JobAdvertisedDO jobAdvertisedDO : jobAdvertisedDOS) {
|
|
|
+ res.add(jobAdvertisedDO.getPositionId());
|
|
|
+ }
|
|
|
+
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
default List<JobAdvertisedDO> selectBySourceAndBizId(String source, Long bizId) {
|
|
|
return selectList(new LambdaQueryWrapperX<JobAdvertisedDO>()
|
|
|
.eq(JobAdvertisedDO::getSource, source)
|
|
@@ -286,8 +310,11 @@ public interface JobAdvertisedMapper extends BaseMapperX<JobAdvertisedDO> {
|
|
|
/**
|
|
|
* 根据查询条件、企业id、用户id 分页查询职位信息
|
|
|
**/
|
|
|
- default PageResult<JobAdvertisedDO> selectPage(AppRecruitJobPageReqVO reqVO, Long enterpriseId, Long userId) {
|
|
|
- LambdaQueryWrapper<JobAdvertisedDO> query = new LambdaQueryWrapperX<JobAdvertisedDO>()
|
|
|
+ default PageResult<AppRecruitJobRespVO> selectPage(AppRecruitJobPageReqVO reqVO, Long enterpriseId, Long userId) {
|
|
|
+
|
|
|
+
|
|
|
+ MPJLambdaWrapperX<JobAdvertisedDO> query = new MPJLambdaWrapperX<JobAdvertisedDO>()
|
|
|
+// .selectAssociation(JobAdvertisedDO::)
|
|
|
.eqIfPresent(JobAdvertisedDO::getAreaId, reqVO.getAreaId())
|
|
|
.likeIfPresent(JobAdvertisedDO::getName, reqVO.getName())
|
|
|
.eqIfPresent(JobAdvertisedDO::getPositionId, reqVO.getPositionId())
|
|
@@ -300,8 +327,27 @@ public interface JobAdvertisedMapper extends BaseMapperX<JobAdvertisedDO> {
|
|
|
.eqIfPresent(JobAdvertisedDO::getUserId, userId)
|
|
|
.betweenIfPresent(JobAdvertisedDO::getCreateTime, reqVO.getCreateTime());
|
|
|
|
|
|
+ query.selectAll(JobAdvertisedDO.class);
|
|
|
+ query.selectAs(FairDetailDO::getJobFairId, AppRecruitJobRespVO::getJobFairId);
|
|
|
query.notIn(CollUtil.isNotEmpty(reqVO.getFilterNotJobIds()),JobAdvertisedDO::getId, reqVO.getFilterNotJobIds());
|
|
|
+ query.leftJoin(FairDetailDO.class, FairDetailDO::getJobId, JobAdvertisedDO::getId);
|
|
|
+
|
|
|
+
|
|
|
+ if(Long.valueOf(0L).equals(reqVO.getJobFairId())){
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ query.isNull(FairDetailDO::getJobId);
|
|
|
+ }else{
|
|
|
+ query.selectAs(FairDO::getTitle, AppRecruitJobRespVO::getJobFairName);
|
|
|
+ query.apply(" ( t1.Job_fair_id is null or (t1.Job_fair_id is not null and t2.id is not null)) " );
|
|
|
+ query.leftJoin(FairDO.class, FairDO::getId,FairDetailDO::getJobFairId);
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
+ if(null!=reqVO.getJobFairId() && !Long.valueOf(0L).equals(reqVO.getJobFairId())){
|
|
|
+ query.eq(FairDetailDO::getJobFairId, reqVO.getJobFairId());
|
|
|
+ }
|
|
|
if (reqVO.isHasExpiredData()) {
|
|
|
// 获取过期的数据 当前时间小于过期时间
|
|
|
query.le(JobAdvertisedDO::getExpireTime, LocalDateTime.now());
|
|
@@ -309,7 +355,8 @@ public interface JobAdvertisedMapper extends BaseMapperX<JobAdvertisedDO> {
|
|
|
notExpireTime(query);
|
|
|
}
|
|
|
query.orderByDesc(JobAdvertisedDO::getTop, JobAdvertisedDO::getUpdateTime);
|
|
|
- return selectPage(reqVO, query);
|
|
|
+
|
|
|
+ return selectJoinPage(reqVO,AppRecruitJobRespVO.class,query);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -321,7 +368,7 @@ public interface JobAdvertisedMapper extends BaseMapperX<JobAdvertisedDO> {
|
|
|
**/
|
|
|
default List<AppRecruitJobRespVO> list(Long enterpriseId, Long userId, List<Long> ids, String status) {
|
|
|
|
|
|
- return list(enterpriseId,userId,ids,status,(short) 0);
|
|
|
+ return list(enterpriseId,userId,ids,status,(short) 0,null);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -332,7 +379,7 @@ public interface JobAdvertisedMapper extends BaseMapperX<JobAdvertisedDO> {
|
|
|
* @param userId 用户id
|
|
|
* @param ids id集合
|
|
|
**/
|
|
|
- default List<AppRecruitJobRespVO> list(Long enterpriseId, Long userId, List<Long> ids, String status,short exTime) {
|
|
|
+ default List<AppRecruitJobRespVO> list(Long enterpriseId, Long userId, List<Long> ids, String status,short exTime,String jobName) {
|
|
|
MPJLambdaWrapperX<JobAdvertisedDO> query = new MPJLambdaWrapperX<>();
|
|
|
query.selectAll(JobAdvertisedDO.class);
|
|
|
query.eq(JobAdvertisedDO::getEnterpriseId, enterpriseId);
|
|
@@ -340,6 +387,7 @@ public interface JobAdvertisedMapper extends BaseMapperX<JobAdvertisedDO> {
|
|
|
if(exTime==0) {
|
|
|
notExpireTime(query);
|
|
|
}
|
|
|
+ query.eqIfPresent(JobAdvertisedDO::getName, jobName);
|
|
|
query.eqIfPresent(JobAdvertisedDO::getStatus, status);
|
|
|
query.inIfPresent(JobAdvertisedDO::getId, ids);
|
|
|
query.orderByDesc(JobAdvertisedDO::getUpdateTime);
|
|
@@ -625,4 +673,6 @@ public interface JobAdvertisedMapper extends BaseMapperX<JobAdvertisedDO> {
|
|
|
|
|
|
return selectJoinList(CommonRespVO.class, wrapper);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|