Przeglądaj źródła

投递简历时新增一个用来选择简历的页面-jly

jialuyu 1 dzień temu
rodzic
commit
1443845081

+ 2 - 18
ruoyi-admin/src/main/resources/application-dev.yml

@@ -97,7 +97,7 @@ spring.data:
   redis:
     # 地址
     host: localhost
-#    password: 123456
+    password: 123456
     # 端口,默认为6379
     port: 6379
     # 数据库索引
@@ -205,7 +205,7 @@ wxpay:
   certSerialNo: 79AD857EFB072D51FD47D9F6A3AE70F1FE22C9BA
   privateKeyPath: classpath:/cert/apiclient_key.pem
   privateCertPath: classpath:/cert/apiclient_cert.pem
-  notifyUrl: http://yp1.yingpaipay.com:9053/main/order-card/wx-pay-notify
+  notifyUrl: http://yp1.yingpaipay.com:9054/main/order-card/wx-pay-notify
 
 
 
@@ -292,19 +292,3 @@ justauth:
       client-id: 10**********6
       client-secret: 1f7d08**********5b7**********29e
       redirect-uri: ${justauth.address}/social-callback?source=gitea
-
-tencent:
-  map:
-    geo:
-      # 企业入驻办公地址转经纬度所需的腾讯位置服务 WebService Key
-      key: "CUVBZ-UZJWB-YD7U2-JI2O3-C7DYT-PCBMI"
-
-manage:
-  jumpTo: http://localhost:90/
-
-withdraw:
-  auditMode: auto
-  autoAuditRule:
-    maxAmount: 10000
-    maxDailyCount: 10
-    maxDailyAmount: 50000

+ 3 - 1
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/controller/MainBackCandidateController.java

@@ -72,7 +72,9 @@ public class MainBackCandidateController extends BaseController {
             return R.fail("岗位ID不能为空");
         }
         Long postId = Long.valueOf(postIdObj.toString());
-        Boolean result = mainBackCandidateService.applyPosition(studentId, postId);
+        Object resumeOssIdObj = params.get("resumeOssId");
+        Long resumeOssId = resumeOssIdObj != null ? Long.valueOf(resumeOssIdObj.toString()) : null;
+        Boolean result = mainBackCandidateService.applyPosition(studentId, postId, resumeOssId);
         return toAjax(result);
     }
 }

+ 4 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/MainBackCandidate.java

@@ -61,6 +61,10 @@ public class MainBackCandidate extends BaseEntity {
     /** 状态(兼容旧数据) */
     private String status;
 
+    /** 投递的附件简历OSS ID(关联 main_student_appendix.oss_id) */
+    @TableField("resume_oss_id")
+    private Long resumeOssId;
+
     private String remark;
 
     private Date updateTime;

+ 4 - 3
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/service/IMainBackCandidateService.java

@@ -40,9 +40,10 @@ public interface IMainBackCandidateService {
     /**
      * 学员投递简历(应聘岗位)
      *
-     * @param studentId 学员ID
-     * @param postId    岗位ID
+     * @param studentId   学员ID
+     * @param postId      岗位ID
+     * @param resumeOssId 选择的附件简历OSS ID
      * @return 是否成功
      */
-    Boolean applyPosition(Long studentId, Long postId);
+    Boolean applyPosition(Long studentId, Long postId, Long resumeOssId);
 }

+ 2 - 1
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/service/impl/MainBackCandidateServiceImpl.java

@@ -236,7 +236,7 @@ public class MainBackCandidateServiceImpl implements IMainBackCandidateService {
 
 
     @Override
-    public Boolean applyPosition(Long studentId, Long postId) {
+    public Boolean applyPosition(Long studentId, Long postId, Long resumeOssId) {
         // 查询岗位信息获取 tenantId
         MainPosition position = mainPositionMapper.selectById(postId);
         if (position == null) {
@@ -262,6 +262,7 @@ public class MainBackCandidateServiceImpl implements IMainBackCandidateService {
         candidate.setEnterpriseStatus("pending");
         candidate.setStudentStatus("pending");
         candidate.setStatus("pending");
+        candidate.setResumeOssId(resumeOssId);
 
         boolean applied = mainBackCandidateMapper.insert(candidate) > 0;
         if (applied) {

+ 9 - 1
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/service/impl/MainPostCandidateServiceImpl.java

@@ -122,8 +122,16 @@ public class MainPostCandidateServiceImpl implements IMainPostCandidateService {
         if (candidate == null) {
             throw new ServiceException("候选人记录不存在");
         }
+
+        // 优先使用候选人选择投递的附件简历OSS ID
+        if (candidate.getResumeOssId() != null) {
+            sysOssService.download(candidate.getResumeOssId(), response);
+            return;
+        }
+
+        // 兼容旧数据:没有 resumeOssId 时回退到学员在线简历
         if (candidate.getStudentId() == null) {
-            throw new ServiceException("候选人未关联学员");
+            throw new ServiceException("该候选人暂无简历附件");
         }
         MainStudent student = mainStudentMapper.selectById(candidate.getStudentId());
         if (student == null || student.getResumeFile() == null) {