|
@@ -1,15 +1,21 @@
|
|
|
package com.citu.module.menduner.system.dal.mysql.person;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
import com.citu.framework.common.pojo.PageResult;
|
|
|
import com.citu.framework.mybatis.core.mapper.BaseMapperX;
|
|
|
import com.citu.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
|
import com.citu.framework.mybatis.core.query.MPJLambdaWrapperX;
|
|
|
import com.citu.module.menduner.system.controller.base.person.PersonMapQueryReqVO;
|
|
|
+import com.citu.module.menduner.system.controller.base.person.PersonQueryReqVO;
|
|
|
import com.citu.module.menduner.system.controller.base.person.info.PersonInfoPageReqVO;
|
|
|
import com.citu.module.menduner.system.controller.base.person.info.PersonInfoRespVO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.eduexp.EduExpDO;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.enterprise.EnterpriseTalentPoolDO;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.job.JobInterestedDO;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.person.PersonInfoDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.projectexp.ProjectExpDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.trainexp.TrainExpDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.workexp.WorkExpDO;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
|
|
import java.time.LocalDate;
|
|
@@ -128,4 +134,80 @@ public interface PersonInfoMapper extends BaseMapperX<PersonInfoDO> {
|
|
|
return selectJoinPage(reqVO, PersonInfoRespVO.class, query);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据查询条件查询人才信息
|
|
|
+ **/
|
|
|
+ default PageResult<PersonInfoRespVO> queryPage(PersonQueryReqVO reqVO) {
|
|
|
+ MPJLambdaWrapperX<PersonInfoDO> query = new MPJLambdaWrapperX<>();
|
|
|
+ query.distinct();
|
|
|
+ query.selectAsClass(PersonInfoDO.class, PersonInfoRespVO.class);
|
|
|
+
|
|
|
+ // 并且条件
|
|
|
+ query.inIfPresent(PersonInfoDO::getAreaId, reqVO.getAreaIds());
|
|
|
+ query.eqIfPresent(PersonInfoDO::getEduType, reqVO.getEduType());
|
|
|
+ query.eqIfPresent(PersonInfoDO::getExpType, reqVO.getExpType());
|
|
|
+
|
|
|
+ // 或者条件
|
|
|
+ query.likeIfPresent(PersonInfoDO::getName, reqVO.getContent())
|
|
|
+ .or()
|
|
|
+ .likeIfExists(PersonInfoDO::getTagList, reqVO.getContent())
|
|
|
+ .or()
|
|
|
+ .likeIfExists(PersonInfoDO::getAdvantage, reqVO.getContent())
|
|
|
+ .or();
|
|
|
+
|
|
|
+ // 求职意向
|
|
|
+ query.leftJoin(JobInterestedDO.class, JobInterestedDO::getUserId, PersonInfoDO::getUserId);
|
|
|
+
|
|
|
+ query.in(CollUtil.isNotEmpty(reqVO.getPositionIds()), JobInterestedDO::getPositionId, reqVO.getPositionIds())
|
|
|
+ .or()
|
|
|
+ .likeIfExists(JobInterestedDO::getWorkAreaId, reqVO.getAreaIds())
|
|
|
+ .or()
|
|
|
+ .likeIfExists(JobInterestedDO::getInterestedAreaIdList, reqVO.getAreaIds())
|
|
|
+ .or();
|
|
|
+
|
|
|
+
|
|
|
+ // 教育经历
|
|
|
+ query.leftJoin(EduExpDO.class, EduExpDO::getUserId, PersonInfoDO::getUserId);
|
|
|
+ query.likeIfExists(EduExpDO::getSchoolName, reqVO.getContent())
|
|
|
+ .or()
|
|
|
+ .likeIfExists(EduExpDO::getMajor, reqVO.getContent())
|
|
|
+ .or()
|
|
|
+ .eqIfExists(EduExpDO::getEducationType, reqVO.getEduType())
|
|
|
+ .or();
|
|
|
+
|
|
|
+ // 工作经验
|
|
|
+ query.leftJoin(WorkExpDO.class, WorkExpDO::getUserId, PersonInfoDO::getUserId);
|
|
|
+ query.likeIfExists(WorkExpDO::getEnterpriseName, reqVO.getContent())
|
|
|
+ .or()
|
|
|
+ .likeIfExists(WorkExpDO::getPositionName, reqVO.getContent())
|
|
|
+ .or()
|
|
|
+ .likeIfExists(WorkExpDO::getDeptName, reqVO.getContent())
|
|
|
+ .or()
|
|
|
+ .likeIfExists(WorkExpDO::getContent, reqVO.getContent())
|
|
|
+ .or()
|
|
|
+ .likeIfExists(WorkExpDO::getAchievement, reqVO.getContent())
|
|
|
+ .or();
|
|
|
+
|
|
|
+// // 项目经验
|
|
|
+// query.leftJoin(ProjectExpDO.class, ProjectExpDO::getUserId, PersonInfoDO::getUserId);
|
|
|
+// query.likeIfExists(ProjectExpDO::getName, reqVO.getContent())
|
|
|
+// .or()
|
|
|
+// .likeIfExists(ProjectExpDO::getContent, reqVO.getContent())
|
|
|
+// .or();
|
|
|
+//
|
|
|
+// // 培训经历
|
|
|
+// query.leftJoin(TrainExpDO.class, TrainExpDO::getUserId, PersonInfoDO::getUserId);
|
|
|
+// query.likeIfExists(TrainExpDO::getOrgName, reqVO.getContent())
|
|
|
+// .or()
|
|
|
+// .likeIfExists(TrainExpDO::getCourse, reqVO.getContent())
|
|
|
+// .or()
|
|
|
+// .likeIfExists(TrainExpDO::getContent, reqVO.getContent())
|
|
|
+// .or();
|
|
|
+
|
|
|
+ query.orderByDesc(PersonInfoDO::getUpdateTime);
|
|
|
+
|
|
|
+ return selectJoinPage(reqVO, PersonInfoRespVO.class, query);
|
|
|
+ }
|
|
|
+
|
|
|
}
|