|
|
@ -7,6 +7,8 @@ import org.jeecg.config.shiro.ShiroRealm; |
|
|
import org.jeecg.modules.apiBean.PageBean; |
|
|
import org.jeecg.modules.apiBean.PageBean; |
|
|
import org.jeecg.modules.apiService.JobService; |
|
|
import org.jeecg.modules.apiService.JobService; |
|
|
import org.jeecg.modules.apiUtils.CommonUtils; |
|
|
import org.jeecg.modules.apiUtils.CommonUtils; |
|
|
|
|
|
import org.jeecg.modules.employAddress.entity.EmployAddress; |
|
|
|
|
|
import org.jeecg.modules.employAddress.service.IEmployAddressService; |
|
|
import org.jeecg.modules.employAhthenticationCompany.entity.EmployAhthenticationCompany; |
|
|
import org.jeecg.modules.employAhthenticationCompany.entity.EmployAhthenticationCompany; |
|
|
import org.jeecg.modules.employAhthenticationCompany.service.IEmployAhthenticationCompanyService; |
|
|
import org.jeecg.modules.employAhthenticationCompany.service.IEmployAhthenticationCompanyService; |
|
|
import org.jeecg.modules.employAuthenticationPerson.entity.EmployAuthenticationPerson; |
|
|
import org.jeecg.modules.employAuthenticationPerson.entity.EmployAuthenticationPerson; |
|
|
@ -19,6 +21,7 @@ import org.jeecg.modules.employCompany.entity.EmployCompany; |
|
|
import org.jeecg.modules.employCompany.service.IEmployCompanyService; |
|
|
import org.jeecg.modules.employCompany.service.IEmployCompanyService; |
|
|
import org.jeecg.modules.employJob.entity.EmployJob; |
|
|
import org.jeecg.modules.employJob.entity.EmployJob; |
|
|
import org.jeecg.modules.employJob.service.IEmployJobService; |
|
|
import org.jeecg.modules.employJob.service.IEmployJobService; |
|
|
|
|
|
import org.jeecg.modules.employResume.entity.EmployResume; |
|
|
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; |
|
|
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; |
|
|
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; |
|
|
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
@ -65,6 +68,10 @@ public class JobServiceImpl implements JobService { |
|
|
@Resource |
|
|
@Resource |
|
|
private IEmployCompanyService employCompanyService; |
|
|
private IEmployCompanyService employCompanyService; |
|
|
|
|
|
|
|
|
|
|
|
//区域信息表 |
|
|
|
|
|
@Resource |
|
|
|
|
|
private IEmployAddressService employAddressService; |
|
|
|
|
|
|
|
|
/******************************************************************************************************************/ |
|
|
/******************************************************************************************************************/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -86,8 +93,40 @@ public class JobServiceImpl implements JobService { |
|
|
//组装查询条件 |
|
|
//组装查询条件 |
|
|
if(null != employJob.getAreaId()){ |
|
|
if(null != employJob.getAreaId()){ |
|
|
//工作地域 |
|
|
//工作地域 |
|
|
query.eq(EmployJob::getAreaId, employJob.getAreaId()); |
|
|
|
|
|
|
|
|
//query.eq(EmployJob::getAreaId, employJob.getAreaId()); |
|
|
|
|
|
List<String> list = getCategoryList(employJob.getAreaId()); |
|
|
|
|
|
if(list.size()>1){ |
|
|
|
|
|
for (String s : list) { |
|
|
|
|
|
query.or( |
|
|
|
|
|
q -> q |
|
|
|
|
|
.eq(EmployJob::getAreaId, s) |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
}else { |
|
|
|
|
|
query.like(EmployJob::getAreaId, employJob.getAreaId()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
// else { |
|
|
|
|
|
// List<EmployAddress> addressList = employAddressService |
|
|
|
|
|
// .lambdaQuery() |
|
|
|
|
|
// .eq(EmployAddress::getPid, "0") |
|
|
|
|
|
// .list(); |
|
|
|
|
|
// StringBuffer areaIds = new StringBuffer("1"); |
|
|
|
|
|
// for (EmployAddress address : addressList) { |
|
|
|
|
|
// areaIds.append(","+address.getId()); |
|
|
|
|
|
// } |
|
|
|
|
|
// List<String> list = getCategoryList(areaIds.toString()); |
|
|
|
|
|
// if(list.size()>1){ |
|
|
|
|
|
// for (String s : list) { |
|
|
|
|
|
// query.or( |
|
|
|
|
|
// q -> q |
|
|
|
|
|
// .like(EmployJob::getAreaId, s) |
|
|
|
|
|
// ); |
|
|
|
|
|
// } |
|
|
|
|
|
// }else { |
|
|
|
|
|
// query.like(EmployJob::getAreaId, employJob.getAreaId()); |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
if(null != employJob.getWorkAddress()){ |
|
|
if(null != employJob.getWorkAddress()){ |
|
|
//工作地址 |
|
|
//工作地址 |
|
|
query.like(EmployJob::getWorkAddress, employJob.getWorkAddress()); |
|
|
query.like(EmployJob::getWorkAddress, employJob.getWorkAddress()); |
|
|
@ -113,10 +152,13 @@ public class JobServiceImpl implements JobService { |
|
|
query.like(EmployJob::getUserId, userId); |
|
|
query.like(EmployJob::getUserId, userId); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//招聘截止时间 |
|
|
|
|
|
query.gt(EmployJob::getDeadline, CommonUtils.getCurrentTime()) |
|
|
|
|
|
|
|
|
// //招聘截止时间 |
|
|
|
|
|
query.and( |
|
|
|
|
|
q -> q |
|
|
|
|
|
.gt(EmployJob::getDeadline, CommonUtils.getCurrentTime()) |
|
|
.or() |
|
|
.or() |
|
|
.isNull(EmployJob::getDeadline); |
|
|
|
|
|
|
|
|
.isNull(EmployJob::getDeadline) |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
//按时间倒序 |
|
|
//按时间倒序 |
|
|
query.orderByDesc(EmployJob::getCreateTime); |
|
|
query.orderByDesc(EmployJob::getCreateTime); |
|
|
@ -381,4 +423,32 @@ public class JobServiceImpl implements JobService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//获取二级分类 |
|
|
|
|
|
public List<String> getCategoryList(String categoryId){ |
|
|
|
|
|
List<String> list = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
//如果地址多选,则只查询子地址;如果地址单选,查询是否有子级地址 |
|
|
|
|
|
String[] split = categoryId.split(","); |
|
|
|
|
|
if(split.length > 1){ |
|
|
|
|
|
for (String s : split) { |
|
|
|
|
|
list.add(s); |
|
|
|
|
|
} |
|
|
|
|
|
}else { |
|
|
|
|
|
list.add(categoryId); |
|
|
|
|
|
//查询分类是否有子集 |
|
|
|
|
|
EmployAddress address = employAddressService.getById(categoryId); |
|
|
|
|
|
if(null != address && address.getHasChild().equals("1")){ |
|
|
|
|
|
List<EmployAddress> employAddressList = employAddressService |
|
|
|
|
|
.lambdaQuery() |
|
|
|
|
|
.eq(EmployAddress::getPid, categoryId) |
|
|
|
|
|
.list(); |
|
|
|
|
|
for (EmployAddress employAddress : employAddressList) { |
|
|
|
|
|
list.add(employAddress.getId()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return list; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |