1.修改查询条件regionCode like截取
2.修改给招聘会提供的接口
This commit is contained in:
@@ -29,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.cms.service.ICompanyService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 公司Service业务层处理
|
||||
@@ -111,6 +112,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int insertCompany(Company company)
|
||||
{
|
||||
Long count = companyMapper.selectCount(Wrappers.<Company>lambdaQuery().eq(Company::getName, company.getName()));
|
||||
@@ -119,12 +121,14 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
||||
}
|
||||
int insert =companyMapper.insert(company);
|
||||
if(insert>0){
|
||||
company.getCompanyContactList().forEach(x->{
|
||||
CompanyContact companyContact=new CompanyContact();
|
||||
BeanUtils.copyProperties(x,companyContact);
|
||||
companyContact.setCompanyId(company.getCompanyId());
|
||||
companyContactMapper.insert(companyContact);
|
||||
});
|
||||
if(company.getCompanyContactList()!=null){
|
||||
company.getCompanyContactList().forEach(x->{
|
||||
CompanyContact companyContact=new CompanyContact();
|
||||
BeanUtils.copyProperties(x,companyContact);
|
||||
companyContact.setCompanyId(company.getCompanyId());
|
||||
companyContactMapper.insert(companyContact);
|
||||
});
|
||||
}
|
||||
}
|
||||
return insert;
|
||||
}
|
||||
|
||||
@@ -554,7 +554,9 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
wrapper.and(x->x.like(ESJobDocument::getJobLocation,esJobSearch.getJobLocation()));
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(esJobSearch.getRegionCode())){
|
||||
wrapper.and(x->x.like(ESJobDocument::getRegionCode,esJobSearch.getRegionCode()));
|
||||
//截取行政区划
|
||||
String xzqh=StringUtil.autoXzqh(esJobSearch.getRegionCode());
|
||||
wrapper.and(x->x.likeRight(ESJobDocument::getRegionCode,xzqh));
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(esJobSearch.getStaffType())){
|
||||
wrapper.and(x->x.eq(ESJobDocument::getStaffType,esJobSearch.getStaffType()));
|
||||
@@ -666,7 +668,9 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
wrapper.and(x->x.like(ESJobDocument::getJobLocation,jobQuery.getJobLocation()));
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(jobQuery.getRegionCode())){
|
||||
wrapper.and(x->x.eq(ESJobDocument::getRegionCode,jobQuery.getRegionCode()));
|
||||
//截取行政区划
|
||||
String xzqh=StringUtil.autoXzqh(jobQuery.getRegionCode());
|
||||
wrapper.and(x->x.likeRight(ESJobDocument::getRegionCode,xzqh));
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(jobQuery.getStaffType())){
|
||||
wrapper.and(x->x.eq(ESJobDocument::getStaffType,jobQuery.getStaffType()));
|
||||
|
||||
Reference in New Issue
Block a user