Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
张文彪
/
employmentBusinessPc
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2266fcfb
authored
Nov 28, 2025
by
zwb
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
新增简历模块列表查询与排序
parent
ab25ca45
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
0 deletions
employmentBusiness-pc-modules/employmentBusiness-pc-system/src/main/java/com/bkty/system/controller/NewEditionResumeController.java
employmentBusiness-pc-modules/employmentBusiness-pc-system/src/main/java/com/bkty/system/service/resume/NewEditionResumeService.java
employmentBusiness-pc-modules/employmentBusiness-pc-system/src/main/java/com/bkty/system/service/resume/impl/NewEditionResumeServiceImpl.java
employmentBusiness-pc-modules/employmentBusiness-pc-system/src/main/java/com/bkty/system/controller/NewEditionResumeController.java
View file @
2266fcfb
package
com
.
bkty
.
system
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.bkty.system.api.model.LoginUser
;
import
com.bkty.system.domain.dto.ModuleOptimizationDto
;
import
com.bkty.system.domain.dto.ResumeByPdfDto
;
import
com.bkty.system.domain.dto.ResumeListItemCache
;
import
com.bkty.system.domain.dto.ResumeMakeDto
;
import
com.bkty.system.domain.vo.ResumeModelVo
;
import
com.bkty.system.domain.vo.ResumeVo
;
import
com.bkty.system.service.resume.NewEditionResumeService
;
import
com.bkty.system.service.resume.ResumeCacheService
;
...
...
@@ -22,6 +24,7 @@ import org.dromara.common.satoken.utils.LoginHelper;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -162,4 +165,36 @@ public class NewEditionResumeController {
return
new
R
<>(
this
.
newEditionResumeService
.
queryModuleOptimization
(
dto
));
}
/**
* 根据简历id查询简历模块列表
* @param resumeId
* @return
*/
@GetMapping
(
value
=
"/query-resume-model"
)
public
R
<
List
<
ResumeModelVo
>>
queryResumeModel
(
@RequestParam
(
"resumeId"
)
Long
resumeId
){
List
<
ResumeModelVo
>
resumeModelVos
=
resumeCacheService
.
queryResumeModelCache
(
resumeId
);
if
(
CollectionUtil
.
isNotEmpty
(
resumeModelVos
)){
resumeModelVos
.
sort
(
Comparator
.
comparing
(
ResumeModelVo:
:
getDataSort
));
return
new
R
<>(
resumeModelVos
);
}
List
<
ResumeModelVo
>
resultList
=
this
.
newEditionResumeService
.
queryModelList
(
resumeId
);
return
new
R
<>(
resultList
);
}
/**
* 模块排序
* @param dto
* @return
*/
@PostMapping
(
value
=
"/resume-model-sort"
)
@RepeatSubmit
public
R
<
Void
>
resumeModelSort
(
@RequestBody
ResumeMakeDto
dto
){
if
(
null
==
dto
.
getResumeId
()){
throw
new
JxgException
(
"简历id不能为空"
);
}
this
.
newEditionResumeService
.
resumeModelSort
(
dto
);
this
.
resumeCacheService
.
updateModelSort
(
dto
);
return
new
R
<>();
}
}
employmentBusiness-pc-modules/employmentBusiness-pc-system/src/main/java/com/bkty/system/service/resume/NewEditionResumeService.java
View file @
2266fcfb
...
...
@@ -3,6 +3,7 @@ package com.bkty.system.service.resume;
import
com.bkty.system.domain.dto.ModuleOptimizationDto
;
import
com.bkty.system.domain.dto.ResumeListItemCache
;
import
com.bkty.system.domain.dto.ResumeMakeDto
;
import
com.bkty.system.domain.vo.ResumeModelVo
;
import
com.bkty.system.domain.vo.ResumeVo
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -77,4 +78,16 @@ public interface NewEditionResumeService {
*/
String
queryModuleOptimization
(
ModuleOptimizationDto
dto
)
throws
Exception
;
/**
* 查询模块
* @param resumeId
* @return
*/
List
<
ResumeModelVo
>
queryModelList
(
Long
resumeId
);
/**
* 简历模块排序
* @param dto
*/
void
resumeModelSort
(
ResumeMakeDto
dto
);
}
employmentBusiness-pc-modules/employmentBusiness-pc-system/src/main/java/com/bkty/system/service/resume/impl/NewEditionResumeServiceImpl.java
View file @
2266fcfb
...
...
@@ -776,6 +776,60 @@ public class NewEditionResumeServiceImpl implements NewEditionResumeService {
return
null
;
}
@Override
public
List
<
ResumeModelVo
>
queryModelList
(
Long
resumeId
)
{
QueryWrapper
<
FunctionResumeModel
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"resume_id"
,
resumeId
).
eq
(
"is_deleted"
,
0
).
orderByAsc
(
"data_sort"
);
List
<
FunctionResumeModel
>
models
=
this
.
resumeModelMapper
.
selectList
(
queryWrapper
);
if
(
CollectionUtil
.
isEmpty
(
models
))
{
return
List
.
of
();
}
List
<
ResumeModelVo
>
resultList
=
new
ArrayList
<>(
models
.
size
());
models
.
forEach
(
m
->
{
resumeCacheService
.
saveResumeModelListCache
(
m
,
resumeId
);
resultList
.
add
(
initModelVo
(
m
));
});
return
resultList
;
}
@Override
public
void
resumeModelSort
(
ResumeMakeDto
dto
)
{
if
(
CollectionUtil
.
isEmpty
(
dto
.
getModelSort
()))
{
UpdateWrapper
<
FunctionResumeModel
>
updateWrapper
=
new
UpdateWrapper
<>();
updateWrapper
.
eq
(
"resume_id"
,
dto
.
getResumeId
())
.
eq
(
"is_deleted"
,
0
)
.
set
(
"is_show"
,
1
);
this
.
resumeModelMapper
.
update
(
null
,
updateWrapper
);
//修改模块缓存
this
.
resumeCacheService
.
updateModelSort
(
dto
);
}
else
{
//排序
resumeModelMapper
.
updateDataSortByIds
(
dto
.
getModelSort
());
//不等于这个id的都不显示
UpdateWrapper
<
FunctionResumeModel
>
updateWrapper
=
new
UpdateWrapper
<>();
updateWrapper
.
notIn
(
"id"
,
dto
.
getModelSort
().
keySet
())
.
eq
(
"resume_id"
,
dto
.
getResumeId
())
.
eq
(
"is_deleted"
,
0
)
.
set
(
"is_show"
,
1
);
this
.
resumeModelMapper
.
update
(
null
,
updateWrapper
);
}
}
private
ResumeModelVo
initModelVo
(
FunctionResumeModel
m
)
{
ResumeModelVo
modelVo
=
new
ResumeModelVo
();
modelVo
.
setModelId
(
m
.
getId
());
modelVo
.
setModelType
(
m
.
getModelType
());
if
(
m
.
getIsShow
()
!=
null
)
{
modelVo
.
setIsShow
(
m
.
getIsShow
());
}
modelVo
.
setDataSort
(
m
.
getDataSort
());
modelVo
.
setModelName
(
m
.
getModelName
());
modelVo
.
setWebCode
(
ResumeEnum
.
ResumeModel
.
getWebCodeByCode
(
m
.
getModelType
()));
return
modelVo
;
}
/**
* 根据生日计算年龄
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment