修改附件展示
This commit is contained in:
@@ -6,10 +6,11 @@ import com.ruoyi.cms.domain.ESJobDocument;
|
||||
import com.ruoyi.cms.domain.Job;
|
||||
import com.ruoyi.cms.domain.query.ESJobSearch;
|
||||
import com.ruoyi.cms.domain.vo.CandidateVO;
|
||||
import com.ruoyi.cms.util.AppWechatEntity;
|
||||
import com.ruoyi.common.core.domain.entity.AppUser;
|
||||
import org.dromara.easyes.core.biz.EsPageInfo;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 岗位Service接口
|
||||
*
|
||||
@@ -96,4 +97,8 @@ public interface IJobService
|
||||
List<ESJobDocument> sysRecommend(ESJobSearch esJobSearch);
|
||||
|
||||
List<Job> selectAllJob();
|
||||
|
||||
public Job selectHttpJobByJobId(Long jobId, HttpServletRequest request);
|
||||
|
||||
public List<Job> selectHttpJobList(Job job,HttpServletRequest request);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.HttpURLConnection;
|
||||
@@ -211,6 +212,25 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
*/
|
||||
@Override
|
||||
public Job selectJobByJobId(Long jobId)
|
||||
{
|
||||
Job job = jobMapper.selectById(jobId);
|
||||
//查询公司信息
|
||||
if(Objects.nonNull(job.getCompanyId())){
|
||||
Company company = companyMapper.selectById(job.getCompanyId());
|
||||
job.setCompany(company);
|
||||
}
|
||||
//查询联系人
|
||||
JobContact contact=new JobContact();
|
||||
contact.setJobId(job.getJobId());
|
||||
List<JobContact> contacts=jobContactMapper.getSelectList(contact);
|
||||
if(contacts!=null){
|
||||
job.setJobContactList(contacts);
|
||||
}
|
||||
return job;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Job selectHttpJobByJobId(Long jobId, HttpServletRequest request)
|
||||
{
|
||||
Job job = jobMapper.selectById(jobId);
|
||||
//查询公司信息
|
||||
@@ -226,7 +246,7 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
job.setJobContactList(contacts);
|
||||
}
|
||||
//查询附件
|
||||
String baseFilePath = StringUtil.getFilePath();
|
||||
String baseFilePath = StringUtil.getFilePath(request);
|
||||
//查询附件
|
||||
File queryFile = new File();
|
||||
queryFile.setBussinessid(jobId);
|
||||
@@ -252,10 +272,17 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
*/
|
||||
@Override
|
||||
public List<Job> selectJobList(Job job)
|
||||
{
|
||||
List<Job> jobs = jobMapper.selectJobList(job);
|
||||
return jobs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Job> selectHttpJobList(Job job,HttpServletRequest request)
|
||||
{
|
||||
List<Job> jobs = jobMapper.selectJobList(job);
|
||||
if (CollectionUtils.isNotEmpty(jobs)) {
|
||||
String baseFilePath = StringUtil.getFilePath();
|
||||
String baseFilePath = StringUtil.getFilePath(request);
|
||||
|
||||
List<Long> jobIds = jobs.stream().filter(Objects::nonNull)
|
||||
.map(Job::getJobId).filter(Objects::nonNull)
|
||||
@@ -395,7 +422,7 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
}
|
||||
//添加附件
|
||||
List<File> filesList = job.getFilesList() != null ? job.getFilesList() : Collections.emptyList();
|
||||
List<Long> longs = filesList.stream().filter(Objects::nonNull).filter(file -> Objects.isNull(file.getId())).map(File::getBussinessid).collect(Collectors.toList());
|
||||
List<Long> longs = filesList.stream().filter(Objects::nonNull).map(File::getBussinessid).collect(Collectors.toList());
|
||||
if(!longs.isEmpty()){
|
||||
fileMapper.updateBussinessids(longs,job.getJobId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user