|
@@ -23,6 +23,8 @@ import javax.annotation.Resource;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
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.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
import static com.citu.module.menduner.system.enums.ErrorCodeConstants.MDE_JOB_ADVERTISED_NOT_EXISTS;
|
|
import static com.citu.module.menduner.system.enums.ErrorCodeConstants.MDE_JOB_ADVERTISED_NOT_EXISTS;
|
|
@@ -264,17 +266,21 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public PageResult<AppJobAdvertisedRespVO> getRecommendedJobPage(PageParam pageParam) {
|
|
public PageResult<AppJobAdvertisedRespVO> getRecommendedJobPage(PageParam pageParam) {
|
|
- return generate();
|
|
|
|
|
|
+ return jobAdvertisedMapper.selectPage(pageParam);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public PageResult<AppJobAdvertisedRespVO> getLatestJobPage(PageParam pageParam) {
|
|
public PageResult<AppJobAdvertisedRespVO> getLatestJobPage(PageParam pageParam) {
|
|
- return generate();
|
|
|
|
|
|
+ return jobAdvertisedMapper.selectPage(pageParam);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public PageResult<AppJobAdvertisedRespVO> getUrgentJobPage(PageParam pageParam) {
|
|
public PageResult<AppJobAdvertisedRespVO> getUrgentJobPage(PageParam pageParam) {
|
|
- return generate();
|
|
|
|
|
|
+ return jobAdvertisedMapper.selectPage(pageParam);
|
|
|
|
+ }
|
|
|
|
+ @Override
|
|
|
|
+ public PageResult<AppJobAdvertisedRespVO> getAcquaintedJobAdvertised(AppJobAdvertisedPageReqVO pageReqVO) {
|
|
|
|
+ return jobAdvertisedMapper.selectPage(pageReqVO);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -377,71 +383,10 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public AppJobAdvertisedDetailRespVO getJobAdvertisedDetail(Long id) {
|
|
public AppJobAdvertisedDetailRespVO getJobAdvertisedDetail(Long id) {
|
|
-//
|
|
|
|
-// AppJobAdvertisedDetailRespVO respVO = new AppJobAdvertisedDetailRespVO();
|
|
|
|
-// respVO.setId(id);
|
|
|
|
-// respVO.setUserId(1L);
|
|
|
|
-// respVO.setEnterpriseId(1L);
|
|
|
|
-// respVO.setAreaId(110000L);
|
|
|
|
-// respVO.setPositionId(1L);
|
|
|
|
-// respVO.setPayFrom(BigDecimal.valueOf(5));
|
|
|
|
-// respVO.setPayTo(BigDecimal.valueOf(12));
|
|
|
|
-// respVO.setPayUnit(2);
|
|
|
|
-// respVO.setName("项目经理");
|
|
|
|
-// respVO.setExpType(0);
|
|
|
|
-// respVO.setEduType(0);
|
|
|
|
-// respVO.setTagList(ListUtil.of("无经验要求", "金融产品", "不限", "不接受居家办公", "教育培训", "互联网金融"));
|
|
|
|
-//
|
|
|
|
-// String content = "参与微信搜一搜公众号搜索、小程序搜索、视频号搜索、官方区(比如搜北大)、服务搜索(比如搜洗车、身份证、违章查询)、富展现Box(比如搜宝马320、桂林天气)等业务的算法研发。\n" +
|
|
|
|
-// "可能参与的工作方向:\n" +
|
|
|
|
-// "1. 检索召回方向:包括Query理解、非必留、query改写、基础相关性、服务链接爬取、服务可用性计算等\n" +
|
|
|
|
-// "2. query意图识别方向:服务知识图谱、Query成份解析、服务相关性、自动意图识别、相似Query扩散、预训练语言模型等。\n" +
|
|
|
|
-// "3. 搜索排序方向:机构知识图谱、寻址相关性、搜索排序、点击率预估、转化率预估等。\n";
|
|
|
|
-// respVO.setContent(content);
|
|
|
|
-//
|
|
|
|
-// String requirement = "计算机、机器学习和数学等相关专业,硕士及以上学历;\n" +
|
|
|
|
-// "对数据有理解意识、有洞察力;\n" +
|
|
|
|
-// "针对具体业务问题建模能力强;\n" +
|
|
|
|
-// "极强的手速、研发能力强;\n" +
|
|
|
|
-// "如果具有扎实的机器学习、深度学习和自然语言处理方向的理论和实践基, 会是加分项;\n" +
|
|
|
|
-// "如果熟练掌握一种深度学习和深度学习框架(如 Tensorflow/PyTorch/Caffe 等),会是加分项。";
|
|
|
|
-// respVO.setRequirement(requirement);
|
|
|
|
-//
|
|
|
|
-// respVO.setAddress("广州海珠区广州T.I.T创意园B5栋");
|
|
|
|
-//
|
|
|
|
-// respVO.setLongitude("113.32531");
|
|
|
|
-// respVO.setLatitude("23.099613");
|
|
|
|
-//
|
|
|
|
-// respVO.setStatus(MendunerStatusEnum.ENABLE.getStatus());
|
|
|
|
-//
|
|
|
|
-// respVO.setCreateTime(LocalDateTime.now());
|
|
|
|
-// respVO.setUpdateTime(LocalDateTime.now());
|
|
|
|
-//
|
|
|
|
-// AppEnterpriseSimpleRespVO enterpriseSimpleRespVO = new AppEnterpriseSimpleRespVO();
|
|
|
|
-// enterpriseSimpleRespVO.setId(1L);
|
|
|
|
-// enterpriseSimpleRespVO.setName("广州门墩儿科技有限公司");
|
|
|
|
-// enterpriseSimpleRespVO.setAnotherName("门墩儿科技");
|
|
|
|
-// enterpriseSimpleRespVO.setIndustryId(1L);
|
|
|
|
-// enterpriseSimpleRespVO.setScale(0);
|
|
|
|
-// enterpriseSimpleRespVO.setFinancingStatus(0);
|
|
|
|
-// enterpriseSimpleRespVO.setLogoUrl("https://www.menduner.com/static/img/loginlogo2.7924c12.png");
|
|
|
|
-//
|
|
|
|
-// respVO.setEnterprise(enterpriseSimpleRespVO);
|
|
|
|
-// respVO.setJobAdvertisedNum(9);
|
|
|
|
-//
|
|
|
|
-// AppEnterpriseUserContactRespVO contactRespVO = new AppEnterpriseUserContactRespVO();
|
|
|
|
-// contactRespVO.setAvatar("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F5bbef4cc-6268-46d9-87b3-3aa7d2168aad%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1718339519&t=6ff0d47abd90d209ca81b671e898deb8");
|
|
|
|
-// contactRespVO.setUserId(1L);
|
|
|
|
-// contactRespVO.setEnterpriseId(1L);
|
|
|
|
-// contactRespVO.setPostCode("HR");
|
|
|
|
-// contactRespVO.setPostNameCn("人事经理");
|
|
|
|
-// contactRespVO.setPostNameEn("uman resources");
|
|
|
|
-// contactRespVO.setName("肖女士");
|
|
|
|
-//
|
|
|
|
-// respVO.setContact(contactRespVO);
|
|
|
|
-
|
|
|
|
JobAdvertisedDO job = jobAdvertisedMapper.selectById(id);
|
|
JobAdvertisedDO job = jobAdvertisedMapper.selectById(id);
|
|
if (null == job) {
|
|
if (null == job) {
|
|
throw exception(MDE_JOB_ADVERTISED_NOT_EXISTS);
|
|
throw exception(MDE_JOB_ADVERTISED_NOT_EXISTS);
|
|
@@ -463,10 +408,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
return respVO;
|
|
return respVO;
|
|
}
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
|
- public PageResult<AppJobAdvertisedRespVO> getAcquaintedJobAdvertised(AppJobAdvertisedPageReqVO pageReqVO) {
|
|
|
|
- return generate();
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public PageResult<AppJobAdvertisedSearchRespVO> search(AppJobAdvertisedSearchPageReqVO reqVO) {
|
|
public PageResult<AppJobAdvertisedSearchRespVO> search(AppJobAdvertisedSearchPageReqVO reqVO) {
|
|
@@ -519,11 +461,18 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
@Override
|
|
@Override
|
|
public List<AppCommonRespVO> getJobPositionCountByEnterpriseId(Long enterpriseId) {
|
|
public List<AppCommonRespVO> getJobPositionCountByEnterpriseId(Long enterpriseId) {
|
|
List<AppCommonRespVO> list = new ArrayList<>();
|
|
List<AppCommonRespVO> list = new ArrayList<>();
|
|
- for (int i = 1; i < 5; i++) {
|
|
|
|
- AppCommonRespVO respVO = new AppCommonRespVO();
|
|
|
|
- respVO.setKey("" + i);
|
|
|
|
- respVO.setValue("" + i);
|
|
|
|
- list.add(respVO);
|
|
|
|
|
|
+ List<JobAdvertisedDO> jobList = jobAdvertisedMapper
|
|
|
|
+ .selectList(JobAdvertisedDO::getEnterpriseId, enterpriseId);
|
|
|
|
+ // 分组
|
|
|
|
+ Map<Long, Long> groupedMap = jobList.stream()
|
|
|
|
+ .collect(
|
|
|
|
+ Collectors.groupingBy(JobAdvertisedDO::getPositionId, Collectors.counting())
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ for (Map.Entry<Long, Long> entry : groupedMap.entrySet()) {
|
|
|
|
+ list.add(AppCommonRespVO.builder()
|
|
|
|
+ .key(entry.getKey().toString())
|
|
|
|
+ .value(entry.getValue().toString()).build());
|
|
}
|
|
}
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|
|
@@ -531,11 +480,18 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
@Override
|
|
@Override
|
|
public List<AppCommonRespVO> getJobAreaCountByEnterpriseId(Long enterpriseId) {
|
|
public List<AppCommonRespVO> getJobAreaCountByEnterpriseId(Long enterpriseId) {
|
|
List<AppCommonRespVO> list = new ArrayList<>();
|
|
List<AppCommonRespVO> list = new ArrayList<>();
|
|
- for (int i = 1; i < 5; i++) {
|
|
|
|
- AppCommonRespVO respVO = new AppCommonRespVO();
|
|
|
|
- respVO.setKey("" + i);
|
|
|
|
- respVO.setValue("" + i);
|
|
|
|
- list.add(respVO);
|
|
|
|
|
|
+ List<JobAdvertisedDO> jobList = jobAdvertisedMapper
|
|
|
|
+ .selectList(JobAdvertisedDO::getEnterpriseId, enterpriseId);
|
|
|
|
+ // 分组
|
|
|
|
+ Map<Long, Long> groupedMap = jobList.stream()
|
|
|
|
+ .collect(
|
|
|
|
+ Collectors.groupingBy(JobAdvertisedDO::getAreaId, Collectors.counting())
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ for (Map.Entry<Long, Long> entry : groupedMap.entrySet()) {
|
|
|
|
+ list.add(AppCommonRespVO.builder()
|
|
|
|
+ .key(entry.getKey().toString())
|
|
|
|
+ .value(entry.getValue().toString()).build());
|
|
}
|
|
}
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|