浏览代码

1、规范接口地址名

rayson 1 年之前
父节点
当前提交
21f5211786

+ 2 - 0
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/app/job/AppJobCvRelController.java

@@ -38,4 +38,6 @@ public class AppJobCvRelController {
         return success(jobCvRelService.checkSend(jobId));
     }
 
+
+
 }

+ 23 - 16
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/app/person/AppPersonResumeController.java

@@ -78,17 +78,24 @@ public class AppPersonResumeController {
     private CvAttachmentService cvAttachmentService;
 
     @PreAuthenticated
-    @PostMapping("/save/info")
+    @PostMapping("/info/save")
     @Operation(summary = "保存基本信息")
     public CommonResult<Boolean> saveInfo(@Valid @RequestBody AppPersonInfoSaveReqVO reqVO) {
         return success(personInfoService.saveInfo(reqVO));
     }
 
+    @PreAuthenticated
+    @PostMapping("/job/status/update")
+    @Operation(summary = "修改求职类型")
+    public CommonResult<Boolean> updateJobStatus(@RequestParam("status") String status) {
+        return success(personInfoService.updateJobStatus(status));
+    }
+
 
     // ========== 个人优势 ==========
 
     @PreAuthenticated
-    @PostMapping("/save/advantage")
+    @PostMapping("/advantage/save")
     @Operation(summary = "保存个人优势")
     public CommonResult<Boolean> saveAdvantage(@Valid @RequestBody AppPersonAdvantageSaveReqVO reqVO) {
         return success(personInfoService.saveAdvantage(reqVO));
@@ -98,14 +105,14 @@ public class AppPersonResumeController {
     // ========== 求职意向 ==========
 
     @PreAuthenticated
-    @PostMapping("/save/job/interested")
+    @PostMapping("/job/interested/save")
     @Operation(summary = "保存求职意向")
     public CommonResult<Boolean> saveJobInterested(@Valid @RequestBody AppJobInterestedSaveReqVO reqVO) {
         return success(jobInterestedService.saveJobInterested(reqVO));
     }
 
     @PreAuthenticated
-    @DeleteMapping("/remove/job/interested")
+    @DeleteMapping("/job/interested/remove")
     @Operation(summary = "移除求职意向")
     public CommonResult<Boolean> removeJobInterested(@RequestParam("id") Long id) {
         jobInterestedService.removeJobInterested(id);
@@ -124,14 +131,14 @@ public class AppPersonResumeController {
     // ========== 教育经历 ==========
 
     @PreAuthenticated
-    @PostMapping("/save/edu/exp")
+    @PostMapping("/edu/exp/save")
     @Operation(summary = "保存教育经历")
     public CommonResult<Boolean> saveEduExp(@Valid @RequestBody AppEduExpSaveReqVO reqVO) {
         return success(eduExpService.saveEduExp(reqVO));
     }
 
     @PreAuthenticated
-    @DeleteMapping("/remove/edu/exp")
+    @DeleteMapping("/edu/exp/remove")
     @Operation(summary = "移除教育经历")
     public CommonResult<Boolean> removeEduExp(@RequestParam("id") Long id) {
         eduExpService.removeEduExp(id);
@@ -150,14 +157,14 @@ public class AppPersonResumeController {
     // ========== 工作经历 ==========
 
     @PreAuthenticated
-    @PostMapping("/save/work/exp")
+    @PostMapping("/work/exp/save")
     @Operation(summary = "保存工作经历")
     public CommonResult<Boolean> saveWorkExp(@Valid @RequestBody AppWorkExpSaveReqVO reqVO) {
         return success(workExpService.saveWorkExp(reqVO));
     }
 
     @PreAuthenticated
-    @DeleteMapping("/remove/work/exp")
+    @DeleteMapping("/work/exp/remove")
     @Operation(summary = "移除工作经历")
     public CommonResult<Boolean> removeWorkExp(@RequestParam("id") Long id) {
         workExpService.removeWorkExp(id);
@@ -175,14 +182,14 @@ public class AppPersonResumeController {
     // ========== 项目经历 ==========
 
     @PreAuthenticated
-    @PostMapping("/save/project/exp")
+    @PostMapping("/project/exp/save")
     @Operation(summary = "保存项目经历")
     public CommonResult<Boolean> saveProjectExp(@Valid @RequestBody AppProjectExpSaveReqVO reqVO) {
         return success(projectExpService.saveProjectExp(reqVO));
     }
 
     @PreAuthenticated
-    @DeleteMapping("/remove/project/exp")
+    @DeleteMapping("/project/exp/remove")
     @Operation(summary = "移除项目经历")
     public CommonResult<Boolean> removeProjectExp(@RequestParam("id") Long id) {
         projectExpService.removeProjectExp(id);
@@ -201,14 +208,14 @@ public class AppPersonResumeController {
     // ========== 培训经历 ==========
 
     @PreAuthenticated
-    @PostMapping("/save/train/exp")
+    @PostMapping("/train/exp/save")
     @Operation(summary = "保存培训经历")
     public CommonResult<Boolean> saveTrainExp(@Valid @RequestBody AppTrainExpSaveReqVO reqVO) {
         return success(trainExpService.saveTrainExp(reqVO));
     }
 
     @PreAuthenticated
-    @DeleteMapping("/remove/train/exp")
+    @DeleteMapping("/train/exp/remove")
     @Operation(summary = "移除培训经历")
     public CommonResult<Boolean> removeTrainExp(@RequestParam("id") Long id) {
         trainExpService.removeTrainExp(id);
@@ -227,14 +234,14 @@ public class AppPersonResumeController {
     // ========== 职业技能 ==========
 
     @PreAuthenticated
-    @PostMapping("/save/person/skill")
+    @PostMapping("/person/skill/save")
     @Operation(summary = "保存职业技能")
     public CommonResult<Boolean> savePersonSkill(@Valid @RequestBody AppPersonSkillSaveReqVO reqVO) {
         return success(personSkillService.savePersonSkill(reqVO));
     }
 
     @PreAuthenticated
-    @DeleteMapping("/remove/person/skill")
+    @DeleteMapping("/person/skill/remove")
     @Operation(summary = "移除职业技能")
     public CommonResult<Boolean> removePersonSkill(@RequestParam("id") Long id) {
         personSkillService.removePersonSkill(id);
@@ -259,7 +266,7 @@ public class AppPersonResumeController {
     }
 
     @PreAuthenticated
-    @PostMapping("/save/person/cv")
+    @PostMapping("/person/cv/save")
     @Operation(summary = "保存附件")
     public CommonResult<Boolean> savePersonSkill(@Valid @RequestBody AppCvAttachmentSaveReqVO reqVO) {
         cvAttachmentService.create(reqVO);
@@ -267,7 +274,7 @@ public class AppPersonResumeController {
     }
 
     @PreAuthenticated
-    @DeleteMapping("/remove/person/cv")
+    @DeleteMapping("/person/cv/remove")
     @Operation(summary = "移除附件")
     public CommonResult<Boolean> remove(@RequestParam("id") Long id) {
         cvAttachmentService.remove(id);

+ 9 - 3
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/person/info/PersonInfoService.java

@@ -69,7 +69,7 @@ public interface PersonInfoService {
      * @param reqVO 基本信息
      * @return 保存|成功|失败
      */
-    Boolean saveInfo(@Valid @RequestBody AppPersonInfoSaveReqVO reqVO);
+    boolean saveInfo(@Valid @RequestBody AppPersonInfoSaveReqVO reqVO);
 
     /**
      * 保存简历个人优势
@@ -77,7 +77,13 @@ public interface PersonInfoService {
      * @param reqVO 个人优势
      * @return 保存|成功|失败
      */
-    Boolean saveAdvantage(@Valid @RequestBody AppPersonAdvantageSaveReqVO reqVO);
-
+    boolean saveAdvantage(@Valid @RequestBody AppPersonAdvantageSaveReqVO reqVO);
 
+    /**
+     * 修改 求职状态
+     *
+     * @param status 状态
+     * @return 保存|成功|失败
+     */
+    boolean updateJobStatus(String status);
 }

+ 15 - 2
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/person/info/PersonInfoServiceImpl.java

@@ -84,7 +84,7 @@ public class PersonInfoServiceImpl implements PersonInfoService {
 
     @Override
     @DSTransactional // 单机+多数据源方案,使用 @DSTransactional 保证本地事务,以及数据源的切换
-    public Boolean saveInfo(AppPersonInfoSaveReqVO reqVO) {
+    public boolean saveInfo(AppPersonInfoSaveReqVO reqVO) {
         Long userId = getLoginUserId();
         PersonInfoDO info = personInfoMapper.selectOne(PersonInfoDO::getUserId, userId);
         PersonInfoDO userInfo = BeanUtils.toBean(reqVO, PersonInfoDO.class);
@@ -100,7 +100,7 @@ public class PersonInfoServiceImpl implements PersonInfoService {
 
     @Override
     @DSTransactional // 单机+多数据源方案,使用 @DSTransactional 保证本地事务,以及数据源的切换
-    public Boolean saveAdvantage(AppPersonAdvantageSaveReqVO reqVO) {
+    public boolean saveAdvantage(AppPersonAdvantageSaveReqVO reqVO) {
         Long userId = getLoginUserId();
         PersonInfoDO info = personInfoMapper.selectOne(PersonInfoDO::getUserId, userId);
         if (null == info) {
@@ -111,4 +111,17 @@ public class PersonInfoServiceImpl implements PersonInfoService {
 
         return true;
     }
+
+    @Override
+    @DSTransactional
+    public boolean updateJobStatus(String status) {
+        Long userId = getLoginUserId();
+        PersonInfoDO info = personInfoMapper.selectOne(PersonInfoDO::getUserId, userId);
+        if (null == info) {
+            throw exception(MDE_PERSON_INFO_NOT_EXISTS);
+        }
+        info.setJobStatus(status);
+        personInfoMapper.updateById(info);
+        return true;
+    }
 }