diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentResult.java b/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentResult.java index a827de9..9d98ce4 100644 --- a/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentResult.java +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentResult.java @@ -71,4 +71,16 @@ public class TalentResult { @HideColumn(selectShow = false) private Integer publicity; + @ApiModelProperty(value = "地址", required = true, example = "") + private String address; + + @ApiModelProperty(value = "省份", required = true, example = "") + private Long provinceId; + + @ApiModelProperty(value = "城市", required = true, example = "") + private Long cityId; + + @ApiModelProperty(value = "区县", required = true, example = "") + private Long areaId; + } \ No newline at end of file diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/json/api/center/ResTalentQueryParam.java b/boot-nunu/src/main/java/com/softwarebr/nunu/json/api/center/ResTalentQueryParam.java new file mode 100644 index 0000000..64e67ac --- /dev/null +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/json/api/center/ResTalentQueryParam.java @@ -0,0 +1,47 @@ +package com.softwarebr.nunu.json.api.center; + +import com.brframework.commondb.annotation.param.ParamQuery; +import com.brframework.commondb.annotation.param.QueryExpression; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author lilin + * @date 2020/2/26 10:26 + * @description: + */ +@Data +@ApiModel +public class ResTalentQueryParam { + + @ParamQuery + @ApiModelProperty(value = "省份", example = "") + private Long provinceId; + + @ParamQuery + @ApiModelProperty(value = "城市", example = "") + private Long cityId; + + @ParamQuery + @ApiModelProperty(value = "区县", example = "") + private Long areaId; + + + @ParamQuery(expression = QueryExpression.like) + @ApiModelProperty(value = "擅长领域", example = "") + private String expertise; + + @ParamQuery + @ApiModelProperty(value = "发布者", hidden = true, example = "") + private Long publisher; + + @ParamQuery + @ApiModelProperty(value = "删除标记0.已删除 1.未删除", hidden = true, example = "") + private Integer marker; + + @ParamQuery + @ApiModelProperty(value = "是否上架(0下架 1上架) ", hidden = true, example = "") + private Integer upperStatus; + +} diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/json/api/center/TalentQueryParam.java b/boot-nunu/src/main/java/com/softwarebr/nunu/json/api/center/TalentQueryParam.java new file mode 100644 index 0000000..09add9a --- /dev/null +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/json/api/center/TalentQueryParam.java @@ -0,0 +1,28 @@ +package com.softwarebr.nunu.json.api.center; + +import com.brframework.commondb.annotation.param.ParamQuery; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author lilin + * @date 2020/2/26 10:26 + * @description: + */ +@Data +@ApiModel +public class TalentQueryParam { + + @ParamQuery + @ApiModelProperty(value = "审核状态(1待审核 2审核通过 3审核不通过)", example = "") + private Integer verify; + + @ParamQuery + @ApiModelProperty(value = "发布者", hidden = true, example = "") + private Long publisher; + + @ParamQuery + @ApiModelProperty(value = "删除标记0.已删除 1.未删除", hidden = true, example = "") + private Integer marker; +} diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/TalentService.java b/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/TalentService.java index 4d1499c..c8d0278 100644 --- a/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/TalentService.java +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/TalentService.java @@ -15,12 +15,12 @@ public interface TalentService extends EntityService { /** * 保存 */ - void saveTalent(Long publisher, TalentParamDTO talentParamDTO); + Talent saveTalent(Long publisher, TalentParamDTO talentParamDTO); /** * 更新 */ - void updateTalent(Long id, TalentParamDTO talentParamDTO); + Talent updateTalent(Long id, TalentParamDTO talentParamDTO); /** * 上架 diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/impl/TalentServiceImpl.java b/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/impl/TalentServiceImpl.java index 4ecc73f..cf87b53 100644 --- a/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/impl/TalentServiceImpl.java +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/impl/TalentServiceImpl.java @@ -44,7 +44,7 @@ public class TalentServiceImpl extends AbstractEntityService> requestProjectPageV1(PageParam page, ApiProjectQueryParam param) { @@ -117,6 +122,20 @@ public class ApiResController { return JSONResult.ok(propertyResultPage); } + @ApiOperation(value = "我的人才库简历列表") + @GetMapping("access/v1/center/request/talent/page") + public JSONResult> requestTalentPageV1(PageParam page, TalentQueryParam param) { + param.setMarker(SystemConst.MARKER_STATUS_NO); + param.setPublisher(Long.valueOf(SecurityContextHolder.getSubject().getId())); + Page talentResultPage = ControllerPageHandle.jpaPageConvertToPage(talentService.page(page, param), page, TalentResult.class); + for (TalentResult talentResult : talentResultPage.getList()) { + talentResult.setVerifyTitle(SystemConst.verifyHandle(talentResult.getVerify())); + talentResult.setUpperTitle(SystemConst.statusUpperHandle(talentResult.getUpperStatus())); + talentResult.setPublicityTitle(SystemConst.publicityHandle(talentResult.getPublicity())); + } + return JSONResult.ok(talentResultPage); + } + @ApiOperation(value = "修改项目需求对接状态") @PostMapping("access/v1/center/request/project/{projectId}") public JSONResult requestProjectUpdateV1(@PathVariable Long projectId, @Valid @RequestBody ProjectStatusParam param) { @@ -309,7 +328,7 @@ public class ApiResController { return JSONResult.ok(propertyResult); } - @ApiOperation(value = "招聘资源审核结果") + @ApiOperation(value = "载体资源审核结果") @GetMapping("access/v1/center/request/property/result/{id}") public JSONResult propertyVerifyV1(@ApiParam("载体资源id") @PathVariable Long id) { VerifyResult verifyResult = ControllerPageHandle.convertTo(propertyService.accessObject(id), VerifyResult.class); @@ -332,4 +351,61 @@ public class ApiResController { return JSONResult.ok(inviteResultPage); } + @ApiOperation(value = "人才库资源列表") + @GetMapping("access/v1/center/request/res/talent/page") + public JSONResult> talentPageV1(PageParam page, ResTalentQueryParam param) { + param.setMarker(SystemConst.MARKER_STATUS_NO); + param.setUpperStatus(SystemConst.STATUS_UPPER_SHELF); + if (StringUtils.isNotEmpty(param.getExpertise())) { + searchService.increasingScore(param.getExpertise()); + } + Page talentResultPage = ControllerPageHandle.jpaPageConvertToPage(talentService.page(page, param), page, TalentResult.class); + for (TalentResult talentResult : talentResultPage.getList()) { + talentResult.setAddress(areaService.addressSplicing(talentResult.getProvinceId(), talentResult.getCityId(), talentResult.getAreaId())); + } + return JSONResult.ok(talentResultPage); + } + + @ApiOperation(value = "查看人才简历信息", notes = "查看简历信息", produces = "text/plain") + @GetMapping("access/v1/center/request/talent/details/{id}") + public JSONResult getTalent(@ApiParam("简历Id")@PathVariable Long id) { + Talent talent = talentService.accessObject(id); + TalentDetailsResult talentDetailsResult = convertTo(talent, TalentDetailsResult.class); + talentDetailsResult.setArea(areaService.accessObject(talent.getAreaId()).getCityName()); + talentDetailsResult.setCity(areaService.accessObject(talent.getCityId()).getCityName()); + talentDetailsResult.setProvince(areaService.accessObject(talent.getProvinceId()).getCityName()); + + return JSONResult.ok(talentDetailsResult); + } + + + @ApiOperation(value = "需求发布-人才库简历") + @PutMapping("access/v1/center/request/talent") + public JSONResult talentCreateV1(@Valid @RequestBody TalentParam param) { + Long memberId = Long.valueOf(SecurityContextHolder.getSubject().getId()); + + TalentParamDTO talentParamDTO = convertTo(param, TalentParamDTO.class); + Talent talent = talentService.saveTalent(memberId, talentParamDTO); + TalentResult talentResult = ControllerPageHandle.convertTo(talent, TalentResult.class); + return JSONResult.ok(talentResult); + } + + + @ApiOperation(value = "修改需求发布-人才库简历") + @PutMapping("access/v1/center/request/talentEditV1/{id}") + public JSONResult talentEditV1(@PathVariable Long id, @Valid @RequestBody TalentParam param) { + Long memberId = Long.valueOf(SecurityContextHolder.getSubject().getId()); + + TalentParamDTO talentParamDTO = convertTo(param, TalentParamDTO.class); + TalentResult talentResult = ControllerPageHandle.convertTo(talentService.updateTalent(id, talentParamDTO), TalentResult.class); + return JSONResult.ok(talentResult); + } + + @ApiOperation(value = "人才库简历资源审核结果") + @GetMapping("access/v1/center/request/talent/result/{id}") + public JSONResult talentVerifyV1(@ApiParam("简历Id") @PathVariable Long id) { + VerifyResult verifyResult = ControllerPageHandle.convertTo(talentService.accessObject(id), VerifyResult.class); + return JSONResult.ok(verifyResult); + } + } \ No newline at end of file -- libgit2 0.21.2