|
|
@@ -11,6 +11,7 @@ import com.jpsoft.employment.modules.job.entity.RecruitmentVO;
|
|
|
import com.jpsoft.employment.modules.job.entity.ResumeVO;
|
|
|
import com.jpsoft.employment.modules.job.service.RecruitmentCollectionService;
|
|
|
import com.jpsoft.employment.modules.job.service.RecruitmentService;
|
|
|
+import com.jpsoft.employment.modules.job.service.UserBrowseHrService;
|
|
|
import com.jpsoft.employment.modules.sys.entity.UserVO;
|
|
|
import com.jpsoft.employment.modules.sys.service.UserService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
@@ -25,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -45,6 +47,9 @@ public class RecruiterApiController {
|
|
|
@Autowired
|
|
|
private UserService userService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private UserBrowseHrService userBrowseHrService;
|
|
|
+
|
|
|
|
|
|
@PostMapping("getAboutMe")
|
|
|
@ApiOperation(value = "招聘方['我的'主页]")
|
|
|
@@ -53,8 +58,15 @@ public class RecruiterApiController {
|
|
|
//包含两部分信息:个人信息,统计信息
|
|
|
Assert.state(StringUtils.isNoneEmpty(subject),"缺少用户参数");
|
|
|
UserVO uv=userService.getUser(subject);
|
|
|
- Map<String,Object> recCount=recruitmentService.rptMyRecruitmentCount(subject); //发布的招聘个数(不含已撤销的)
|
|
|
- return null;
|
|
|
+ Map<String,Object> recRptMap=recruitmentService.rptMyRecruitmentCount(subject); //发布的招聘个数(不含已撤销的)
|
|
|
+ Integer hrBrowseResumeCount=userBrowseHrService.rptHrBrowseCount(subject); //统计hr浏览的简历数量
|
|
|
+ if(recRptMap==null){
|
|
|
+ recRptMap=new HashMap<String,Object>(2);
|
|
|
+ }
|
|
|
+ recRptMap.put("hr",uv);
|
|
|
+ recRptMap.put("browseResumeCount",hrBrowseResumeCount);
|
|
|
+ //recCount:职位个数;readTimes:职位被浏览量;browseResumeCount:hr浏览简历数量;hr:hr个人信息
|
|
|
+ return MessageResultBuilder.ok(recRptMap);
|
|
|
}
|
|
|
catch(Exception ex){
|
|
|
log.error(ex.getMessage());
|
|
|
@@ -76,7 +88,7 @@ public class RecruiterApiController {
|
|
|
|
|
|
try{
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
- sortList.add(new Sort("update_time","desc"));
|
|
|
+ sortList.add(new Sort("updateTime","desc"));
|
|
|
Page<RecruitmentVO> page = recruitmentService.loadForRecruiter(MapUtils.builder("recruiter",subject,"status",status),pageIndex,pageSize,true,sortList);
|
|
|
return MessageResultBuilder.ok(PojoUtils.pageWrapper(page));
|
|
|
}
|