Commit a07fd0b8 by zwb

添加简历名称修改

parent db93e21b
...@@ -291,7 +291,6 @@ public class NewEditionResumeController { ...@@ -291,7 +291,6 @@ public class NewEditionResumeController {
/** /**
* 查询简历分析详情 * 查询简历分析详情
*
* @param resumeId * @param resumeId
* @return * @return
*/ */
...@@ -300,4 +299,43 @@ public class NewEditionResumeController { ...@@ -300,4 +299,43 @@ public class NewEditionResumeController {
FunctionResumeSketch vo = this.resumeMakeService.queryResumeSketch(resumeId); FunctionResumeSketch vo = this.resumeMakeService.queryResumeSketch(resumeId);
return new R<>(vo); return new R<>(vo);
} }
/**
* 查询简历名称
* @param resumeId
* @return
*/
@GetMapping("/query-resume-name")
public R<String> queryResumeName(@RequestParam("resumeId") Long resumeId) {
LoginUser loginUser = LoginHelper.getLoginUser();
if (null == loginUser) {
throw new WarnException("用户信息获取失败");
}
Long userId = loginUser.getUserId();
String name = this.newEditionResumeService.queryResumeName(resumeId,userId);
return new R<>(name);
}
/**
* 修改简历名称
* @param dto
* @return
*/
@GetMapping("/update-resume-name")
public R updateResumeName(@RequestBody ResumeMakeDto dto) {
LoginUser loginUser = LoginHelper.getLoginUser();
if (null == loginUser) {
throw new WarnException("用户信息获取失败");
}
Long userId = loginUser.getUserId();
if (dto.getResumeId()==null){
throw new WarnException("简历id不能为空");
}
if (dto.getResumeName()==null){
throw new WarnException("简历名称不能为空");
}
return new R(this.newEditionResumeService.updateResumeName(Long.valueOf(dto.getResumeId()),dto.getResumeName(),userId));
}
} }
package com.bkty.system.service.resume; package com.bkty.system.service.resume;
import com.bkty.system.domain.dto.*; import com.bkty.system.domain.dto.*;
import com.bkty.system.domain.entity.FunctionResumeSketch;
import com.bkty.system.domain.vo.ResumeByPdfVo; import com.bkty.system.domain.vo.ResumeByPdfVo;
import com.bkty.system.domain.vo.ResumeModelVo; import com.bkty.system.domain.vo.ResumeModelVo;
import com.bkty.system.domain.vo.ResumeVo; import com.bkty.system.domain.vo.ResumeVo;
...@@ -129,4 +128,22 @@ public interface NewEditionResumeService { ...@@ -129,4 +128,22 @@ public interface NewEditionResumeService {
*/ */
ResumeByPdfVo createResumeMinPng(ResumeByPdfDto dto); ResumeByPdfVo createResumeMinPng(ResumeByPdfDto dto);
/**
* 查询简历名称
*
* @param resumeId
* @param userid
* @return
*/
String queryResumeName(Long resumeId, Long userid);
/**
* 修改简历名称
*
* @param resumeId
* @param resumeName
* @param userId
* @return
*/
Boolean updateResumeName(Long resumeId, String resumeName, Long userId);
} }
...@@ -1085,6 +1085,28 @@ public class NewEditionResumeServiceImpl implements NewEditionResumeService { ...@@ -1085,6 +1085,28 @@ public class NewEditionResumeServiceImpl implements NewEditionResumeService {
return vo; return vo;
} }
@Override
public String queryResumeName(Long resumeId, Long userId) {
FunctionResumeBase resumeBase = this.functionResumeBaseMapper.selectById(resumeId);
if(resumeBase == null){
throw new WarnException("该简历不存在");
}
return resumeBase.getResumeName();
}
@Override
public Boolean updateResumeName(Long resumeId, String resumeName, Long userId) {
FunctionResumeBase resumeBase = this.functionResumeBaseMapper.selectById(resumeId);
if(resumeBase == null){
throw new WarnException("该简历不存在");
}
resumeBase.setResumeName(resumeName);
this.functionResumeBaseMapper.updateById(resumeBase);
redisTemplate.delete(CacheConstants.REDIS_USER_RESUME_KEY.formatted(userId, resumeName));
this.resumeCacheService.delResumeListCache(userId);
return true;
}
public String sanitizeFileName(String fileName) { public String sanitizeFileName(String fileName) {
if (fileName == null) return null; if (fileName == null) return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment