|
@@ -1,6 +1,8 @@
|
|
|
package com.citu.module.menduner.system.service.job;
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
+import cn.hutool.http.HtmlUtil;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
|
|
import com.citu.framework.common.pojo.PageParam;
|
|
|
import com.citu.framework.common.pojo.PageResult;
|
|
@@ -68,9 +70,6 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
@Resource
|
|
|
private JobAdvertisedMapper mapper;
|
|
|
|
|
|
- @Resource
|
|
|
- private JobInterestedMapper jobInterestedMapper;
|
|
|
-
|
|
|
@Resource
|
|
|
private EnterpriseService enterpriseService;
|
|
|
|
|
@@ -227,7 +226,6 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
return mapper.selectPage(pageReqVO);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
public PageResult<AppJobAdvertisedHomeRespVO> getAcquaintedPage(AppJobAdvertisedPageReqVO pageReqVO) {
|
|
|
try {
|
|
@@ -285,7 +283,6 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
public AppJobAdvertisedDetailRespVO detail(Long id) {
|
|
|
JobAdvertisedDO job = mapper.selectById(id);
|
|
@@ -309,7 +306,6 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
return respVO;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
public List<CommonRespVO> getJobPositionCountByEnterpriseId(Long enterpriseId) {
|
|
|
List<CommonRespVO> list = new ArrayList<>();
|
|
@@ -355,9 +351,12 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
public void syncGraph() {
|
|
|
|
|
|
List<JobAdvertisedDO> list = mapper.list(
|
|
|
- JobAdvertisedReqVO.builder().build()
|
|
|
+ JobAdvertisedReqVO.builder().status(JobStatusEnum.ENABLE.getStatus()).build()
|
|
|
);
|
|
|
List<JobAdvertisedRespVO> respList = JobAdvertisedConvert.INSTANCE.convertList7(list);
|
|
|
+ if(CollUtil.isNotEmpty(respList)) {
|
|
|
+ graphApi.receiveData(GraphQueryPageDTO.builder().type(SyncConstants.JOB).build()).getCheckedData();
|
|
|
+ }
|
|
|
for (JobAdvertisedRespVO resp : respList) {
|
|
|
// 设置字典真实值
|
|
|
resp.setType(DictFrameworkUtils.getDictDataLabel(MENDUNER_JOB_TYPE, resp.getType()));
|
|
@@ -369,15 +368,20 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
resp.setStatus(DictFrameworkUtils.getDictDataLabel(MENDUNER_JOB_STATUS, resp.getStatus()));
|
|
|
// TODO 暂时不要
|
|
|
resp.setContent(null);
|
|
|
- }
|
|
|
+ // 瘦身
|
|
|
+ String requirement = HtmlUtil.cleanHtmlTag(resp.getRequirement())
|
|
|
+ .replaceAll("[\r\n]+", "")
|
|
|
+ .trim();
|
|
|
+ resp.setRequirement(requirement);
|
|
|
|
|
|
- producer.send(
|
|
|
- new GraphSendDTO(
|
|
|
- SyncConstants.SYNC_ALL,
|
|
|
- SyncConstants.JOB,
|
|
|
- respList
|
|
|
- )
|
|
|
- );
|
|
|
+ producer.send(
|
|
|
+ new GraphSendDTO(
|
|
|
+ SyncConstants.ADD,
|
|
|
+ SyncConstants.JOB,
|
|
|
+ resp
|
|
|
+ )
|
|
|
+ );
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -417,7 +421,6 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
return job.getId();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 效验职位发布的编辑
|
|
|
*
|