Browse Source

接口代码提交

xiao547607 4 years ago
parent
commit
5e24598dcc

+ 19 - 0
common/src/main/java/com/jpsoft/employment/modules/job/dto/EducationExpDTO.java

@@ -0,0 +1,19 @@
+package com.jpsoft.employment.modules.job.dto;
+
+import lombok.Data;
+
+@Data
+public class EducationExpDTO {
+    private String id;
+
+    private String name;
+
+    private String timeS;
+
+    private String timeE;
+
+    private String remark;
+
+    private String content;
+
+}

+ 14 - 0
common/src/main/java/com/jpsoft/employment/modules/job/dto/ExpJsonDTO.java

@@ -0,0 +1,14 @@
+package com.jpsoft.employment.modules.job.dto;
+
+import com.sun.corba.se.spi.orbutil.threadpool.Work;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ExpJsonDTO {
+    private List<WorkExpDTO> workExp;
+    private List<EducationExpDTO> educationExp;
+
+}

+ 19 - 0
common/src/main/java/com/jpsoft/employment/modules/job/dto/WorkExpDTO.java

@@ -0,0 +1,19 @@
+package com.jpsoft.employment.modules.job.dto;
+
+import lombok.Data;
+
+@Data
+public class WorkExpDTO {
+    private String id;
+
+    private String name;
+
+    private String timeS;
+
+    private String timeE;
+
+    private String remark;
+
+    private String content;
+
+}

+ 2 - 0
common/src/main/java/com/jpsoft/employment/modules/job/entity/Resume.java

@@ -77,4 +77,6 @@ public class Resume {
 	@ApiModelProperty(value = "工作状态(字典:工作在职状态")
 	private String jobStatus;
 
+	@ApiModelProperty(value = "附件,逗号分割")
+	private String resumeUrls;
 }

+ 2 - 2
common/src/main/java/com/jpsoft/employment/modules/job/entity/ResumeEducationExperience.java

@@ -45,10 +45,10 @@ public class ResumeEducationExperience {
 
 
 	@ApiModelProperty(value = "在校时间-起")
-	private Date startTime;
+	private String startTime;
 
 	@ApiModelProperty(value = "在校时间-止")
-	private Date endTime;
+	private String endTime;
 
 	@ApiModelProperty(value = "学校名称")
 	private String schoolName;

+ 2 - 2
common/src/main/java/com/jpsoft/employment/modules/job/entity/ResumeWorkExperience.java

@@ -45,10 +45,10 @@ public class ResumeWorkExperience {
 	private Integer sortNo;
 
 	@ApiModelProperty(value = "工作年限-起")
-	private Date startTime;
+	private String startTime;
 
 	@ApiModelProperty(value = "工作年限-止")
-	private Date endTime;
+	private String endTime;
 
 	@ApiModelProperty(value = "工作企业")
 	private String companyName;

+ 1 - 1
common/src/main/resources/mapper/base/EnterpriseCertificationApprove.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!-- namespace必须指向DAO接口 -->
-<mapper namespace="com.jpsoft.employment.dao.EnterpriseCertificationApproveDAO">
+<mapper namespace="com.jpsoft.employment.modules.base.dao.EnterpriseCertificationApproveDAO">
 	<resultMap id="EnterpriseCertificationApproveMap" type="com.jpsoft.employment.modules.base.entity.EnterpriseCertificationApprove">
 		<id property="id" column="id_" />
 			<result property="createBy" column="create_by" />

+ 1 - 1
common/src/main/resources/mapper/base/ResumeApprove.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!-- namespace必须指向DAO接口 -->
-<mapper namespace="com.jpsoft.employment.dao.ResumeApproveDAO">
+<mapper namespace="com.jpsoft.employment.modules.base.dao.ResumeApproveDAO">
 	<resultMap id="ResumeApproveMap" type="com.jpsoft.employment.modules.base.entity.ResumeApprove">
 		<id property="id" column="id_" />
 			<result property="createBy" column="create_by" />

+ 1 - 1
common/src/main/resources/mapper/base/ServiceApprove.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!-- namespace必须指向DAO接口 -->
-<mapper namespace="com.jpsoft.employment.dao.ServiceApproveDAO">
+<mapper namespace="com.jpsoft.employment.modules.base.dao.ServiceApproveDAO">
 	<resultMap id="ServiceApproveMap" type="com.jpsoft.employment.modules.base.entity.ServiceApprove">
 		<id property="id" column="id_" />
 			<result property="serviceId" column="service_id" />

+ 6 - 1
common/src/main/resources/mapper/job/Resume.xml

@@ -22,6 +22,7 @@
 			<result property="status" column="status_" />
 			<result property="approveStatus" column="approve_status" />
 			<result property="jobStatus" column="job_status" />
+			<result property="resumeUrls" column="resume_urls" />
 			</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.employment.modules.job.entity.Resume">
 	<!--
@@ -32,7 +33,7 @@
 	<![CDATA[
 		insert into job_resume
 	    (id_,create_by,create_time,update_by,update_time,del_flag,job_user_id,sex_,position_category_id,work_exp,education_,dream_money,dream_add,birthday_,introduction_,status_,approve_status,
-	    job_status)
+	    job_status,resume_urls)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -53,6 +54,7 @@
 ,#{status,jdbcType=VARCHAR}
 ,#{approveStatus,jdbcType=VARCHAR}
 ,#{jobStatus,jdbcType=VARCHAR}
+,#{resumeUrls,jdbcType=VARCHAR}
 		)
 	]]>
 	</insert>
@@ -113,6 +115,9 @@
 			<if test="jobStatus!=null">
 				job_status=#{jobStatus,jdbcType=VARCHAR},
 			</if>
+			<if test="resumeUrls!=null">
+				resume_urls=#{resumeUrls,jdbcType=VARCHAR},
+			</if>
 		</set>
 	where id_=#{id}
 	</update>

+ 5 - 4
common/src/main/resources/mapper/job/ResumeEducationExperience.xml

@@ -37,8 +37,8 @@
 ,#{delFlag,jdbcType= NUMERIC }
 ,#{resumeId,jdbcType=VARCHAR}
 ,#{sortNo,jdbcType= NUMERIC }
-,#{startTime,jdbcType= TIMESTAMP }
-,#{endTime,jdbcType= TIMESTAMP }
+,#{startTime,jdbcType= VARCHAR }
+,#{endTime,jdbcType= VARCHAR }
 ,#{schoolName,jdbcType=VARCHAR}
 ,#{education,jdbcType=VARCHAR}
 ,#{major,jdbcType=VARCHAR}
@@ -73,10 +73,10 @@
 		sort_no=#{sortNo,jdbcType= NUMERIC },
 		</if>
 				<if test="startTime!=null">
-		start_time=#{startTime,jdbcType= TIMESTAMP },
+		start_time=#{startTime,jdbcType= VARCHAR },
 		</if>
 				<if test="endTime!=null">
-		end_time=#{endTime,jdbcType= TIMESTAMP },
+		end_time=#{endTime,jdbcType= VARCHAR },
 		</if>
 				<if test="schoolName!=null">
 		school_name=#{schoolName,jdbcType=VARCHAR},
@@ -119,5 +119,6 @@
 		job_resume_education_experience
 		where del_flag = 0
 		and resume_id = #{resumeId}
+		order by sort_no
 	</select>
 </mapper>

+ 5 - 5
common/src/main/resources/mapper/job/ResumeWorkExperience.xml

@@ -37,8 +37,8 @@
 ,#{delFlag,jdbcType= NUMERIC }
 ,#{resumeId,jdbcType=VARCHAR}
 ,#{sortNo,jdbcType= NUMERIC }
-,#{startTime,jdbcType= TIMESTAMP }
-,#{endTime,jdbcType= TIMESTAMP }
+,#{startTime,jdbcType= VARCHAR }
+,#{endTime,jdbcType= VARCHAR }
 ,#{companyName,jdbcType=VARCHAR}
 ,#{job,jdbcType=VARCHAR}
 ,#{content,jdbcType= VARCHAR }
@@ -73,10 +73,10 @@
 		sort_no=#{sortNo,jdbcType= NUMERIC },
 		</if>
 				<if test="startTime!=null">
-		start_time=#{startTime,jdbcType= TIMESTAMP },
+		start_time=#{startTime,jdbcType= VARCHAR },
 		</if>
 				<if test="endTime!=null">
-		end_time=#{endTime,jdbcType= TIMESTAMP },
+		end_time=#{endTime,jdbcType= VARCHAR },
 		</if>
 				<if test="companyName!=null">
 		company_name=#{companyName,jdbcType=VARCHAR},
@@ -120,6 +120,6 @@
 		job_resume_work_experience
 		where del_flag = 0
 		and resume_id = #{resumeId}
-		limit 1
+		order by sort_no
 	</select>
 </mapper>

+ 222 - 63
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/ResumeApiController.java

@@ -1,35 +1,34 @@
 package com.jpsoft.employment.modules.mobile.controller;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.Page;
-import com.jpsoft.employment.config.OSSConfig;
+import com.jpsoft.employment.modules.base.entity.ResumeApprove;
+import com.jpsoft.employment.modules.base.service.ResumeApproveService;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
 import com.jpsoft.employment.modules.common.dto.Sort;
 import com.jpsoft.employment.modules.common.utils.*;
+import com.jpsoft.employment.modules.job.dto.EducationExpDTO;
+import com.jpsoft.employment.modules.job.dto.ExpJsonDTO;
+import com.jpsoft.employment.modules.job.dto.WorkExpDTO;
 import com.jpsoft.employment.modules.job.entity.*;
 import com.jpsoft.employment.modules.job.service.*;
-import com.jpsoft.employment.modules.sys.entity.SysLog;
 import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
-import com.jpsoft.employment.modules.sys.service.SysLogService;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
-import org.joda.time.DateTime;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.data.redis.core.ValueOperations;
+import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import sun.misc.BASE64Decoder;
 
-import java.io.ByteArrayInputStream;
 import java.util.*;
-import java.util.concurrent.TimeUnit;
 
 @RestController
 @RequestMapping("/mobile/resumeApi")
@@ -66,6 +65,9 @@ public class ResumeApiController {
     @Autowired
     private ResumeDeliverRecordService resumeDeliverRecordService;
 
+    @Autowired
+    private ResumeApproveService resumeApproveService;
+
 
     private Logger logger = LoggerFactory.getLogger(getClass());
 
@@ -96,12 +98,13 @@ public class ResumeApiController {
     @PostMapping("collectResume")
     @ApiOperation(value = "收藏简历")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "recruitmentId", value = "岗位ID", required = true, paramType = "form"),
-            @ApiImplicitParam(name = "status", value = "状态(收藏1,取消0),默认1收藏",  paramType = "form"),
+            @ApiImplicitParam(name = "recruitmentId", value = "岗位ID", required = true, paramType = "query"),
+            @ApiImplicitParam(name = "status", value = "状态(收藏1,取消0),默认1收藏",  paramType = "query"),
     })
     public MessageResult<String> collectResume(
             String recruitmentId,
             @RequestParam(value="status",defaultValue="1") String status,
+            String token,
             @RequestAttribute  String subject) {
         MessageResult<String> messageResult = new MessageResult<>();
 
@@ -151,12 +154,13 @@ public class ResumeApiController {
     @PostMapping("deliverResume")
     @ApiOperation(value = "投递简历")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "recruitmentId", value = "岗位ID", required = true, paramType = "form"),
-            @ApiImplicitParam(name = "resumeId", value = "简历ID,不传则默认查当前简历", paramType = "form"),
+            @ApiImplicitParam(name = "recruitmentId", value = "岗位ID", required = true, paramType = "query"),
+            @ApiImplicitParam(name = "resumeId", value = "简历ID,不传则默认查当前简历", paramType = "query"),
     })
     public MessageResult<String> deliverResume(
             String recruitmentId,
             @RequestParam(value="resumeId",defaultValue="") String resumeId,
+            String token,
             @RequestAttribute  String subject) {
         MessageResult<String> messageResult = new MessageResult<>();
 
@@ -221,10 +225,11 @@ public class ResumeApiController {
     @PostMapping("myResumeDetail")
     @ApiOperation(value = "我的简历-详情")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "resumeId", value = "简历ID,不传则默认查当前简历", paramType = "form"),
+            @ApiImplicitParam(name = "resumeId", value = "简历ID,不传则默认查当前简历", paramType = "query"),
     })
     public MessageResult<Map> myResumeDetail(
-            @RequestParam(value="resumeId",defaultValue="") String resumeId,
+            String resumeId,
+            String token,
             @RequestAttribute  String subject) {
         MessageResult<Map> messageResult = new MessageResult<>();
 
@@ -275,6 +280,7 @@ public class ResumeApiController {
     public MessageResult<Map> deliveryRecord(
             @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
             @RequestParam(value="pageSize",defaultValue="10") int pageSize,
+            String token,
             @RequestAttribute  String subject) {
         MessageResult<Map> messageResult = new MessageResult<>();
 
@@ -305,24 +311,37 @@ public class ResumeApiController {
     @PostMapping("submitResume")
     @ApiOperation(value = "保存简历")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "resumeId", value = "简历ID,不传则默认查当前简历", paramType = "form"),
-            @ApiImplicitParam(name = "categoryId", value = "应聘职位", paramType = "form"),
-            @ApiImplicitParam(name = "sex", value = "性别", paramType = "form"),
-            @ApiImplicitParam(name = "dreamMoney", value = "期望工资", paramType = "form"),
-            @ApiImplicitParam(name = "workExp", value = "工作经验", paramType = "form"),
-            @ApiImplicitParam(name = "education", value = "学历", paramType = "form"),
-            @ApiImplicitParam(name = "jobStatus", value = "工作状态(是否上班)", paramType = "form"),
-            @ApiImplicitParam(name = "birthday", value = "出生年月", paramType = "form"),
-            @ApiImplicitParam(name = "dreamAdd", value = "期望工作地点", paramType = "form"),
-            @ApiImplicitParam(name = "introduction", value = "自我介绍", paramType = "form"),
-            @ApiImplicitParam(name = "resumeId", value = "工作经历-json", paramType = "form"),
-            @ApiImplicitParam(name = "resumeId", value = "教育经历-json", paramType = "form"),
-            @ApiImplicitParam(name = "resumeId", value = "简历附件,多文件逗号分割", paramType = "form"),
+            @ApiImplicitParam(name = "resumeId", value = "简历ID,不传则默认查当前简历", paramType = "query"),
+            @ApiImplicitParam(name = "categoryId", value = "应聘职位", paramType = "query"),
+            @ApiImplicitParam(name = "sex", value = "性别", paramType = "query"),
+            @ApiImplicitParam(name = "dreamMoney", value = "期望工资", paramType = "query"),
+            @ApiImplicitParam(name = "workExp", value = "工作经验", paramType = "query"),
+            @ApiImplicitParam(name = "education", value = "学历", paramType = "query"),
+            @ApiImplicitParam(name = "jobStatus", value = "工作状态(是否上班)", paramType = "query"),
+            @ApiImplicitParam(name = "birthday", value = "出生年月", paramType = "query",dataType = "Date"),
+            @ApiImplicitParam(name = "dreamAdd", value = "期望工作地点", paramType = "query"),
+            @ApiImplicitParam(name = "introduction", value = "自我介绍", paramType = "query"),
+            @ApiImplicitParam(name = "status", value = "开启状态,不传默认关闭(1开启,0关闭)", paramType = "query"),
+            @ApiImplicitParam(name = "expJson", value = "经历-json", paramType = "query"),
+            @ApiImplicitParam(name = "resumeUrls", value = "简历附件,多文件逗号分割", paramType = "query"),
 
     })
     public MessageResult<String> submitResume(
-            String recruitmentId,
+            String rd,
             @RequestParam(value="resumeId",defaultValue="") String resumeId,
+            @RequestParam(value="categoryId",defaultValue="") String categoryId,
+            @RequestParam(value="sex",defaultValue="") String sex,
+            @RequestParam(value="dreamMoney",defaultValue="") String dreamMoney,
+            @RequestParam(value="workExp",defaultValue="") String workExp,
+            @RequestParam(value="education",defaultValue="") String education,
+            @RequestParam(value="jobStatus",defaultValue="") String jobStatus,
+            @DateTimeFormat(pattern = "yyyy-MM-dd") Date birthday,
+            @RequestParam(value="dreamAdd",defaultValue="") String dreamAdd,
+            @RequestParam(value="introduction",defaultValue="") String introduction,
+            @RequestParam(value="status",defaultValue="0") String status,
+            @RequestParam(value="expJson",defaultValue="") String expJson,
+            @RequestParam(value="resumeUrls",defaultValue="") String resumeUrls,
+            String token,
             @RequestAttribute  String subject) {
         MessageResult<String> messageResult = new MessageResult<>();
 
@@ -334,48 +353,95 @@ public class ResumeApiController {
             }else{
                 resume = resumeService.findByUserId(subject);
             }
+
+            //String workExpJson = "{\"workExp\":[{\"id\":\"123\",\"name\":\"标题一\",\"timeS\":\"2020\",\"timeE\":\"2021\",\"remark\":\"工作1\",\"content\":\"内容\"},{\"id\":\"223\",\"name\":\"标题二\",\"timeS\":\"2022\",\"timeE\":\"至今\",\"remark\":\"工作2\",\"content\":\"内容2\"}],\"educationExp\":[{\"id\":\"323\",\"name\":\"标题一\",\"timeS\":\"2025\",\"timeE\":\"2026\",\"remark\":\"教育1\",\"content\":\"内容1\"},{\"id\":\"423\",\"name\":\"标题一\",\"timeS\":\"1\",\"timeE\":\"2\",\"remark\":\"教育2\",\"content\":\"内容2\"}]}";
             if(resume == null){
-                messageResult.setMessage("未创建简历");
-                messageResult.setResult(false);
-                messageResult.setCode(400);
-                return messageResult;
-            }else{
-                if(!"0".equals(resume.getStatus())){
-                    messageResult.setMessage("当前简历未开启");
-                    messageResult.setResult(false);
-                    messageResult.setCode(400);
-                    return messageResult;
+                //创建简历
+                resume = new Resume();
+                resume.setId(UUID.randomUUID().toString());
+                resume.setCreateBy(subject);
+                resume.setCreateTime(new Date());
+                resume.setDelFlag(false);
+                resume.setBirthday(birthday);
+                resume.setDreamAdd(dreamAdd);
+                resume.setDreamMoney(dreamMoney);
+                resume.setWorkExp(workExp);
+                resume.setEducation(education);
+                resume.setIntroduction(introduction);
+                resume.setJobStatus(jobStatus);
+                resume.setJobUserId(subject);
+                resume.setPositionCategoryId(categoryId);
+                resume.setSex(sex);
+                resume.setStatus(status);
+                resume.setResumeUrls(resumeUrls);
+
+                JSONObject jsonObject = JSONObject.parseObject(expJson);
+                ExpJsonDTO expJsonDTO = JSON.toJavaObject(jsonObject,ExpJsonDTO.class );
+                if(expJsonDTO != null){
+                    List<EducationExpDTO> educationExpList = expJsonDTO.getEducationExp();
+                    if(educationExpList.size() > 0){
+                        updateEducationExp(resume.getId(),educationExpList,subject);
+                    }
+
+                    List<WorkExpDTO> workExpDTOList = expJsonDTO.getWorkExp();
+                    if(workExpDTOList.size() > 0){
+                        updateWorkExp(resume.getId(),workExpDTOList,subject);
+                    }
                 }
+                resume.setApproveStatus("2");//审批中
 
-                if(!"2".equals(resume.getApproveStatus())){
-                    messageResult.setMessage("当前简历未审批");
-                    messageResult.setResult(false);
-                    messageResult.setCode(400);
-                    return messageResult;
+                resumeService.insert(resume);
+
+            }else{
+                //修改简历
+                resume.setUpdateBy(subject);
+                resume.setUpdateTime(new Date());
+                resume.setDelFlag(false);
+                resume.setBirthday(birthday);
+                resume.setDreamAdd(dreamAdd);
+                resume.setDreamMoney(dreamMoney);
+                resume.setWorkExp(workExp);
+                resume.setEducation(education);
+                resume.setIntroduction(introduction);
+                resume.setJobStatus(jobStatus);
+                resume.setJobUserId(subject);
+                resume.setPositionCategoryId(categoryId);
+                resume.setSex(sex);
+                resume.setStatus(status);
+                resume.setResumeUrls(resumeUrls);
+
+                JSONObject jsonObject = JSONObject.parseObject(expJson);
+                ExpJsonDTO expJsonDTO = JSON.toJavaObject(jsonObject,ExpJsonDTO.class );
+                if(expJsonDTO != null){
+                    List<EducationExpDTO> educationExpList = expJsonDTO.getEducationExp();
+                    if(educationExpList.size() > 0){
+                        updateEducationExp(resume.getId(),educationExpList,subject);
+                    }
+
+                    List<WorkExpDTO> workExpDTOList = expJsonDTO.getWorkExp();
+                    if(workExpDTOList.size() > 0){
+                        updateWorkExp(resume.getId(),workExpDTOList,subject);
+                    }
                 }
+                resume.setApproveStatus("2");//审批中
+                resumeService.update(resume);
             }
 
-            ResumeDeliver rd = new ResumeDeliver();
-            rd.setId(UUID.randomUUID().toString());
-            rd.setCreateBy(subject);
-            rd.setCreateTime(new Date());
-            rd.setDelFlag(false);
-            rd.setJobRecruitmentId(recruitmentId);
-            rd.setJobUserId(subject);
-            rd.setStatus("0");
+            //创建简历审批信息
+            ResumeApprove ra = new ResumeApprove();
+            ra.setId(UUID.randomUUID().toString());
+            ra.setCreateBy(subject);
+            ra.setCreateTime(new Date());
+            ra.setDelFlag(false);
+            ra.setJobResumeId(resume.getId());
+            ra.setApprovalStatus("2");//简历审批中
+            resumeApproveService.insert(ra);
 
-            int inCount = resumeDeliverService.insert(rd);
-            if(inCount > 0) {
-                messageResult.setMessage("投递成功");
-                messageResult.setResult(true);
-                messageResult.setCode(200);
-            }else{
-                messageResult.setMessage("投递失败");
-                messageResult.setResult(false);
-                messageResult.setCode(400);
-                return messageResult;
-            }
+
+            messageResult.setResult(true);
+            messageResult.setData("保存成功,请等待审批");
         } catch (Exception ex) {
+            ex.printStackTrace();
             log.error(ex.getMessage());
             messageResult.setResult(false);
             messageResult.setMessage(ex.getMessage());
@@ -383,4 +449,97 @@ public class ResumeApiController {
 
         return messageResult;
     }
+
+    public int updateEducationExp(String resumeId,List<EducationExpDTO> educationExpList,String subject) {
+        int updateCount = 0;
+        try {
+            int i = 0;
+            for(EducationExpDTO expDTO:educationExpList){
+                i++;
+                if(StringUtils.isNotEmpty(expDTO.getId())){
+                    ResumeEducationExperience ree = resumeEducationExperienceService.get(expDTO.getId());
+                    ree.setUpdateBy(subject);
+                    ree.setUpdateTime(new Date());
+                    ree.setDelFlag(false);
+                    ree.setResumeId(resumeId);
+                    ree.setSchoolName(expDTO.getName());
+                    ree.setMajor(expDTO.getContent());
+                    ree.setEducation(expDTO.getRemark());
+                    ree.setStartTime(expDTO.getTimeS());
+                    ree.setEndTime(expDTO.getTimeE());
+                    ree.setSortNo(i);
+                    updateCount += resumeEducationExperienceService.update(ree);
+                }else{
+                    ResumeEducationExperience ree = new ResumeEducationExperience();
+                    ree.setId(UUID.randomUUID().toString());
+                    ree.setCreateBy(subject);
+                    ree.setCreateTime(new Date());
+                    ree.setDelFlag(false);
+                    ree.setResumeId(resumeId);
+                    ree.setSchoolName(expDTO.getName());
+                    ree.setMajor(expDTO.getContent());
+                    ree.setEducation(expDTO.getRemark());
+                    ree.setStartTime(expDTO.getTimeS());
+                    ree.setEndTime(expDTO.getTimeE());
+                    ree.setSortNo(i);
+                    updateCount += resumeEducationExperienceService.insert(ree);
+                }
+            }
+        } catch (Exception ex) {
+            log.error(ex.getMessage());
+        }
+
+        return updateCount;
+    }
+
+    public int updateWorkExp(String resumeId,List<WorkExpDTO> WorkExpList,String subject) {
+        int updateCount = 0;
+        try {
+            int i = 0;
+            for(WorkExpDTO expDTO:WorkExpList){
+                i++;
+                if(StringUtils.isNotEmpty(expDTO.getId())){
+                    ResumeWorkExperience rwe = resumeWorkExperienceService.get(expDTO.getId());
+                    rwe.setUpdateBy(subject);
+                    rwe.setUpdateTime(new Date());
+                    rwe.setDelFlag(false);
+                    rwe.setResumeId(resumeId);
+                    rwe.setCompanyName(expDTO.getName());
+                    rwe.setContent(expDTO.getContent());
+                    rwe.setJob(expDTO.getRemark());
+                    rwe.setStartTime(expDTO.getTimeS());
+                    rwe.setEndTime(expDTO.getTimeE());
+                    rwe.setSortNo(i);
+                    updateCount += resumeWorkExperienceService.update(rwe);
+                }else{
+                    ResumeWorkExperience rwe = new ResumeWorkExperience();
+                    rwe.setId(UUID.randomUUID().toString());
+                    rwe.setCreateBy(subject);
+                    rwe.setCreateTime(new Date());
+                    rwe.setDelFlag(false);
+                    rwe.setResumeId(resumeId);
+                    rwe.setCompanyName(expDTO.getName());
+                    rwe.setContent(expDTO.getContent());
+                    rwe.setJob(expDTO.getRemark());
+                    rwe.setStartTime(expDTO.getTimeS());
+                    rwe.setEndTime(expDTO.getTimeE());
+                    rwe.setSortNo(i);
+                    updateCount += resumeWorkExperienceService.insert(rwe);
+                }
+            }
+        } catch (Exception ex) {
+            log.error(ex.getMessage());
+        }
+
+        return updateCount;
+    }
+
+    public static void main(String[] args) {
+        String workExpJson = "{\"workExp\":[{\"id\":\"123\",\"name\":\"标题一\",\"timeS\":\"2020\",\"timeE\":\"2021\",\"remark\":\"工作1\",\"content\":\"内容\"},{\"id\":\"223\",\"name\":\"标题二\",\"timeS\":\"2022\",\"timeE\":\"至今\",\"remark\":\"工作2\",\"content\":\"内容2\"}],\"educationExp\":[{\"id\":\"323\",\"name\":\"标题一\",\"timeS\":\"2025\",\"timeE\":\"2026\",\"remark\":\"教育1\",\"content\":\"内容1\"},{\"id\":\"423\",\"name\":\"标题一\",\"timeS\":\"1\",\"timeE\":\"2\",\"remark\":\"教育2\",\"content\":\"内容2\"}]}";
+
+        JSONObject jsonObject = JSONObject.parseObject(workExpJson);
+        ExpJsonDTO share = JSON.toJavaObject(jsonObject,ExpJsonDTO.class );
+        System.out.println("aaaaa");
+
+    }
 }