|
@@ -6,8 +6,6 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestAttribute;
|
|
@@ -18,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
import com.github.pagehelper.Page;
|
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.employment.modules.common.dto.MessageResultBuilder;
|
|
|
+import com.jpsoft.employment.modules.common.dto.MessageResultSimple;
|
|
|
import com.jpsoft.employment.modules.common.dto.Sort;
|
|
|
import com.jpsoft.employment.modules.common.utils.MapUtils;
|
|
|
import com.jpsoft.employment.modules.common.utils.PojoUtils;
|
|
@@ -25,6 +24,7 @@ import com.jpsoft.employment.modules.job.entity.RecruitmentVO;
|
|
|
import com.jpsoft.employment.modules.job.service.JobUserService;
|
|
|
import com.jpsoft.employment.modules.job.service.RecruitmentCollectionService;
|
|
|
import com.jpsoft.employment.modules.job.service.RecruitmentService;
|
|
|
+import com.jpsoft.employment.modules.job.service.ResumeService;
|
|
|
import com.jpsoft.employment.modules.job.service.UserBrowseHrService;
|
|
|
import com.jpsoft.employment.modules.sys.entity.UserVO;
|
|
|
import com.jpsoft.employment.modules.sys.service.UserService;
|
|
@@ -43,8 +43,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
@Api(tags = "移动端接口:招聘方相关接口")
|
|
|
public class RecruiterApiController {
|
|
|
|
|
|
- private Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private RecruitmentService recruitmentService;
|
|
|
|
|
@@ -60,6 +59,9 @@ public class RecruiterApiController {
|
|
|
@Autowired
|
|
|
private JobUserService jobUserService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ResumeService resumeService;
|
|
|
+
|
|
|
|
|
|
@PostMapping("getAboutMe")
|
|
|
@ApiOperation(value = "招聘方['我的'主页]")
|
|
@@ -90,7 +92,7 @@ public class RecruiterApiController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "status", value = "招聘信息状态(publish:招聘中;approve:审核中;close:已下架)", required = true, paramType = "form")
|
|
|
})
|
|
|
- public MessageResult<Map<String,Object>> loadOwnRecruitments(@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
+ public MessageResultSimple loadOwnRecruitments(@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
@RequestParam(value="pageSize",defaultValue="20") int pageSize,
|
|
|
@RequestParam(value="status",defaultValue="publish") String status,
|
|
|
@RequestAttribute String subject
|
|
@@ -100,11 +102,33 @@ public class RecruiterApiController {
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
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));
|
|
|
+ return MessageResultBuilder.success(PojoUtils.pageWrapper(page));
|
|
|
}
|
|
|
catch(Exception ex){
|
|
|
log.error(ex.getMessage());
|
|
|
- return MessageResultBuilder.error(ex.getMessage());
|
|
|
+ return MessageResultBuilder.failed(ex.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("publishRecruitment")
|
|
|
+ @ApiOperation(value = "招聘方[职位管理上下架操作]")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "recruitmentId", value = "招聘记录ID", required = true, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "publishTag", value = "上下架操作[1:上架,0:下架]", required = true, paramType = "form")
|
|
|
+ })
|
|
|
+ public MessageResultSimple publishRecruitment(@RequestParam(value="recruitmentId",required = true) String recruitmentId,
|
|
|
+ @RequestParam(value="publishTag",required = true) String publishTag,
|
|
|
+ @RequestAttribute String subject
|
|
|
+ ){
|
|
|
+ try{
|
|
|
+ Assert.state(StringUtils.isNotEmpty(recruitmentId),"缺少招聘记录参数");
|
|
|
+ Assert.state("1".equals(publishTag)||"0".equals(publishTag),"未选择上下架操作");
|
|
|
+
|
|
|
+ return recruitmentService.updateForPublish(recruitmentId, publishTag,subject)?MessageResultBuilder.success("success"): MessageResultBuilder.failed("操作失败");
|
|
|
+ }
|
|
|
+ catch(Exception ex){
|
|
|
+ log.error(ex.getMessage());
|
|
|
+ return MessageResultBuilder.failed(ex.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -112,11 +136,21 @@ public class RecruiterApiController {
|
|
|
@PostMapping("loadCollectResumes")
|
|
|
@ApiOperation(value = "招聘方[收藏简历]")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "positionName", value = "职位名称关键字", required = false, paramType = "form")
|
|
|
+ @ApiImplicitParam(name = "positionName", value = "职位名称关键字", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "positionId", value = "职位类别id值", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "education", value = "学历编码值", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "workExp", value = "工作经验编码值", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "dreamMoney", value = "期望月薪编码值", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "jobStatus", value = "工作状态编码值", required = false, paramType = "form")
|
|
|
})
|
|
|
- public MessageResult<Map> loadCollectResumes(@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
+ public MessageResultSimple loadCollectResumes(@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
@RequestParam(value="pageSize",defaultValue="20") int pageSize,
|
|
|
@RequestParam(value="positionName",required = false) String positionName,
|
|
|
+ @RequestParam(value="positionId",required = false) String positionId,
|
|
|
+ @RequestParam(value="education",required = false) String education,
|
|
|
+ @RequestParam(value="workExp",required = false) String workExp,
|
|
|
+ @RequestParam(value="dreamMoney",required = false) String dreamMoney,
|
|
|
+ @RequestParam(value="jobStatus",required = false) String jobStatus,
|
|
|
@RequestAttribute String subject
|
|
|
) {
|
|
|
|
|
@@ -124,13 +158,32 @@ public class RecruiterApiController {
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("collectionTime","desc"));
|
|
|
positionName=StringUtils.isEmpty(positionName)?null:("%"+positionName+"%");
|
|
|
- Page<Map<String,Object>> page = recruitmentCollectionService.pagedLoadCollectResumes(MapUtils.builder("recruiterId",subject,"positionName",positionName),pageIndex,pageSize,true,sortList);
|
|
|
- return MessageResultBuilder.ok(PojoUtils.pageWrapper(page));
|
|
|
+ Map<String,Object> args=MapUtils.builder("recruiterId",subject,"positionId",positionId,"positionName",positionName,"education",education,"workExp",workExp,"dreamMoney",dreamMoney,"jobStatus",jobStatus);
|
|
|
+ Page<Map<String,Object>> page = recruitmentCollectionService.pagedLoadCollectResumes(args,pageIndex,pageSize,true,sortList);
|
|
|
+ return MessageResultBuilder.success(PojoUtils.pageWrapper(page));
|
|
|
}
|
|
|
catch(Exception ex){
|
|
|
log.error(ex.getMessage());
|
|
|
- return MessageResultBuilder.error(ex.getMessage());
|
|
|
+ return MessageResultBuilder.failed(ex.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("cancelCollectResume")
|
|
|
+ @ApiOperation(value = "招聘方[收藏简历] 取消收藏")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "resumeId", value = "简历记录主键", required = true, paramType = "form")
|
|
|
+ })
|
|
|
+ public MessageResultSimple cancelCollectResume(@RequestParam(value="resumeId",required = true) String resumeId, @RequestAttribute String subject) {
|
|
|
+ try{
|
|
|
+ Assert.state(StringUtils.isNoneEmpty(subject),"缺少登录信息");
|
|
|
+ recruitmentCollectionService.updateCancelCollect(resumeId,subject);
|
|
|
+ return MessageResultBuilder.success("success");
|
|
|
+ }
|
|
|
+ catch(Exception ex){
|
|
|
+ log.error(ex.getMessage());
|
|
|
+ return MessageResultBuilder.failed(ex.getMessage());
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -138,12 +191,22 @@ public class RecruiterApiController {
|
|
|
@ApiOperation(value = "招聘方[招聘主页]")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "positionName", value = "职位名称关键字", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "positionId", value = "职位类别id值", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "education", value = "学历编码值", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "workExp", value = "工作经验编码值", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "dreamMoney", value = "期望月薪编码值", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "jobStatus", value = "工作状态编码值", required = false, paramType = "form"),
|
|
|
@ApiImplicitParam(name = "orderType", value = "排序类别[new:最新,hot:最热]", required = false, paramType = "form")
|
|
|
})
|
|
|
- public MessageResult<Map> loadAllResumes(@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
+ public MessageResultSimple loadAllResumes(@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
@RequestParam(value="pageSize",defaultValue="20") int pageSize,
|
|
|
@RequestParam(value="orderType",defaultValue="new") String orderType,
|
|
|
- @RequestParam(value="positionName",required = false) String positionName
|
|
|
+ @RequestParam(value="positionName",required = false) String positionName,
|
|
|
+ @RequestParam(value="positionId",required = false) String positionId,
|
|
|
+ @RequestParam(value="education",required = false) String education,
|
|
|
+ @RequestParam(value="workExp",required = false) String workExp,
|
|
|
+ @RequestParam(value="dreamMoney",required = false) String dreamMoney,
|
|
|
+ @RequestParam(value="jobStatus",required = false) String jobStatus
|
|
|
) {
|
|
|
|
|
|
try{
|
|
@@ -155,20 +218,20 @@ public class RecruiterApiController {
|
|
|
sortList.add(new Sort("update_time","desc"));
|
|
|
}
|
|
|
positionName=StringUtils.isEmpty(positionName)?null:("%"+positionName+"%");
|
|
|
- Page<Map<String,Object>> page = recruitmentCollectionService.pagedLoadAllResumes(MapUtils.builder("positionName",positionName),pageIndex,pageSize,true,sortList);
|
|
|
- return MessageResultBuilder.ok(PojoUtils.pageWrapper(page));
|
|
|
+ Map<String,Object> args=MapUtils.builder("positionId",positionId,"positionName",positionName,"education",education,"workExp",workExp,"dreamMoney",dreamMoney,"jobStatus",jobStatus);
|
|
|
+
|
|
|
+ Page<Map<String,Object>> page = recruitmentCollectionService.pagedLoadAllResumes(args,pageIndex,pageSize,true,sortList);
|
|
|
+ return MessageResultBuilder.success(PojoUtils.pageWrapper(page));
|
|
|
}
|
|
|
catch(Exception ex){
|
|
|
log.error(ex.getMessage());
|
|
|
- return MessageResultBuilder.error(ex.getMessage());
|
|
|
+ return MessageResultBuilder.failed(ex.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@PostMapping("loadInterestList")
|
|
|
@ApiOperation(value = "招聘方[对您感兴趣]")
|
|
|
- @ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "id", value = "id", required = false, paramType = "form")
|
|
|
- })
|
|
|
public MessageResult<Map> loadInterestList(
|
|
|
String id,String token,
|
|
|
@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
@@ -181,7 +244,7 @@ public class RecruiterApiController {
|
|
|
Map<String,Object> searchParams = new HashMap<>();
|
|
|
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
- sortList.add(new Sort("jre.create_time","desc"));
|
|
|
+ sortList.add(new Sort("jub.create_time","desc"));
|
|
|
|
|
|
if (StringUtils.isNotEmpty(id)) {
|
|
|
searchParams.put("id","%" + id + "%");
|
|
@@ -194,4 +257,38 @@ public class RecruiterApiController {
|
|
|
|
|
|
return msgResult;
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("loadJobManagement")
|
|
|
+ @ApiOperation(value = "招聘方[求职管理]")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "type", value = "类型(1:已投递,2:邀沟通,3:邀面试,4:邀入职,5:已入职,6:不合适)", required = false, paramType = "query")
|
|
|
+ })
|
|
|
+ public MessageResult<Map> loadJobManagement(
|
|
|
+ String id,String token,String type,
|
|
|
+ @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
+ @RequestParam(value="pageSize",defaultValue="20") int pageSize,
|
|
|
+ @RequestAttribute String subject) {
|
|
|
+ System.out.println(subject);
|
|
|
+
|
|
|
+ MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
+
|
|
|
+ Map<String,Object> searchParams = new HashMap<>();
|
|
|
+
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
+ sortList.add(new Sort("jrd.create_time","desc"));
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(id)) {
|
|
|
+ searchParams.put("id","%" + id + "%");
|
|
|
+ }
|
|
|
+
|
|
|
+ searchParams.put("type",type);
|
|
|
+
|
|
|
+ Page<Map> page = resumeService.foundJobManagement(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
+
|
|
|
+ msgResult.setResult(true);
|
|
|
+ msgResult.setData(PojoUtils.pageWrapper(page));
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
+
|
|
|
}
|