处理简历不在限制非空
This commit is contained in:
@@ -3,7 +3,7 @@ package org.jiayunet.pojo.param.resume;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jiayunet.pojo.vo.DescriptionParagraph;
|
import org.jiayunet.pojo.vo.DescriptionParagraph;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.Size;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -15,13 +15,15 @@ import java.util.List;
|
|||||||
public class ResumeCompetitionParam {
|
public class ResumeCompetitionParam {
|
||||||
|
|
||||||
/** 竞赛名称 */
|
/** 竞赛名称 */
|
||||||
@NotBlank(message = "竞赛名称不能为空")
|
@Size(max = 200, message = "竞赛名称长度不能超过200")
|
||||||
private String competitionName;
|
private String competitionName;
|
||||||
|
|
||||||
/** 获奖情况,如全国二等奖 */
|
/** 获奖情况,如全国二等奖 */
|
||||||
|
@Size(max = 200, message = "获奖情况长度不能超过200")
|
||||||
private String award;
|
private String award;
|
||||||
|
|
||||||
/** 获奖时间,格式:2023.07 */
|
/** 获奖时间,格式:2023.07 */
|
||||||
|
@Size(max = 10, message = "获奖时间长度不能超过10")
|
||||||
private String awardDate;
|
private String awardDate;
|
||||||
|
|
||||||
/** 描述段落 */
|
/** 描述段落 */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.jiayunet.pojo.param.resume;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jiayunet.pojo.vo.DescriptionParagraph;
|
import org.jiayunet.pojo.vo.DescriptionParagraph;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.Size;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -15,22 +15,27 @@ import java.util.List;
|
|||||||
public class ResumeEducationParam {
|
public class ResumeEducationParam {
|
||||||
|
|
||||||
/** 学校名称 */
|
/** 学校名称 */
|
||||||
@NotBlank(message = "学校名称不能为空")
|
@Size(max = 100, message = "学校名称长度不能超过100")
|
||||||
private String school;
|
private String school;
|
||||||
|
|
||||||
/** 专业 */
|
/** 专业 */
|
||||||
|
@Size(max = 100, message = "专业长度不能超过100")
|
||||||
private String major;
|
private String major;
|
||||||
|
|
||||||
/** 学历:大专/本科/硕士/博士 */
|
/** 学历:大专/本科/硕士/博士 */
|
||||||
|
@Size(max = 20, message = "学历长度不能超过20")
|
||||||
private String degree;
|
private String degree;
|
||||||
|
|
||||||
/** 学习形式:全日制/非全日制 */
|
/** 学习形式:全日制/非全日制 */
|
||||||
|
@Size(max = 20, message = "学习形式长度不能超过20")
|
||||||
private String studyType;
|
private String studyType;
|
||||||
|
|
||||||
/** 开始时间,格式:2023.09 */
|
/** 开始时间,格式:2023.09 */
|
||||||
|
@Size(max = 10, message = "开始时间长度不能超过10")
|
||||||
private String startDate;
|
private String startDate;
|
||||||
|
|
||||||
/** 结束时间,格式:2024.06 */
|
/** 结束时间,格式:2024.06 */
|
||||||
|
@Size(max = 10, message = "结束时间长度不能超过10")
|
||||||
private String endDate;
|
private String endDate;
|
||||||
|
|
||||||
/** 描述段落 */
|
/** 描述段落 */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.jiayunet.pojo.param.resume;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jiayunet.pojo.vo.DescriptionParagraph;
|
import org.jiayunet.pojo.vo.DescriptionParagraph;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.Size;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -15,18 +15,19 @@ import java.util.List;
|
|||||||
public class ResumeInternshipParam {
|
public class ResumeInternshipParam {
|
||||||
|
|
||||||
/** 公司名称 */
|
/** 公司名称 */
|
||||||
@NotBlank(message = "公司名称不能为空")
|
@Size(max = 200, message = "公司名称长度不能超过200")
|
||||||
private String companyName;
|
private String companyName;
|
||||||
|
|
||||||
/** 职位 */
|
/** 职位 */
|
||||||
@NotBlank(message = "职位不能为空")
|
@Size(max = 100, message = "职位长度不能超过100")
|
||||||
private String position;
|
private String position;
|
||||||
|
|
||||||
/** 开始时间,格式:2023.06 */
|
/** 开始时间,格式:2023.06 */
|
||||||
@NotBlank(message = "开始时间不能为空")
|
@Size(max = 10, message = "开始时间长度不能超过10")
|
||||||
private String startDate;
|
private String startDate;
|
||||||
|
|
||||||
/** 结束时间,格式:2023.09,至今则为空 */
|
/** 结束时间,格式:2023.09,至今则为空 */
|
||||||
|
@Size(max = 10, message = "结束时间长度不能超过10")
|
||||||
private String endDate;
|
private String endDate;
|
||||||
|
|
||||||
/** 描述段落 */
|
/** 描述段落 */
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package org.jiayunet.pojo.param.resume;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -16,30 +17,39 @@ public class ResumeParam {
|
|||||||
private Long resumeId;
|
private Long resumeId;
|
||||||
|
|
||||||
/** 简历名称 */
|
/** 简历名称 */
|
||||||
|
@Size(max = 100, message = "简历名称长度不能超过100")
|
||||||
private String resumeName;
|
private String resumeName;
|
||||||
|
|
||||||
/** 目标岗位 */
|
/** 目标岗位 */
|
||||||
|
@Size(max = 100, message = "目标岗位长度不能超过100")
|
||||||
private String targetPosition;
|
private String targetPosition;
|
||||||
|
|
||||||
/** 头像URL */
|
/** 头像URL */
|
||||||
|
@Size(max = 500, message = "头像URL长度不能超过500")
|
||||||
private String avatarUrl;
|
private String avatarUrl;
|
||||||
|
|
||||||
/** 真实姓名 */
|
/** 真实姓名 */
|
||||||
|
@Size(max = 50, message = "真实姓名长度不能超过50")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/** 邮箱 */
|
/** 邮箱 */
|
||||||
|
@Size(max = 100, message = "邮箱长度不能超过100")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
/** 手机号码 */
|
/** 手机号码 */
|
||||||
|
@Size(max = 20, message = "手机号码长度不能超过20")
|
||||||
private String mobileNumber;
|
private String mobileNumber;
|
||||||
|
|
||||||
/** 所在城市 */
|
/** 所在城市 */
|
||||||
|
@Size(max = 50, message = "所在城市长度不能超过50")
|
||||||
private String city;
|
private String city;
|
||||||
|
|
||||||
/** 微信号 */
|
/** 微信号 */
|
||||||
|
@Size(max = 50, message = "微信号长度不能超过50")
|
||||||
private String wechatNumber;
|
private String wechatNumber;
|
||||||
|
|
||||||
/** 作品集链接 */
|
/** 作品集链接 */
|
||||||
|
@Size(max = 500, message = "作品集链接长度不能超过500")
|
||||||
private String portfolioUrl;
|
private String portfolioUrl;
|
||||||
|
|
||||||
/** 技能标签列表 */
|
/** 技能标签列表 */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.jiayunet.pojo.param.resume;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jiayunet.pojo.vo.DescriptionParagraph;
|
import org.jiayunet.pojo.vo.DescriptionParagraph;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.Size;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -15,20 +15,23 @@ import java.util.List;
|
|||||||
public class ResumeProjectParam {
|
public class ResumeProjectParam {
|
||||||
|
|
||||||
/** 所属公司 */
|
/** 所属公司 */
|
||||||
|
@Size(max = 200, message = "所属公司长度不能超过200")
|
||||||
private String companyName;
|
private String companyName;
|
||||||
|
|
||||||
/** 项目名称 */
|
/** 项目名称 */
|
||||||
@NotBlank(message = "项目名称不能为空")
|
@Size(max = 200, message = "项目名称长度不能超过200")
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
/** 担任角色 */
|
/** 担任角色 */
|
||||||
|
@Size(max = 100, message = "担任角色长度不能超过100")
|
||||||
private String role;
|
private String role;
|
||||||
|
|
||||||
/** 开始时间,格式:2023.06 */
|
/** 开始时间,格式:2023.06 */
|
||||||
@NotBlank(message = "开始时间不能为空")
|
@Size(max = 10, message = "开始时间长度不能超过10")
|
||||||
private String startDate;
|
private String startDate;
|
||||||
|
|
||||||
/** 结束时间,格式:2023.09,至今则为空 */
|
/** 结束时间,格式:2023.09,至今则为空 */
|
||||||
|
@Size(max = 10, message = "结束时间长度不能超过10")
|
||||||
private String endDate;
|
private String endDate;
|
||||||
|
|
||||||
/** 描述段落 */
|
/** 描述段落 */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.jiayunet.pojo.param.resume;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jiayunet.pojo.vo.DescriptionParagraph;
|
import org.jiayunet.pojo.vo.DescriptionParagraph;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.Size;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -15,18 +15,19 @@ import java.util.List;
|
|||||||
public class ResumeWorkParam {
|
public class ResumeWorkParam {
|
||||||
|
|
||||||
/** 公司名称 */
|
/** 公司名称 */
|
||||||
@NotBlank(message = "公司名称不能为空")
|
@Size(max = 200, message = "公司名称长度不能超过200")
|
||||||
private String companyName;
|
private String companyName;
|
||||||
|
|
||||||
/** 职位 */
|
/** 职位 */
|
||||||
@NotBlank(message = "职位不能为空")
|
@Size(max = 100, message = "职位长度不能超过100")
|
||||||
private String position;
|
private String position;
|
||||||
|
|
||||||
/** 开始时间,格式:2023.06 */
|
/** 开始时间,格式:2023.06 */
|
||||||
@NotBlank(message = "开始时间不能为空")
|
@Size(max = 10, message = "开始时间长度不能超过10")
|
||||||
private String startDate;
|
private String startDate;
|
||||||
|
|
||||||
/** 结束时间,格式:2023.09,至今则为空 */
|
/** 结束时间,格式:2023.09,至今则为空 */
|
||||||
|
@Size(max = 10, message = "结束时间长度不能超过10")
|
||||||
private String endDate;
|
private String endDate;
|
||||||
|
|
||||||
/** 描述段落 */
|
/** 描述段落 */
|
||||||
|
|||||||
@@ -341,15 +341,18 @@ public class UserProfileService {
|
|||||||
Long profileId;
|
Long profileId;
|
||||||
if (existing != null) {
|
if (existing != null) {
|
||||||
profileId = existing.getId();
|
profileId = existing.getId();
|
||||||
existing.setName(resume.getName());
|
// A语义:严格镜像简历共有字段(含清空为null),与子表先删后插的镜像行为一致;
|
||||||
existing.setEmail(resume.getEmail());
|
// idCard/regionCode及AI派生字段(schoolRank/majorIds等)为个人资料独有,不在同步范围
|
||||||
existing.setMobileNumber(resume.getMobileNumber());
|
userProfileMapper.update(null, new com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper<UserProfile>()
|
||||||
existing.setWechatNumber(resume.getWechatNumber());
|
.eq(UserProfile::getId, profileId)
|
||||||
existing.setPortfolioUrl(resume.getPortfolioUrl());
|
.set(UserProfile::getName, resume.getName())
|
||||||
existing.setSkills(resume.getSkills());
|
.set(UserProfile::getEmail, resume.getEmail())
|
||||||
existing.setCertificates(resume.getCertificates());
|
.set(UserProfile::getMobileNumber, resume.getMobileNumber())
|
||||||
existing.setUpdateTime(now);
|
.set(UserProfile::getWechatNumber, resume.getWechatNumber())
|
||||||
userProfileMapper.updateById(existing);
|
.set(UserProfile::getPortfolioUrl, resume.getPortfolioUrl())
|
||||||
|
.set(UserProfile::getSkills, resume.getSkills(), JSON_TYPE_HANDLER)
|
||||||
|
.set(UserProfile::getCertificates, resume.getCertificates(), JSON_TYPE_HANDLER)
|
||||||
|
.set(UserProfile::getUpdateTime, now));
|
||||||
} else {
|
} else {
|
||||||
UserProfile profile = new UserProfile();
|
UserProfile profile = new UserProfile();
|
||||||
profile.setUserId(userId);
|
profile.setUserId(userId);
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ public class UserResumeService {
|
|||||||
@Value("${app.resume.max-count:5}")
|
@Value("${app.resume.max-count:5}")
|
||||||
private int maxResumeCount;
|
private int maxResumeCount;
|
||||||
|
|
||||||
|
/** JSON字段的TypeHandler,UpdateWrapper显式set时需指定,否则JSON字段不会正确序列化 */
|
||||||
|
private static final String JSON_TYPE_HANDLER = "typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserResumeEducationMapper educationMapper;
|
private UserResumeEducationMapper educationMapper;
|
||||||
|
|
||||||
@@ -115,16 +118,24 @@ public class UserResumeService {
|
|||||||
userResumeMapper.insert(resume);
|
userResumeMapper.insert(resume);
|
||||||
return resume.getId();
|
return resume.getId();
|
||||||
}
|
}
|
||||||
// 更新已有简历
|
// 更新已有简历(用户可编辑字段用LambdaUpdateWrapper显式set,允许清空为null,绕过全局update-strategy=not_null)
|
||||||
UserResume existing = userResumeMapper.selectById(resumeId);
|
UserResume existing = userResumeMapper.selectById(resumeId);
|
||||||
checkOwnership(existing);
|
checkOwnership(existing);
|
||||||
resume.setId(resumeId);
|
userResumeMapper.update(null, new LambdaUpdateWrapper<UserResume>()
|
||||||
resume.setUserId(userId);
|
.eq(UserResume::getId, resumeId)
|
||||||
resume.setCreateTime(existing.getCreateTime());
|
.set(UserResume::getResumeName, resume.getResumeName())
|
||||||
resume.setUpdateTime(now);
|
.set(UserResume::getTargetPosition, resume.getTargetPosition())
|
||||||
resume.setIsDefault(existing.getIsDefault());
|
.set(UserResume::getAvatarUrl, resume.getAvatarUrl())
|
||||||
resume.setSortOrder(existing.getSortOrder());
|
.set(UserResume::getName, resume.getName())
|
||||||
userResumeMapper.updateById(resume);
|
.set(UserResume::getEmail, resume.getEmail())
|
||||||
|
.set(UserResume::getMobileNumber, resume.getMobileNumber())
|
||||||
|
.set(UserResume::getCity, resume.getCity())
|
||||||
|
.set(UserResume::getWechatNumber, resume.getWechatNumber())
|
||||||
|
.set(UserResume::getPortfolioUrl, resume.getPortfolioUrl())
|
||||||
|
.set(UserResume::getSkills, resume.getSkills(), JSON_TYPE_HANDLER)
|
||||||
|
.set(UserResume::getCertificates, resume.getCertificates(), JSON_TYPE_HANDLER)
|
||||||
|
.set(UserResume::getSummary, resume.getSummary())
|
||||||
|
.set(UserResume::getUpdateTime, now));
|
||||||
return resumeId;
|
return resumeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,12 +502,17 @@ public class UserResumeService {
|
|||||||
UserResumeEducation existing = educationMapper.selectById(po.getId());
|
UserResumeEducation existing = educationMapper.selectById(po.getId());
|
||||||
Assert.notNull(existing, "教育经历不存在");
|
Assert.notNull(existing, "教育经历不存在");
|
||||||
checkResumeOwnership(existing.getResumeId());
|
checkResumeOwnership(existing.getResumeId());
|
||||||
po.setResumeId(existing.getResumeId());
|
// 显式set用户可编辑字段(允许清空为null);resumeId/userId/sortOrder/createTime保留原值
|
||||||
po.setUserId(existing.getUserId());
|
educationMapper.update(null, new LambdaUpdateWrapper<UserResumeEducation>()
|
||||||
po.setSortOrder(existing.getSortOrder());
|
.eq(UserResumeEducation::getId, po.getId())
|
||||||
po.setCreateTime(existing.getCreateTime());
|
.set(UserResumeEducation::getSchool, po.getSchool())
|
||||||
po.setUpdateTime(Instant.now());
|
.set(UserResumeEducation::getMajor, po.getMajor())
|
||||||
educationMapper.updateById(po);
|
.set(UserResumeEducation::getDegree, po.getDegree())
|
||||||
|
.set(UserResumeEducation::getStudyType, po.getStudyType())
|
||||||
|
.set(UserResumeEducation::getStartDate, po.getStartDate())
|
||||||
|
.set(UserResumeEducation::getEndDate, po.getEndDate())
|
||||||
|
.set(UserResumeEducation::getDescription, po.getDescription(), JSON_TYPE_HANDLER)
|
||||||
|
.set(UserResumeEducation::getUpdateTime, Instant.now()));
|
||||||
touchResumeUpdateTime(existing.getResumeId());
|
touchResumeUpdateTime(existing.getResumeId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -509,12 +525,15 @@ public class UserResumeService {
|
|||||||
UserResumeWork existing = workMapper.selectById(po.getId());
|
UserResumeWork existing = workMapper.selectById(po.getId());
|
||||||
Assert.notNull(existing, "工作经历不存在");
|
Assert.notNull(existing, "工作经历不存在");
|
||||||
checkResumeOwnership(existing.getResumeId());
|
checkResumeOwnership(existing.getResumeId());
|
||||||
po.setResumeId(existing.getResumeId());
|
// 显式set用户可编辑字段(允许清空为null);resumeId/userId/sortOrder/createTime保留原值
|
||||||
po.setUserId(existing.getUserId());
|
workMapper.update(null, new LambdaUpdateWrapper<UserResumeWork>()
|
||||||
po.setSortOrder(existing.getSortOrder());
|
.eq(UserResumeWork::getId, po.getId())
|
||||||
po.setCreateTime(existing.getCreateTime());
|
.set(UserResumeWork::getCompanyName, po.getCompanyName())
|
||||||
po.setUpdateTime(Instant.now());
|
.set(UserResumeWork::getPosition, po.getPosition())
|
||||||
workMapper.updateById(po);
|
.set(UserResumeWork::getStartDate, po.getStartDate())
|
||||||
|
.set(UserResumeWork::getEndDate, po.getEndDate())
|
||||||
|
.set(UserResumeWork::getDescription, po.getDescription(), JSON_TYPE_HANDLER)
|
||||||
|
.set(UserResumeWork::getUpdateTime, Instant.now()));
|
||||||
touchResumeUpdateTime(existing.getResumeId());
|
touchResumeUpdateTime(existing.getResumeId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -527,12 +546,15 @@ public class UserResumeService {
|
|||||||
UserResumeInternship existing = internshipMapper.selectById(po.getId());
|
UserResumeInternship existing = internshipMapper.selectById(po.getId());
|
||||||
Assert.notNull(existing, "实习经历不存在");
|
Assert.notNull(existing, "实习经历不存在");
|
||||||
checkResumeOwnership(existing.getResumeId());
|
checkResumeOwnership(existing.getResumeId());
|
||||||
po.setResumeId(existing.getResumeId());
|
// 显式set用户可编辑字段(允许清空为null);resumeId/userId/sortOrder/createTime保留原值
|
||||||
po.setUserId(existing.getUserId());
|
internshipMapper.update(null, new LambdaUpdateWrapper<UserResumeInternship>()
|
||||||
po.setSortOrder(existing.getSortOrder());
|
.eq(UserResumeInternship::getId, po.getId())
|
||||||
po.setCreateTime(existing.getCreateTime());
|
.set(UserResumeInternship::getCompanyName, po.getCompanyName())
|
||||||
po.setUpdateTime(Instant.now());
|
.set(UserResumeInternship::getPosition, po.getPosition())
|
||||||
internshipMapper.updateById(po);
|
.set(UserResumeInternship::getStartDate, po.getStartDate())
|
||||||
|
.set(UserResumeInternship::getEndDate, po.getEndDate())
|
||||||
|
.set(UserResumeInternship::getDescription, po.getDescription(), JSON_TYPE_HANDLER)
|
||||||
|
.set(UserResumeInternship::getUpdateTime, Instant.now()));
|
||||||
touchResumeUpdateTime(existing.getResumeId());
|
touchResumeUpdateTime(existing.getResumeId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -545,12 +567,16 @@ public class UserResumeService {
|
|||||||
UserResumeProject existing = projectMapper.selectById(po.getId());
|
UserResumeProject existing = projectMapper.selectById(po.getId());
|
||||||
Assert.notNull(existing, "项目经历不存在");
|
Assert.notNull(existing, "项目经历不存在");
|
||||||
checkResumeOwnership(existing.getResumeId());
|
checkResumeOwnership(existing.getResumeId());
|
||||||
po.setResumeId(existing.getResumeId());
|
// 显式set用户可编辑字段(允许清空为null);resumeId/userId/sortOrder/createTime保留原值
|
||||||
po.setUserId(existing.getUserId());
|
projectMapper.update(null, new LambdaUpdateWrapper<UserResumeProject>()
|
||||||
po.setSortOrder(existing.getSortOrder());
|
.eq(UserResumeProject::getId, po.getId())
|
||||||
po.setCreateTime(existing.getCreateTime());
|
.set(UserResumeProject::getCompanyName, po.getCompanyName())
|
||||||
po.setUpdateTime(Instant.now());
|
.set(UserResumeProject::getProjectName, po.getProjectName())
|
||||||
projectMapper.updateById(po);
|
.set(UserResumeProject::getRole, po.getRole())
|
||||||
|
.set(UserResumeProject::getStartDate, po.getStartDate())
|
||||||
|
.set(UserResumeProject::getEndDate, po.getEndDate())
|
||||||
|
.set(UserResumeProject::getDescription, po.getDescription(), JSON_TYPE_HANDLER)
|
||||||
|
.set(UserResumeProject::getUpdateTime, Instant.now()));
|
||||||
touchResumeUpdateTime(existing.getResumeId());
|
touchResumeUpdateTime(existing.getResumeId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -563,12 +589,14 @@ public class UserResumeService {
|
|||||||
UserResumeCompetition existing = competitionMapper.selectById(po.getId());
|
UserResumeCompetition existing = competitionMapper.selectById(po.getId());
|
||||||
Assert.notNull(existing, "竞赛经历不存在");
|
Assert.notNull(existing, "竞赛经历不存在");
|
||||||
checkResumeOwnership(existing.getResumeId());
|
checkResumeOwnership(existing.getResumeId());
|
||||||
po.setResumeId(existing.getResumeId());
|
// 显式set用户可编辑字段(允许清空为null);resumeId/userId/sortOrder/createTime保留原值
|
||||||
po.setUserId(existing.getUserId());
|
competitionMapper.update(null, new LambdaUpdateWrapper<UserResumeCompetition>()
|
||||||
po.setSortOrder(existing.getSortOrder());
|
.eq(UserResumeCompetition::getId, po.getId())
|
||||||
po.setCreateTime(existing.getCreateTime());
|
.set(UserResumeCompetition::getCompetitionName, po.getCompetitionName())
|
||||||
po.setUpdateTime(Instant.now());
|
.set(UserResumeCompetition::getAward, po.getAward())
|
||||||
competitionMapper.updateById(po);
|
.set(UserResumeCompetition::getAwardDate, po.getAwardDate())
|
||||||
|
.set(UserResumeCompetition::getDescription, po.getDescription(), JSON_TYPE_HANDLER)
|
||||||
|
.set(UserResumeCompetition::getUpdateTime, Instant.now()));
|
||||||
touchResumeUpdateTime(existing.getResumeId());
|
touchResumeUpdateTime(existing.getResumeId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user