Selaa lähdekoodia

1、优化职位同步到知识图谱逻辑

rayson 1 vuosi sitten
vanhempi
commit
f0ea8697ad
13 muutettua tiedostoa jossa 120 lisäystä ja 29 poistoa
  1. 3 0
      menduner/menduner-system-api/src/main/java/com/citu/module/menduner/system/enums/ErrorCodeConstants.java
  2. 4 6
      menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/app/jobhunt/job/AppJobCvRelController.java
  3. 2 1
      menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/app/jobhunt/person/AppPersonController.java
  4. 17 0
      menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/app/jobhunt/person/vo/AppInvitePersonRespVO.java
  5. 41 0
      menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/base/user/MdeUserSimpleRespVO.java
  6. 5 3
      menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/dal/mysql/person/PersonInfoMapper.java
  7. 17 9
      menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/job/JobAdvertisedServiceImpl.java
  8. 8 3
      menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/job/JobCvRelService.java
  9. 12 2
      menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/job/JobCvRelServiceImpl.java
  10. 2 1
      menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/person/info/PersonInfoService.java
  11. 3 3
      menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/person/info/PersonInfoServiceImpl.java
  12. 5 1
      menduner/menduner-system-biz/src/main/resources/i18n/messages_en_US.properties
  13. 1 0
      menduner/menduner-system-biz/src/main/resources/i18n/messages_zh_CN.properties

+ 3 - 0
menduner/menduner-system-api/src/main/java/com/citu/module/menduner/system/enums/ErrorCodeConstants.java

@@ -374,6 +374,9 @@ public interface ErrorCodeConstants {
     ErrorCode JOB_CV_REL_URL_NOT_NULL = new ErrorCode(1_100_035_008, "简历附件地址不能为空");
     ErrorCode JOB_CV_REL_STATUS_NOT_NULL = new ErrorCode(1_100_035_009, "投递的简历状态不能为空");
 
+
+    ErrorCode JOB_CV_REL_STATUS_NOT_REVOKE = new ErrorCode(1_100_035_010, "简历已被查看,无法撤回");
+
     // ========== 众聘-简历投递 1_100_036_000 ==========
     ErrorCode HIRE_JOB_CV_REL_NOT_EXISTS = new ErrorCode(1_100_036_001, "投递简历不存在");
     ErrorCode HIRE_JOB_CV_REL_JOB_ID_NOT_NULL = new ErrorCode(1_100_036_002, "发布的职位id不能为空");

+ 4 - 6
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/app/jobhunt/job/AppJobCvRelController.java

@@ -58,16 +58,14 @@ public class AppJobCvRelController {
     @PreAuthenticated
     @Operation(summary = "投递简历")
     @Idempotent(keyResolver = UserIdempotentKeyResolver.class)
-    public CommonResult<Boolean> send(@Valid @RequestBody AppJobCvRelReqVO reqVO) {
-        jobCvRelService.send(reqVO);
-        return success(true);
+    public CommonResult<Long> send(@Valid @RequestBody AppJobCvRelReqVO reqVO) {
+        return success(jobCvRelService.send(reqVO));
     }
     @PostMapping("/hire/recommend/send")
     @Operation(summary = "众聘分享-投递简历")
     @Idempotent(keyResolver = UserIdempotentKeyResolver.class)
-    public CommonResult<Boolean> send(@Valid @RequestBody AppHireJobCvRelReqVO reqVO) {
-        jobCvRelService.send(reqVO);
-        return success(true);
+    public CommonResult<Long> send(@Valid @RequestBody AppHireJobCvRelReqVO reqVO) {
+        return success(jobCvRelService.send(reqVO));
     }
 
     @PreAuthenticated

+ 2 - 1
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/app/jobhunt/person/AppPersonController.java

@@ -9,6 +9,7 @@ import com.citu.framework.security.core.annotations.PreAuthenticated;
 import com.citu.module.menduner.system.controller.app.jobhunt.job.vo.AppJobAdvertisedRespVO;
 import com.citu.module.menduner.system.controller.app.jobhunt.person.enterprise.PersonEnterpriseSubscribeReqVO;
 import com.citu.module.menduner.system.controller.app.jobhunt.person.job.AppPersonJobFavoriteReqVO;
+import com.citu.module.menduner.system.controller.app.jobhunt.person.vo.AppInvitePersonRespVO;
 import com.citu.module.menduner.system.controller.app.jobhunt.person.vo.AppPersonInfoRespVO;
 import com.citu.module.menduner.system.controller.base.enterprise.vo.EnterpriseBaseSimpleRespVO;
 import com.citu.module.menduner.system.controller.base.person.block.PersonEnterpriseBlockSaveReqVO;
@@ -66,7 +67,7 @@ public class AppPersonController {
     @PreAuthenticated
     @GetMapping("/get/invite/person/page")
     @Operation(summary = "获取邀请的人才信息")
-    public CommonResult<PageResult<PersonSimpleRespVO>> getInvitePerson(@Valid PageParam page) {
+    public CommonResult<PageResult<AppInvitePersonRespVO>> getInvitePerson(@Valid PageParam page) {
         return success(personInfoService.getInvitePerson(page));
     }
 

+ 17 - 0
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/app/jobhunt/person/vo/AppInvitePersonRespVO.java

@@ -0,0 +1,17 @@
+package com.citu.module.menduner.system.controller.app.jobhunt.person.vo;
+
+import com.citu.module.menduner.system.controller.base.person.info.PersonSimpleRespVO;
+import com.citu.module.menduner.system.controller.base.user.MdeUserSimpleRespVO;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+@Schema(description = "menduner - 邀请用户信息 Response VO")
+@Data
+public class AppInvitePersonRespVO {
+
+    @Schema(description = "人才信息")
+    private PersonSimpleRespVO person;
+
+    @Schema(description = "用户信息")
+    private MdeUserSimpleRespVO user;
+}

+ 41 - 0
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/base/user/MdeUserSimpleRespVO.java

@@ -0,0 +1,41 @@
+package com.citu.module.menduner.system.controller.base.user;
+
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Schema(description = "用户简易信息 Response VO")
+@Data
+public class MdeUserSimpleRespVO {
+
+    @Schema(description = "用户ID", example = "2684")
+    private Long id;
+
+    @Schema(description = "用户账号", example = "李四")
+    private String username;
+
+    @Schema(description = "用户邮箱")
+    private String email;
+
+    @Schema(description = "手机号码")
+    private String phone;
+
+    @Schema(description = "邀请用户id")
+    private Long inviteCode;
+
+    @Schema(description = "帐号状态(0正常 1停用)", example = "2")
+    private String status;
+
+    @Schema(description = "最后登录时间")
+    @ExcelProperty("最后登录时间")
+    private LocalDateTime loginDate;
+
+    @Schema(description = "创建时间")
+    @ExcelProperty("创建时间")
+    private LocalDateTime createTime;
+
+
+}

+ 5 - 3
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/dal/mysql/person/PersonInfoMapper.java

@@ -6,6 +6,7 @@ import com.citu.framework.common.pojo.PageResult;
 import com.citu.framework.mybatis.core.mapper.BaseMapperX;
 import com.citu.framework.mybatis.core.query.LambdaQueryWrapperX;
 import com.citu.framework.mybatis.core.query.MPJLambdaWrapperX;
+import com.citu.module.menduner.system.controller.app.jobhunt.person.vo.AppInvitePersonRespVO;
 import com.citu.module.menduner.system.controller.base.person.PersonMapQueryReqVO;
 import com.citu.module.menduner.system.controller.base.person.PersonQueryReqVO;
 import com.citu.module.menduner.system.controller.base.person.info.PersonInfoPageReqVO;
@@ -223,12 +224,13 @@ public interface PersonInfoMapper extends BaseMapperX<PersonInfoDO> {
      * @param userId    邀请码
      * @param pageParam 分页
      **/
-    default PageResult<PersonSimpleRespVO> queryInvitePersonByUserId(Long userId, PageParam pageParam) {
+    default PageResult<AppInvitePersonRespVO> queryInvitePersonByUserId(Long userId, PageParam pageParam) {
         MPJLambdaWrapperX<PersonInfoDO> query = new MPJLambdaWrapperX<>();
-        query.selectAsClass(PersonInfoDO.class, PersonSimpleRespVO.class);
+        query.selectAssociation(PersonInfoDO.class, AppInvitePersonRespVO::getPerson);
+        query.selectAssociation(MdeUserDO.class, AppInvitePersonRespVO::getUser);
         query.innerJoin(MdeUserDO.class, MdeUserDO::getId, PersonInfoDO::getUserId);
         query.eq(MdeUserDO::getInviteCode, userId);
-        return selectJoinPage(pageParam, PersonSimpleRespVO.class, query);
+        return selectJoinPage(pageParam, AppInvitePersonRespVO.class, query);
     }
 
 }

+ 17 - 9
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/job/JobAdvertisedServiceImpl.java

@@ -62,7 +62,9 @@ import static com.citu.module.menduner.system.enums.ErrorCodeConstants.*;
 @Validated
 public class JobAdvertisedServiceImpl implements JobAdvertisedService {
 
-    /** 默认管理员的企业id和用户id **/
+    /**
+     * 默认管理员的企业id和用户id
+     **/
     private static final Long DEFAULT_ENTERPRISE_ID = 1L;
     private static final Long DEFAULT_USER_ID = 1L;
     @Resource
@@ -87,7 +89,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
         jobAdvertised.setHire(true);
         jobAdvertised.setEnterpriseId(DEFAULT_ENTERPRISE_ID);
         jobAdvertised.setUserId(DEFAULT_USER_ID);
-        return save(jobAdvertised,  DEFAULT_ENTERPRISE_ID, DEFAULT_USER_ID);
+        return save(jobAdvertised, DEFAULT_ENTERPRISE_ID, DEFAULT_USER_ID);
     }
 
     @Override
@@ -114,7 +116,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
 
     private JobAdvertisedDO validateJobAdvertisedExists(Long id) {
         JobAdvertisedDO jobAdvertised = mapper.selectById(id);
-        if (null==jobAdvertised) {
+        if (null == jobAdvertised) {
             throw exception(MDE_JOB_ADVERTISED_NOT_EXISTS);
         }
         return jobAdvertised;
@@ -318,9 +320,15 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
         }
         for (JobAdvertisedRespVO resp : respList) {
             // 设置字典真实值
-            resp.setType(DictFrameworkUtils.getDictDataLabel(MENDUNER_JOB_TYPE, resp.getType()));
-            resp.setEduType(DictFrameworkUtils.getDictDataLabel(MENDUNER_EDUCATION_TYPE, resp.getEduType()));
-            resp.setExpType(DictFrameworkUtils.getDictDataLabel(MENDUNER_EXP_TYPE, resp.getExpType()));
+            if (null != resp.getType()) {
+                resp.setType(DictFrameworkUtils.getDictDataLabel(MENDUNER_JOB_TYPE, resp.getType()));
+            }
+            if (null != resp.getEduType()) {
+                resp.setEduType(DictFrameworkUtils.getDictDataLabel(MENDUNER_EDUCATION_TYPE, resp.getEduType()));
+            }
+            if (null != resp.getExpType()) {
+                resp.setExpType(DictFrameworkUtils.getDictDataLabel(MENDUNER_EXP_TYPE, resp.getExpType()));
+            }
             if (null != resp.getPayUnit()) {
                 resp.setPayUnit(DictFrameworkUtils.getDictDataLabel(MENDUNER_PAY_UNIT, resp.getPayUnit()));
             }
@@ -395,7 +403,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
      */
     private void processNewJob(JobAdvertisedDO job, Long enterpriseId, Long userId) {
         // 验证权益
-        vipEntitlementCheckAspect.validate(VipEntitlementCheck.OPERATE_PUBLISH_JOB,!job.getHire());
+        vipEntitlementCheckAspect.validate(VipEntitlementCheck.OPERATE_PUBLISH_JOB, !job.getHire());
 
 
         // 设置默认值
@@ -406,7 +414,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
         if (StringUtils.hasText(job.getStatus())) {
             // 有保存状态则写入保存的状态
             job.setStatus(job.getStatus());
-        }else {
+        } else {
             if (!job.getHire()) {
                 // 不是众聘职位
                 job.setHirePrice(0L);
@@ -422,7 +430,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
 
         // 处理权益
         vipEntitlementCheckAspect
-                .process(VipEntitlementCheck.OPERATE_PUBLISH_JOB, VipEntitlementCheck.OperationType.DEDUCT,!job.getHire());
+                .process(VipEntitlementCheck.OPERATE_PUBLISH_JOB, VipEntitlementCheck.OperationType.DEDUCT, !job.getHire());
     }
 
     /**

+ 8 - 3
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/job/JobCvRelService.java

@@ -80,13 +80,13 @@ public interface JobCvRelService {
      *
      * @param reqVO
      */
-    void send(AppJobCvRelReqVO reqVO);
+    Long send(AppJobCvRelReqVO reqVO);
     /**
      * 众聘-推荐人简历投递
      *
      * @param reqVO 条件
      */
-    void send(AppHireJobCvRelReqVO reqVO);
+    Long send(AppHireJobCvRelReqVO reqVO);
     /**
      * 效验是否投递了该职位
      *
@@ -94,7 +94,12 @@ public interface JobCvRelService {
      */
     boolean checkSend(Long jobId);
 
-
+    /**
+     * 撤回投递的简历(未查看才可撤回)
+     *
+     * @param id 简历id
+     */
+    void withdraw(Long id);
 
     /**
      * 获取推荐邀请投递的职位信息

+ 12 - 2
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/job/JobCvRelServiceImpl.java

@@ -111,7 +111,7 @@ public class JobCvRelServiceImpl implements JobCvRelService {
 
     @Override
     @DSTransactional
-    public void send(AppJobCvRelReqVO reqVO) {
+    public Long send(AppJobCvRelReqVO reqVO) {
         // 效验职位是否关闭
         JobAdvertisedDO job = jobAdvertisedService.getJobAdvertised(reqVO.getJobId());
         if (MendunerStatusEnum.DISABLE.getStatus().equals(job.getStatus())) {
@@ -130,11 +130,12 @@ public class JobCvRelServiceImpl implements JobCvRelService {
         jobCvRel.setStatus(JobCvRelStatusEnum.NEW.getStatus());
         // 保存
         jobCvRelMapper.insert(jobCvRel);
+        return jobCvRel.getId();
     }
 
     @Override
     @DSTransactional
-    public void send(AppHireJobCvRelReqVO reqVO) {
+    public Long send(AppHireJobCvRelReqVO reqVO) {
         // 效验职位是否关闭
         JobAdvertisedDO job = jobAdvertisedService.getJobAdvertised(reqVO.getJobId());
         if (null == reqVO || MendunerStatusEnum.DISABLE.getStatus().equals(job.getStatus())) {
@@ -162,6 +163,7 @@ public class JobCvRelServiceImpl implements JobCvRelService {
         cvRelDO.setStatus(JobCvRelStatusEnum.NEW.getStatus());
         // 保存
         jobCvRelMapper.insert(cvRelDO);
+        return cvRelDO.getId();
     }
 
     @Override
@@ -175,6 +177,14 @@ public class JobCvRelServiceImpl implements JobCvRelService {
         return jobCvRelMapper.checkDataWithin15Day(userId, jobId);
     }
 
+    @Override
+    public void withdraw(Long id) {
+        JobCvRelDO jobCvRel = validateJobCvRelExists(id);
+        if (JobCvRelStatusEnum.LOOK.getStatus().equals(jobCvRel.getStatus())) {
+            throw exception(JOB_CV_REL_STATUS_NOT_REVOKE);
+        }
+        jobCvRelMapper.deleteById(id);
+    }
 
     @Override
     public PageResult<AppHireJobCvRelRespVO> page(AppHireJobCvRelQueryReqVO reqVO) {

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

@@ -6,6 +6,7 @@ import com.citu.module.menduner.system.controller.app.jobhunt.person.resume.AppP
 import com.citu.module.menduner.system.controller.app.jobhunt.person.resume.AppPersonInfoSaveReqVO;
 import com.citu.module.menduner.system.controller.app.jobhunt.person.resume.AppPersonInfoSaveSimpleReqVO;
 import com.citu.module.menduner.system.controller.app.jobhunt.person.resume.AppPersonInfoTagReqVO;
+import com.citu.module.menduner.system.controller.app.jobhunt.person.vo.AppInvitePersonRespVO;
 import com.citu.module.menduner.system.controller.base.person.info.PersonInfoPageReqVO;
 import com.citu.module.menduner.system.controller.base.person.info.PersonInfoSaveReqVO;
 import com.citu.module.menduner.system.controller.base.person.info.PersonSimpleRespVO;
@@ -116,5 +117,5 @@ public interface PersonInfoService {
     /**
      * 获取邀请的人才信息
      */
-    PageResult<PersonSimpleRespVO> getInvitePerson(PageParam pageParam);
+    PageResult<AppInvitePersonRespVO> getInvitePerson(PageParam pageParam);
 }

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

@@ -11,9 +11,9 @@ import com.citu.module.menduner.system.controller.app.jobhunt.person.resume.AppP
 import com.citu.module.menduner.system.controller.app.jobhunt.person.resume.AppPersonInfoSaveReqVO;
 import com.citu.module.menduner.system.controller.app.jobhunt.person.resume.AppPersonInfoSaveSimpleReqVO;
 import com.citu.module.menduner.system.controller.app.jobhunt.person.resume.AppPersonInfoTagReqVO;
+import com.citu.module.menduner.system.controller.app.jobhunt.person.vo.AppInvitePersonRespVO;
 import com.citu.module.menduner.system.controller.base.person.info.PersonInfoPageReqVO;
 import com.citu.module.menduner.system.controller.base.person.info.PersonInfoSaveReqVO;
-import com.citu.module.menduner.system.controller.base.person.info.PersonSimpleRespVO;
 import com.citu.module.menduner.system.dal.dataobject.person.PersonInfoDO;
 import com.citu.module.menduner.system.dal.mysql.person.PersonInfoMapper;
 import com.citu.module.menduner.system.enums.sync.SyncConstants;
@@ -215,7 +215,7 @@ public class PersonInfoServiceImpl implements PersonInfoService {
     }
 
     @Override
-    public PageResult<PersonSimpleRespVO> getInvitePerson(PageParam pageParam) {
-        return personInfoMapper.queryInvitePersonByUserId(LoginUserContext.getUserId(),pageParam);
+    public PageResult<AppInvitePersonRespVO> getInvitePerson(PageParam pageParam) {
+        return personInfoMapper.queryInvitePersonByUserId(LoginUserContext.getUserId(), pageParam);
     }
 }

+ 5 - 1
menduner/menduner-system-biz/src/main/resources/i18n/messages_en_US.properties

@@ -267,13 +267,17 @@
 1_100_034_002=User application has been approved
 1_100_034_003=The user's application has been approved and cannot be rejected
 1_100_034_005=Applied for review, please do not resubmit
-# ========== 招聘职位简历投递 1_100_034_000 ==========
+# ========== 招聘职位简历投递 1_100_035_000 ==========
 1_100_035_001=Recruitment position resume submission does not exist
 1_100_035_002=The position has been submitted
 1_100_035_003=No resume attachment selected
 1_100_035_004=Recruitment position ID cannot be empty
 1_100_035_005=This position is currently not allowed for delivery
 1_100_035_006=Recruitment for this position has been suspended
+1_100_035_007=Resume attachment title cannot be empty
+1_100_035_008=Resume attachment address cannot be empty
+1_100_035_009=Resume status submitted cannot be empty
+1_100_035_010=Resume has been viewed and cannot be retracted
 # ========== 众聘-简历投递 1_100_036_000 ==========
 1_100_036_001=The submitted resume does not exist
 1_100_036_002=The posted position ID cannot be empty

+ 1 - 0
menduner/menduner-system-biz/src/main/resources/i18n/messages_zh_CN.properties

@@ -277,6 +277,7 @@
 1_100_035_007=简历附件标题不能为空
 1_100_035_008=简历附件地址不能为空
 1_100_035_009=投递的简历状态不能为空
+1_100_035_010=简历已被查看,无法撤回
 # ========== 众聘-简历投递 1_100_036_000 ==========
 1_100_036_001=投递简历不存在
 1_100_036_002=发布的职位id不能为空