|
@@ -6,8 +6,11 @@ import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
|
|
import com.citu.framework.common.pojo.PageParam;
|
|
|
import com.citu.framework.common.pojo.PageResult;
|
|
|
import com.citu.framework.common.util.object.BeanUtils;
|
|
|
+import com.citu.framework.dict.core.DictFrameworkUtils;
|
|
|
import com.citu.framework.security.core.LoginUser;
|
|
|
import com.citu.module.menduner.common.util.LoginUserContext;
|
|
|
+import com.citu.module.menduner.system.api.python.GraphApi;
|
|
|
+import com.citu.module.menduner.system.api.python.GraphSendDTO;
|
|
|
import com.citu.module.menduner.system.controller.app.jobhunt.job.vo.AppEnterpriseJobHomeRespVO;
|
|
|
import com.citu.module.menduner.system.controller.app.jobhunt.job.vo.AppJobAdvertisedDetailRespVO;
|
|
|
import com.citu.module.menduner.system.controller.app.jobhunt.job.vo.AppJobAdvertisedHomeRespVO;
|
|
@@ -21,31 +24,34 @@ import com.citu.module.menduner.system.controller.base.contact.EnterpriseUserCon
|
|
|
import com.citu.module.menduner.system.controller.base.enterprise.vo.EnterpriseBaseSimpleRespVO;
|
|
|
import com.citu.module.menduner.system.controller.base.job.JobAdvertisedPageReqVO;
|
|
|
import com.citu.module.menduner.system.controller.base.job.JobAdvertisedReqVO;
|
|
|
+import com.citu.module.menduner.system.controller.base.job.JobAdvertisedRespVO;
|
|
|
import com.citu.module.menduner.system.controller.base.job.JobAdvertisedSaveReqVO;
|
|
|
import com.citu.module.menduner.system.convert.JobAdvertisedConvert;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.job.JobAdvertisedDO;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.job.JobInterestedDO;
|
|
|
import com.citu.module.menduner.system.dal.mysql.job.JobAdvertisedMapper;
|
|
|
import com.citu.module.menduner.system.dal.mysql.job.JobInterestedMapper;
|
|
|
-import com.citu.module.menduner.system.enums.cv.JobCvRelStatusEnum;
|
|
|
import com.citu.module.menduner.system.enums.job.JobStatusEnum;
|
|
|
+import com.citu.module.menduner.system.enums.sync.SyncConstants;
|
|
|
import com.citu.module.menduner.system.mq.producer.ESProducer;
|
|
|
import com.citu.module.menduner.system.service.enterprise.EnterpriseService;
|
|
|
import com.citu.module.menduner.system.service.enterprise.bind.EnterpriseUserBindService;
|
|
|
-import com.citu.module.menduner.system.service.record.UserAccountRecordService;
|
|
|
-import com.citu.module.menduner.system.util.ESOperateEnum;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.math.BigDecimal;
|
|
|
import java.time.LocalDateTime;
|
|
|
-import java.util.*;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Collection;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.citu.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
|
-import static com.citu.module.menduner.system.enums.ErrorCodeConstants.*;
|
|
|
+import static com.citu.module.menduner.system.enums.DictTypeConstants.*;
|
|
|
+import static com.citu.module.menduner.system.enums.ErrorCodeConstants.MDE_JOB_ADVERTISED_BALANCE_UPDATE;
|
|
|
+import static com.citu.module.menduner.system.enums.ErrorCodeConstants.MDE_JOB_ADVERTISED_NOT_EXISTS;
|
|
|
import static com.citu.module.menduner.system.util.RecruitAnalysisUtils.generateDateTimeRange;
|
|
|
|
|
|
/**
|
|
@@ -60,7 +66,7 @@ import static com.citu.module.menduner.system.util.RecruitAnalysisUtils.generate
|
|
|
public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
|
|
|
@Resource
|
|
|
- private JobAdvertisedMapper jobAdvertisedMapper;
|
|
|
+ private JobAdvertisedMapper mapper;
|
|
|
|
|
|
@Resource
|
|
|
private JobInterestedMapper jobInterestedMapper;
|
|
@@ -72,17 +78,17 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
private EnterpriseUserBindService userBindService;
|
|
|
|
|
|
@Resource
|
|
|
- private UserAccountRecordService accountRecordService;
|
|
|
+ private ESProducer esProducer;
|
|
|
|
|
|
@Resource
|
|
|
- private ESProducer esProducer;
|
|
|
+ private GraphApi graphApi;
|
|
|
|
|
|
|
|
|
@Override
|
|
|
public Long createJobAdvertised(JobAdvertisedSaveReqVO createReqVO) {
|
|
|
// 插入
|
|
|
JobAdvertisedDO jobAdvertised = BeanUtils.toBean(createReqVO, JobAdvertisedDO.class);
|
|
|
- jobAdvertisedMapper.insert(jobAdvertised);
|
|
|
+ mapper.insert(jobAdvertised);
|
|
|
// 返回
|
|
|
return jobAdvertised.getId();
|
|
|
}
|
|
@@ -93,7 +99,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
validateJobAdvertisedExists(updateReqVO.getId());
|
|
|
// 更新
|
|
|
JobAdvertisedDO updateObj = BeanUtils.toBean(updateReqVO, JobAdvertisedDO.class);
|
|
|
- jobAdvertisedMapper.updateById(updateObj);
|
|
|
+ mapper.updateById(updateObj);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -101,28 +107,28 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
// 校验存在
|
|
|
validateJobAdvertisedExists(id);
|
|
|
// 删除
|
|
|
- jobAdvertisedMapper.deleteById(id);
|
|
|
+ mapper.deleteById(id);
|
|
|
}
|
|
|
|
|
|
private void validateJobAdvertisedExists(Long id) {
|
|
|
- if (jobAdvertisedMapper.selectById(id) == null) {
|
|
|
+ if (mapper.selectById(id) == null) {
|
|
|
throw exception(MDE_JOB_ADVERTISED_NOT_EXISTS);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public JobAdvertisedDO getJobAdvertised(Long id) {
|
|
|
- return jobAdvertisedMapper.selectById(id);
|
|
|
+ return mapper.selectById(id);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public PageResult<JobAdvertisedDO> getJobAdvertisedPage(JobAdvertisedPageReqVO pageReqVO) {
|
|
|
- return jobAdvertisedMapper.selectPage(pageReqVO);
|
|
|
+ return mapper.selectPage(pageReqVO);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<JobAdvertisedDO> list(JobAdvertisedReqVO reqVO) {
|
|
|
- return jobAdvertisedMapper.list(reqVO);
|
|
|
+ return mapper.list(reqVO);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -136,18 +142,18 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
Long userId = LoginUserContext.getUserId2();
|
|
|
if (null == userId) {
|
|
|
// 未登录
|
|
|
- PageResult<AppJobAdvertisedHomeRespVO> result = jobAdvertisedMapper.selectPage(pageReqVO);
|
|
|
+ PageResult<AppJobAdvertisedHomeRespVO> result = mapper.selectPage(pageReqVO);
|
|
|
if (CollUtil.isEmpty(result.getList())) {
|
|
|
// 没有数据, 再算一遍
|
|
|
pageReqVO.setTop(null);
|
|
|
- return jobAdvertisedMapper.selectPage(pageReqVO);
|
|
|
+ return mapper.selectPage(pageReqVO);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 基于求职意向计算
|
|
|
List<JobInterestedDO> interestList = jobInterestedMapper.selectByUserIdList(userId);
|
|
|
if (CollUtil.isEmpty(interestList)) {
|
|
|
- return jobAdvertisedMapper.selectPage(pageReqVO);
|
|
|
+ return mapper.selectPage(pageReqVO);
|
|
|
}
|
|
|
// 感兴趣的职位
|
|
|
List<Long> positionIds = interestList.stream()
|
|
@@ -186,7 +192,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
);
|
|
|
pageReqVO.setAcquainted(true);
|
|
|
pageReqVO.setTop(false);
|
|
|
- return jobAdvertisedMapper.selectPage(pageReqVO);
|
|
|
+ return mapper.selectPage(pageReqVO);
|
|
|
|
|
|
|
|
|
}
|
|
@@ -196,14 +202,14 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
AppJobAdvertisedPageReqVO pageReqVO =
|
|
|
new AppJobAdvertisedPageReqVO(pageParam, AppJobAdvertisedPageReqVO.NEW);
|
|
|
pageReqVO.setHire(false);
|
|
|
- return jobAdvertisedMapper.selectPage(pageReqVO);
|
|
|
+ return mapper.selectPage(pageReqVO);
|
|
|
}
|
|
|
|
|
|
|
|
|
@Override
|
|
|
public PageResult<AppJobAdvertisedHomeRespVO> getAcquaintedPage(AppJobAdvertisedPageReqVO pageReqVO) {
|
|
|
pageReqVO.setMark(AppJobAdvertisedPageReqVO.ACQUAINTED);
|
|
|
- return jobAdvertisedMapper.selectPage(pageReqVO);
|
|
|
+ return mapper.selectPage(pageReqVO);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -211,13 +217,13 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
AppJobAdvertisedPageReqVO pageReqVO =
|
|
|
new AppJobAdvertisedPageReqVO(pageParam, AppJobAdvertisedPageReqVO.HIRE);
|
|
|
pageReqVO.setHire(true);
|
|
|
- return jobAdvertisedMapper.selectPage(pageReqVO);
|
|
|
+ return mapper.selectPage(pageReqVO);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public PageResult<AppEnterpriseJobHomeRespVO> getHotEnterpriseJobPage(PageParam pageParam) {
|
|
|
PageResult<AppEnterpriseJobHomeRespVO> result =
|
|
|
- jobAdvertisedMapper.getEnterpriseJobPage(pageParam);
|
|
|
+ mapper.getEnterpriseJobPage(pageParam);
|
|
|
if (result.getList().isEmpty()) {
|
|
|
return result;
|
|
|
}
|
|
@@ -226,7 +232,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
// 一次性获取相关企业的数据
|
|
|
- Map<Long, List<JobAdvertisedDO>> jobMap = jobAdvertisedMapper
|
|
|
+ Map<Long, List<JobAdvertisedDO>> jobMap = mapper
|
|
|
.selectByEnterpriseIdList(idList)
|
|
|
.stream()
|
|
|
.collect(Collectors.groupingBy(JobAdvertisedDO::getEnterpriseId));
|
|
@@ -245,14 +251,14 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
|
|
|
@Override
|
|
|
public AppJobAdvertisedDetailRespVO detail(Long id) {
|
|
|
- JobAdvertisedDO job = jobAdvertisedMapper.selectById(id);
|
|
|
+ JobAdvertisedDO job = mapper.selectById(id);
|
|
|
if (null == job) {
|
|
|
throw exception(MDE_JOB_ADVERTISED_NOT_EXISTS);
|
|
|
}
|
|
|
// 转换
|
|
|
AppJobAdvertisedDetailRespVO respVO = JobAdvertisedConvert.INSTANCE.convert(job);
|
|
|
// 设置招聘职位数量
|
|
|
- respVO.setJobAdvertisedNum(jobAdvertisedMapper.countByEnterpriseId(job.getEnterpriseId()));
|
|
|
+ respVO.setJobAdvertisedNum(mapper.countByEnterpriseId(job.getEnterpriseId()));
|
|
|
|
|
|
// 查询企业信息
|
|
|
EnterpriseBaseSimpleRespVO enterprise = enterpriseService.
|
|
@@ -270,7 +276,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
@Override
|
|
|
public List<CommonRespVO> getJobPositionCountByEnterpriseId(Long enterpriseId) {
|
|
|
List<CommonRespVO> list = new ArrayList<>();
|
|
|
- List<JobAdvertisedDO> jobList = jobAdvertisedMapper
|
|
|
+ List<JobAdvertisedDO> jobList = mapper
|
|
|
.selectByEnterpriseIdAndNotExpireTime(enterpriseId);
|
|
|
// 分组
|
|
|
Map<Long, Long> groupedMap = jobList.stream()
|
|
@@ -290,7 +296,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
@Override
|
|
|
public List<CommonRespVO> getJobAreaCountByEnterpriseId(Long enterpriseId) {
|
|
|
List<CommonRespVO> list = new ArrayList<>();
|
|
|
- List<JobAdvertisedDO> jobList = jobAdvertisedMapper
|
|
|
+ List<JobAdvertisedDO> jobList = mapper
|
|
|
.selectByEnterpriseIdAndNotExpireTime(enterpriseId);
|
|
|
// 分组
|
|
|
Map<Long, Long> groupedMap = jobList.stream()
|
|
@@ -307,6 +313,33 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void syncGraph() {
|
|
|
+
|
|
|
+ List<JobAdvertisedDO> list = mapper.list(
|
|
|
+ JobAdvertisedReqVO.builder().build()
|
|
|
+ );
|
|
|
+ List<JobAdvertisedRespVO> respList = JobAdvertisedConvert.INSTANCE.convertList7(list);
|
|
|
+ for (JobAdvertisedRespVO resp : respList) {
|
|
|
+ // 设置字典真实值
|
|
|
+ resp.setType(DictFrameworkUtils.getDictDataLabel(MENDUNER_JOB_TYPE, resp.getType()));
|
|
|
+ resp.setEduType(DictFrameworkUtils.getDictDataLabel(MENDUNER_EDUCATION_TYPE, resp.getEduType()));
|
|
|
+ resp.setExpType(DictFrameworkUtils.getDictDataLabel(MENDUNER_EXP_TYPE, resp.getExpType()));
|
|
|
+ resp.setPayUnit(DictFrameworkUtils.getDictDataLabel(MENDUNER_PAY_UNIT, resp.getPayUnit()));
|
|
|
+ resp.setStatus(DictFrameworkUtils.getDictDataLabel(MENDUNER_JOB_STATUS, resp.getStatus()));
|
|
|
+ }
|
|
|
+
|
|
|
+ graphApi.send(
|
|
|
+ new GraphSendDTO<JobAdvertisedRespVO>
|
|
|
+ (
|
|
|
+ SyncConstants.JOB,
|
|
|
+ SyncConstants.SYNC_ALL,
|
|
|
+ respList
|
|
|
+ )
|
|
|
+ ).getCheckedData();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@DSTransactional
|
|
|
public Long save(AppRecruitJobSaveReqVO reqVO) {
|
|
@@ -324,13 +357,13 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
job.setStatus(JobStatusEnum.ENABLE.getStatus());
|
|
|
}
|
|
|
// 后置处理
|
|
|
- jobOperateAfter(enterpriseId, loginUser.getId(), job, ESOperateEnum.ADD);
|
|
|
+ jobOperateAfter(job, SyncConstants.ADD);
|
|
|
|
|
|
} else {
|
|
|
// 修改
|
|
|
JobAdvertisedDO entity = get(reqVO.getId());
|
|
|
// 效验
|
|
|
- validUpdate(enterpriseId, loginUser.getId(), entity, reqVO);
|
|
|
+ validUpdate(entity, reqVO);
|
|
|
// 是否是平台职位切换成众聘的职位
|
|
|
if (reqVO.getHire() && !entity.getHire()) {
|
|
|
// 普通职位切换众聘职位则进入判断,众聘切普通不进入判断
|
|
@@ -338,7 +371,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
}
|
|
|
job.setId(entity.getId());
|
|
|
// 后置处理
|
|
|
- jobOperateAfter(enterpriseId, loginUser.getId(), job, ESOperateEnum.UPDATE);
|
|
|
+ jobOperateAfter(job, SyncConstants.UPDATE);
|
|
|
}
|
|
|
return job.getId();
|
|
|
}
|
|
@@ -347,15 +380,12 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
/**
|
|
|
* 效验职位发布的编辑
|
|
|
*
|
|
|
- * @param enterpriseId 当前操作账户所在的企业
|
|
|
- * @param userId 操作的用户
|
|
|
- * @param entity 职位
|
|
|
- * @param reqVO 编辑的职位信息
|
|
|
+ * @param entity 职位
|
|
|
+ * @param reqVO 编辑的职位信息
|
|
|
**/
|
|
|
- public void validUpdate(Long enterpriseId,
|
|
|
- Long userId,
|
|
|
- JobAdvertisedDO entity,
|
|
|
- AppRecruitJobSaveReqVO reqVO) {
|
|
|
+ public void validUpdate(
|
|
|
+ JobAdvertisedDO entity,
|
|
|
+ AppRecruitJobSaveReqVO reqVO) {
|
|
|
|
|
|
if (reqVO.getHire()) {
|
|
|
// price 不为空 && 之前是众聘的职位(防止平台职位切换成众聘职位这种情况)
|
|
@@ -370,7 +400,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
}
|
|
|
|
|
|
public JobAdvertisedDO get(Long id) {
|
|
|
- JobAdvertisedDO job = jobAdvertisedMapper.selectById(id);
|
|
|
+ JobAdvertisedDO job = mapper.selectById(id);
|
|
|
if (null == job) {
|
|
|
throw exception(MDE_JOB_ADVERTISED_NOT_EXISTS);
|
|
|
}
|
|
@@ -387,8 +417,8 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
return true;
|
|
|
}
|
|
|
job.setStatus(JobStatusEnum.ENABLE.getStatus());
|
|
|
- jobAdvertisedMapper.updateById(job);
|
|
|
- jobDataSync(job, ESOperateEnum.UPDATE);
|
|
|
+ mapper.updateById(job);
|
|
|
+ jobDataSync(job, SyncConstants.UPDATE);
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
@@ -403,8 +433,8 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
return true;
|
|
|
}
|
|
|
job.setStatus(JobStatusEnum.DISABLE.getStatus());
|
|
|
- jobAdvertisedMapper.updateById(job);
|
|
|
- jobDataSync(job, ESOperateEnum.UPDATE);
|
|
|
+ mapper.updateById(job);
|
|
|
+ jobDataSync(job, SyncConstants.UPDATE);
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
@@ -415,14 +445,14 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
for (Long id : ids) {
|
|
|
JobAdvertisedDO job = get(id);
|
|
|
job.setUpdateTime(LocalDateTime.now());
|
|
|
- jobAdvertisedMapper.updateById(job);
|
|
|
- jobDataSync(job, ESOperateEnum.UPDATE);
|
|
|
+ mapper.updateById(job);
|
|
|
+ jobDataSync(job, SyncConstants.UPDATE);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<AppRecruitJobSimpleRespVO> getList() {
|
|
|
- return jobAdvertisedMapper.list(
|
|
|
+ return mapper.list(
|
|
|
LoginUserContext.getEnterpriseId(),
|
|
|
LoginUserContext.getUserId()
|
|
|
);
|
|
@@ -439,29 +469,26 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
}
|
|
|
job.setUpdateTime(LocalDateTime.now());
|
|
|
job.setTop(true);
|
|
|
- jobAdvertisedMapper.updateById(job);
|
|
|
- jobDataSync(job, ESOperateEnum.UPDATE);
|
|
|
+ mapper.updateById(job);
|
|
|
+ jobDataSync(job, SyncConstants.UPDATE);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 职位操作最后的操作
|
|
|
*
|
|
|
- * @param enterpriseId 当前操作账户所在的企业
|
|
|
- * @param userId 操作的用户
|
|
|
- * @param job 职位对象
|
|
|
- * @param operate 操作类型
|
|
|
+ * @param job 职位对象
|
|
|
+ * @param operate 操作类型
|
|
|
**/
|
|
|
- public void jobOperateAfter(Long enterpriseId,
|
|
|
- Long userId,
|
|
|
- JobAdvertisedDO job,
|
|
|
- ESOperateEnum operate) {
|
|
|
+ public void jobOperateAfter(
|
|
|
+ JobAdvertisedDO job,
|
|
|
+ String operate) {
|
|
|
|
|
|
|
|
|
- if (ESOperateEnum.ADD.getType().equals(operate.getType())) {
|
|
|
- jobAdvertisedMapper.insert(job);
|
|
|
+ if (SyncConstants.ADD.equals(operate)) {
|
|
|
+ mapper.insert(job);
|
|
|
} else {
|
|
|
- jobAdvertisedMapper.updateById(job);
|
|
|
+ mapper.updateById(job);
|
|
|
}
|
|
|
|
|
|
// ========== ES数据同步处理 ==========
|
|
@@ -475,29 +502,49 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
* @param job 职位对象
|
|
|
* @param operate 操作类型
|
|
|
**/
|
|
|
- public void jobDataSync(JobAdvertisedDO job, ESOperateEnum operate) {
|
|
|
- if (ESOperateEnum.ADD.getType().equals(operate.getType())) {
|
|
|
- esProducer.send(ESOperateEnum.ADD, job.getId());
|
|
|
+ public void jobDataSync(JobAdvertisedDO job, String operate) {
|
|
|
+ if (SyncConstants.ADD.equals(operate)) {
|
|
|
+ // es
|
|
|
+ esProducer.send(SyncConstants.JOB,SyncConstants.ADD, job.getId());
|
|
|
+ // 图数据库
|
|
|
+ graphApi.send(
|
|
|
+ new GraphSendDTO<JobAdvertisedRespVO>
|
|
|
+ (
|
|
|
+ SyncConstants.JOB,
|
|
|
+ SyncConstants.ADD,
|
|
|
+ JobAdvertisedConvert.INSTANCE.convert(job)
|
|
|
+ )
|
|
|
+ ).getCheckedData();
|
|
|
} else {
|
|
|
- esProducer.send(ESOperateEnum.UPDATE, job.getId());
|
|
|
+ // es
|
|
|
+ esProducer.send(SyncConstants.JOB,SyncConstants.UPDATE, job.getId());
|
|
|
+ // 图数据库
|
|
|
+ graphApi.send(
|
|
|
+ new GraphSendDTO<JobAdvertisedRespVO>
|
|
|
+ (
|
|
|
+ SyncConstants.JOB,
|
|
|
+ SyncConstants.UPDATE,
|
|
|
+ JobAdvertisedConvert.INSTANCE.convert(job)
|
|
|
+ )
|
|
|
+ ).getCheckedData();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public PageResult<RecruitJobAnalysisRespVO> getBrowseNum(RecruitAnalysisReqVO reqVO) {
|
|
|
LocalDateTime[] timeRange = generateDateTimeRange(reqVO);
|
|
|
- return jobAdvertisedMapper.getAnalysisDetail(reqVO,timeRange[0], timeRange[1]);
|
|
|
+ return mapper.getAnalysisDetail(reqVO, timeRange[0], timeRange[1]);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public Long getBrowseNumCount(RecruitAnalysisReqVO reqVO) {
|
|
|
LocalDateTime[] timeRange = generateDateTimeRange(reqVO);
|
|
|
- return jobAdvertisedMapper.getBrowseNumCount(reqVO,timeRange[0], timeRange[1]);
|
|
|
+ return mapper.getBrowseNumCount(reqVO, timeRange[0], timeRange[1]);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public PageResult<RecruitJobAnalysisRespVO> getJobNum(RecruitAnalysisReqVO reqVO) {
|
|
|
LocalDateTime[] timeRange = generateDateTimeRange(reqVO);
|
|
|
- return jobAdvertisedMapper.getJobNum(reqVO,timeRange[0], timeRange[1]);
|
|
|
+ return mapper.getJobNum(reqVO, timeRange[0], timeRange[1]);
|
|
|
}
|
|
|
}
|