|
@@ -1,10 +1,46 @@
|
|
|
package com.citu.module.menduner.system.controller.app.person;
|
|
|
|
|
|
+import com.citu.framework.common.pojo.CommonResult;
|
|
|
+import com.citu.framework.security.core.annotations.PreAuthenticated;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.eduexp.AppEduExpRespVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.eduexp.AppEduExpSaveReqVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.job.AppJobInterestedRespVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.job.AppJobInterestedSaveReqVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.projectexp.AppProjectExpRespVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.projectexp.AppProjectExpSaveReqVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.resume.AppPersonAdvantageSaveReqVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.resume.AppPersonInfoSaveReqVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.trainexp.AppTrainExpRespVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.trainexp.AppTrainExpSaveReqVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.vo.AppPersonSkillRespVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.vo.AppPersonSkillSaveReqVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.workexp.AppWorkExpRespVO;
|
|
|
+import com.citu.module.menduner.system.controller.app.person.workexp.AppWorkExpSaveReqVO;
|
|
|
+import com.citu.module.menduner.system.convert.*;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.eduexp.EduExpDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.job.JobInterestedDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.person.PersonSkillDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.projectexp.ProjectExpDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.trainexp.TrainExpDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.workexp.WorkExpDO;
|
|
|
+import com.citu.module.menduner.system.service.eduexp.EduExpService;
|
|
|
+import com.citu.module.menduner.system.service.job.JobInterestedService;
|
|
|
+import com.citu.module.menduner.system.service.person.info.PersonInfoService;
|
|
|
+import com.citu.module.menduner.system.service.person.skill.PersonSkillService;
|
|
|
+import com.citu.module.menduner.system.service.projectexp.ProjectExpService;
|
|
|
+import com.citu.module.menduner.system.service.trainexp.TrainExpService;
|
|
|
+import com.citu.module.menduner.system.service.workexp.WorkExpService;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.validation.Valid;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import static com.citu.framework.common.pojo.CommonResult.success;
|
|
|
|
|
|
@Tag(name = "用户端 - 人才简历")
|
|
|
@RestController
|
|
@@ -13,5 +49,197 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@Slf4j
|
|
|
public class AppPersonResumeController {
|
|
|
|
|
|
+ @Resource
|
|
|
+ private PersonInfoService personInfoService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private JobInterestedService jobInterestedService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private EduExpService eduExpService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private WorkExpService workExpService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private ProjectExpService projectExpService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private TrainExpService trainExpService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private PersonSkillService personSkillService;
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @PostMapping("/save/info")
|
|
|
+ @Operation(summary = "保存基本信息")
|
|
|
+ public CommonResult<Boolean> saveInfo(@Valid @RequestBody AppPersonInfoSaveReqVO reqVO) {
|
|
|
+ return success(personInfoService.saveInfo(reqVO));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // ========== 个人优势 ==========
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @PostMapping("/save/advantage")
|
|
|
+ @Operation(summary = "保存个人优势")
|
|
|
+ public CommonResult<Boolean> saveAdvantage(@Valid @RequestBody AppPersonAdvantageSaveReqVO reqVO) {
|
|
|
+ return success(personInfoService.saveAdvantage(reqVO));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // ========== 求职意向 ==========
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @PostMapping("/save/job/interested")
|
|
|
+ @Operation(summary = "保存求职意向")
|
|
|
+ public CommonResult<Boolean> saveJobInterested(@Valid @RequestBody AppJobInterestedSaveReqVO reqVO) {
|
|
|
+ return success(jobInterestedService.saveJobInterested(reqVO));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @DeleteMapping("/remove/job/interested")
|
|
|
+ @Operation(summary = "移除求职意向")
|
|
|
+ public CommonResult<Boolean> removeJobInterested(@RequestParam("id") Long id) {
|
|
|
+ jobInterestedService.removeJobInterested(id);
|
|
|
+ return success(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @GetMapping("/get/job/interested")
|
|
|
+ @Operation(summary = "获取求职意向")
|
|
|
+ public CommonResult<List<AppJobInterestedRespVO>> getJobInterestedList() {
|
|
|
+ List<JobInterestedDO> list = jobInterestedService.getJobInterestedList();
|
|
|
+ return success(JobInterestedConvert.INSTANCE.convertList(list));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // ========== 教育经历 ==========
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @PostMapping("/save/edu/exp")
|
|
|
+ @Operation(summary = "保存教育经历")
|
|
|
+ public CommonResult<Boolean> saveEduExp(@Valid @RequestBody AppEduExpSaveReqVO reqVO) {
|
|
|
+ return success(eduExpService.saveEduExp(reqVO));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @DeleteMapping("/remove/edu/exp")
|
|
|
+ @Operation(summary = "移除教育经历")
|
|
|
+ public CommonResult<Boolean> removeEduExp(@RequestParam("id") Long id) {
|
|
|
+ eduExpService.removeEduExp(id);
|
|
|
+ return success(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @GetMapping("/get/edu/exp")
|
|
|
+ @Operation(summary = "获取教育经历")
|
|
|
+ public CommonResult<List<AppEduExpRespVO>> getEduExp() {
|
|
|
+ List<EduExpDO> list = eduExpService.getEduExpList();
|
|
|
+ return success(EduExpConvert.INSTANCE.convertList(list));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // ========== 工作经历 ==========
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @PostMapping("/save/work/exp")
|
|
|
+ @Operation(summary = "保存工作经历")
|
|
|
+ public CommonResult<Boolean> saveWorkExp(@Valid @RequestBody AppWorkExpSaveReqVO reqVO) {
|
|
|
+ return success(workExpService.saveWorkExp(reqVO));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @DeleteMapping("/remove/work/exp")
|
|
|
+ @Operation(summary = "移除工作经历")
|
|
|
+ public CommonResult<Boolean> removeWorkExp(@RequestParam("id") Long id) {
|
|
|
+ workExpService.removeWorkExp(id);
|
|
|
+ return success(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @GetMapping("/get/work/exp")
|
|
|
+ @Operation(summary = "获取工作经历")
|
|
|
+ public CommonResult<List<AppWorkExpRespVO>> getWorkExp() {
|
|
|
+ List<WorkExpDO> list = workExpService.getWorkExpList();
|
|
|
+ return success(WorkExpConvert.INSTANCE.convertList(list));
|
|
|
+ }
|
|
|
+
|
|
|
+ // ========== 项目经历 ==========
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @PostMapping("/save/project/exp")
|
|
|
+ @Operation(summary = "保存项目经历")
|
|
|
+ public CommonResult<Boolean> saveProjectExp(@Valid @RequestBody AppProjectExpSaveReqVO reqVO) {
|
|
|
+ return success(projectExpService.saveProjectExp(reqVO));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @DeleteMapping("/remove/project/exp")
|
|
|
+ @Operation(summary = "移除项目经历")
|
|
|
+ public CommonResult<Boolean> removeProjectExp(@RequestParam("id") Long id) {
|
|
|
+ projectExpService.removeProjectExp(id);
|
|
|
+ return success(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @GetMapping("/get/project/exp")
|
|
|
+ @Operation(summary = "获取项目经历")
|
|
|
+ public CommonResult<List<AppProjectExpRespVO>> getProjectExp() {
|
|
|
+ List<ProjectExpDO> list = projectExpService.getProjectExpList();
|
|
|
+ return success(ProjectExpConvert.INSTANCE.convertList(list));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // ========== 培训经历 ==========
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @PostMapping("/save/train/exp")
|
|
|
+ @Operation(summary = "保存培训经历")
|
|
|
+ public CommonResult<Boolean> saveTrainExp(@Valid @RequestBody AppTrainExpSaveReqVO reqVO) {
|
|
|
+ return success(trainExpService.saveTrainExp(reqVO));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @DeleteMapping("/remove/train/exp")
|
|
|
+ @Operation(summary = "移除培训经历")
|
|
|
+ public CommonResult<Boolean> removeTrainExp(@RequestParam("id") Long id) {
|
|
|
+ trainExpService.removeTrainExp(id);
|
|
|
+ return success(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @GetMapping("/get/train/exp")
|
|
|
+ @Operation(summary = "获取培训经历")
|
|
|
+ public CommonResult<List<AppTrainExpRespVO>> getTrainExp() {
|
|
|
+ List<TrainExpDO> list = trainExpService.getTrainExpList();
|
|
|
+ return success(TrainExpConvert.INSTANCE.convertList(list));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // ========== 职业技能 ==========
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @PostMapping("/save/person/skill")
|
|
|
+ @Operation(summary = "保存职业技能")
|
|
|
+ public CommonResult<Boolean> savePersonSkill(@Valid @RequestBody AppPersonSkillSaveReqVO reqVO) {
|
|
|
+ return success(personSkillService.savePersonSkill(reqVO));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @DeleteMapping("/remove/person/skill")
|
|
|
+ @Operation(summary = "移除职业技能")
|
|
|
+ public CommonResult<Boolean> removePersonSkill(@RequestParam("id") Long id) {
|
|
|
+ personSkillService.removePersonSkill(id);
|
|
|
+ return success(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthenticated
|
|
|
+ @GetMapping("/get/person/skill")
|
|
|
+ @Operation(summary = "获取职业技能")
|
|
|
+ public CommonResult<List<AppPersonSkillRespVO>> getPersonSkill() {
|
|
|
+ List<PersonSkillDO> list = personSkillService.getPersonSkillList();
|
|
|
+ return success(PersonConvert.INSTANCE.convertList(list));
|
|
|
+ }
|
|
|
|
|
|
}
|