Compare commits
2 Commits
98fb18256e
...
50558fdbc6
| Author | SHA1 | Date | |
|---|---|---|---|
| 50558fdbc6 | |||
| 2fc4a93cc8 |
@@ -1,5 +1,7 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.DesensitizedUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ruoyi.cms.domain.*;
|
||||
@@ -89,7 +91,6 @@ public class CmsJobController extends BaseController
|
||||
job.setCompanyId(Objects.nonNull(company) ? company.getCompanyId() : null);
|
||||
}
|
||||
startPage();
|
||||
//List<Job> list = jobService.selectJobList(job);
|
||||
List<Job> list = jobService.selectHttpJobList(job,request);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@@ -98,17 +99,24 @@ public class CmsJobController extends BaseController
|
||||
* 获取岗位详细信息
|
||||
*/
|
||||
@ApiOperation("获取岗位详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('bussiness:job:query')")
|
||||
//@PreAuthorize("@ss.hasPermi('bussiness:job:query')")
|
||||
@GetMapping(value = "/{encryptJobId}")
|
||||
@Anonymous
|
||||
public AjaxResult getInfo(@PathVariable("encryptJobId") String encryptJobId, HttpServletRequest request)
|
||||
{
|
||||
boolean isLogin = SecurityUtils.isLogin();
|
||||
if(StringUtils.isBlank(encryptJobId)){
|
||||
return error("jobId不能为空");
|
||||
}
|
||||
try {
|
||||
Long jobId=Long.parseLong(SM4Utils.decryptEcb(SM4Constants.SM4_KET, encryptJobId));
|
||||
//return success(jobService.selectJobByJobId(jobId));
|
||||
return success(jobService.selectHttpJobByJobId(jobId,request));
|
||||
Job job=jobService.selectHttpJobByJobId(jobId,request);
|
||||
if (!isLogin && CollUtil.isNotEmpty(job.getJobContactList())) {
|
||||
job.getJobContactList().forEach(contact -> {
|
||||
contact.setContactPersonPhone(DesensitizedUtil.mobilePhone(contact.getContactPersonPhone()));
|
||||
});
|
||||
}
|
||||
return success(job);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
return error("参数不正确!");
|
||||
|
||||
@@ -747,42 +747,41 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
Company company=iCompanyService.selectCompanyByCompanyId(job.getCompanyId());
|
||||
job.setCode(company.getCode());
|
||||
}
|
||||
BeanUtils.copyBeanProp(esJobDocument, job);
|
||||
//生成jobId加密字段
|
||||
String encryptJobId=SM4Utils.encryptEcb(SM4Constants.SM4_KET, String.valueOf(job!=null?job.getJobId():null));
|
||||
esJobDocument.setEncryptJobId(encryptJobId);
|
||||
if (job != null && job.getJobId() != null) {
|
||||
esJobDocument.setAppJobUrl("https://www.xjksly.cn/app#/packageA/pages/post/post?jobId="+ encryptJobId);
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(job.getScale())){
|
||||
esJobDocument.setScale(Integer.valueOf(job.getScale()));
|
||||
}else {
|
||||
esJobDocument.setScale(0);
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(job.getExperience())){
|
||||
esJobDocument.setExperience_int(Integer.valueOf(job.getExperience()));
|
||||
}else {
|
||||
esJobDocument.setExperience("0");
|
||||
esJobDocument.setExperience_int(0);
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(job.getEducation())){
|
||||
esJobDocument.setEducation_int(Integer.valueOf(job.getEducation()));
|
||||
}else {
|
||||
esJobDocument.setEducation("-1");
|
||||
esJobDocument.setEducation_int(-1);
|
||||
}
|
||||
if (esJobDocument.getLatitude() != null) {
|
||||
esJobDocument.setLatAndLon(esJobDocument.getLatitude().toString() + "," + esJobDocument.getLongitude().toString());
|
||||
}
|
||||
if(StringUtil.isEmptyOrNull(job.getCompanyNature())){
|
||||
esJobDocument.setCompanyNature("6");
|
||||
}
|
||||
LambdaEsQueryWrapper<ESJobDocument> lambdaEsQueryWrapper = new LambdaEsQueryWrapper();
|
||||
lambdaEsQueryWrapper.eq(ESJobDocument::getJobId,job.getJobId());
|
||||
esJobDocumentMapper.delete(lambdaEsQueryWrapper);
|
||||
esJobDocumentMapper.insert(esJobDocument);
|
||||
}
|
||||
|
||||
BeanUtils.copyBeanProp(esJobDocument, job);
|
||||
//生成jobId加密字段
|
||||
String encryptJobId=SM4Utils.encryptEcb(SM4Constants.SM4_KET, String.valueOf(job!=null?job.getJobId():null));
|
||||
esJobDocument.setEncryptJobId(encryptJobId);
|
||||
if (job != null && job.getJobId() != null) {
|
||||
esJobDocument.setAppJobUrl("https://www.xjksly.cn/app#/packageA/pages/post/post?jobId="+ encryptJobId);
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(job.getScale())){
|
||||
esJobDocument.setScale(Integer.valueOf(job.getScale()));
|
||||
}else {
|
||||
esJobDocument.setScale(0);
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(job.getExperience())){
|
||||
esJobDocument.setExperience_int(Integer.valueOf(job.getExperience()));
|
||||
}else {
|
||||
esJobDocument.setExperience("0");
|
||||
esJobDocument.setExperience_int(0);
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(job.getEducation())){
|
||||
esJobDocument.setEducation_int(Integer.valueOf(job.getEducation()));
|
||||
}else {
|
||||
esJobDocument.setEducation("-1");
|
||||
esJobDocument.setEducation_int(-1);
|
||||
}
|
||||
if (esJobDocument.getLatitude() != null) {
|
||||
esJobDocument.setLatAndLon(esJobDocument.getLatitude().toString() + "," + esJobDocument.getLongitude().toString());
|
||||
}
|
||||
if(StringUtil.isEmptyOrNull(job.getCompanyNature())){
|
||||
esJobDocument.setCompanyNature("6");
|
||||
}
|
||||
LambdaEsQueryWrapper<ESJobDocument> lambdaEsQueryWrapper = new LambdaEsQueryWrapper();
|
||||
lambdaEsQueryWrapper.eq(ESJobDocument::getJobId,job.getJobId());
|
||||
esJobDocumentMapper.delete(lambdaEsQueryWrapper);
|
||||
esJobDocumentMapper.insert(esJobDocument);
|
||||
}
|
||||
|
||||
public List<ESJobDocument> selectByIds(Long[] jobIds) {
|
||||
|
||||
@@ -327,11 +327,13 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
jobs.forEach(jobItem -> {
|
||||
if (Objects.nonNull(jobItem)) {
|
||||
Long jobItemId = jobItem.getJobId();
|
||||
String jobIdSm4=SM4Utils.encryptEcb(SM4Constants.SM4_KET, String.valueOf(jobItemId));
|
||||
List<File> jobFiles = fileGroupMap.getOrDefault(jobItemId, Collections.emptyList());
|
||||
List<JobContact> jobContent = jobContactGroupMap.getOrDefault(jobItemId, Collections.emptyList());
|
||||
jobItem.setFilesList(jobFiles);
|
||||
jobItem.setJobContactList(jobContent);
|
||||
jobItem.setEncryptJobId(SM4Utils.encryptEcb(SM4Constants.SM4_KET, String.valueOf(jobItem.getJobId())));
|
||||
jobItem.setEncryptJobId(jobIdSm4);
|
||||
jobItem.setJobUrl(StringUtil.BASE_WW_GW+jobIdSm4);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user