init
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
package com.newyetai.recruit.user.controller;
|
||||
|
||||
|
||||
import com.newyetai.common.AlitaResult;
|
||||
import com.newyetai.common.util.UserContextHolder;
|
||||
import com.newyetai.common.validation.Create;
|
||||
import com.newyetai.common.validation.Update;
|
||||
import com.newyetai.tkmybatis.pojo.Page;
|
||||
import com.newyetai.recruit.user.dto.JobExpectDTO;
|
||||
import com.newyetai.recruit.user.dto.JobExpectOperateDTO;
|
||||
import com.newyetai.recruit.user.dto.JobExpectQueryDTO;
|
||||
import com.newyetai.recruit.user.service.JobExpectService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("job_expect")
|
||||
@Api(tags = "求职期望表")
|
||||
public class JobExpectController {
|
||||
|
||||
@Autowired
|
||||
private JobExpectService jobExpectService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@ApiOperation("创建")
|
||||
public AlitaResult<Long> create(@Validated(Create.class) @RequestBody JobExpectOperateDTO jobExpectOperateDTO){
|
||||
return AlitaResult.success(jobExpectService.create(jobExpectOperateDTO));
|
||||
}
|
||||
|
||||
@PutMapping("/modify")
|
||||
@ApiOperation("修改")
|
||||
public AlitaResult<Boolean> modify(@Validated(Update.class) @RequestBody JobExpectOperateDTO jobExpectOperateDTO){
|
||||
jobExpectService.modify(jobExpectOperateDTO);
|
||||
return AlitaResult.success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/modify_job_status")
|
||||
@ApiOperation("修改求职状态")
|
||||
public AlitaResult<Boolean> modifyOnDuty(@RequestBody JobExpectOperateDTO jobExpectOperateDTO){
|
||||
jobExpectService.modifyOnDuty(jobExpectOperateDTO);
|
||||
return AlitaResult.success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/remove/{id}")
|
||||
@ApiOperation("删除")
|
||||
public AlitaResult<Boolean> remove(@PathVariable Long id){
|
||||
jobExpectService.remove(id);
|
||||
return AlitaResult.success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("分页查询")
|
||||
public AlitaResult<Page<JobExpectDTO>> page(JobExpectQueryDTO jobExpectQueryDTO){
|
||||
jobExpectService.page(jobExpectQueryDTO);
|
||||
return AlitaResult.success(jobExpectQueryDTO.getPageResult());
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("列表查询")
|
||||
public AlitaResult<List<JobExpectDTO>> list(JobExpectQueryDTO jobExpectQueryDTO){
|
||||
if(jobExpectQueryDTO.getUserId() == null){
|
||||
jobExpectQueryDTO.setUserId(UserContextHolder.getLoginUserId());
|
||||
}
|
||||
return AlitaResult.success(jobExpectService.list(jobExpectQueryDTO));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.newyetai.recruit.user.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import com.newyetai.common.AlitaResult;
|
||||
import com.newyetai.common.validation.Create;
|
||||
import com.newyetai.common.validation.Update;
|
||||
import com.newyetai.tkmybatis.pojo.Page;
|
||||
import com.newyetai.recruit.user.dto.*;
|
||||
import com.newyetai.recruit.user.service.ResumeService;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 简历管理
|
||||
*
|
||||
* @author guixinman
|
||||
* @since 1.0.0 2024-04-19
|
||||
*/
|
||||
@Api(tags = "简历管理")
|
||||
@RestController
|
||||
@RequestMapping("/resume")
|
||||
public class ResumeController {
|
||||
|
||||
@Autowired
|
||||
private ResumeService resumeService;
|
||||
|
||||
@PostMapping("/createOrModify")
|
||||
@ApiOperation("简历管理-创建")
|
||||
public AlitaResult<Void> createOrModify(@RequestBody ResumeOperatorDTO operatorDTO) {
|
||||
resumeService.createOrModify(operatorDTO);
|
||||
return AlitaResult.success();
|
||||
}
|
||||
|
||||
@PutMapping("/modify")
|
||||
@ApiOperation("简历管理-修改")
|
||||
public AlitaResult<Void> modify(@RequestBody @Validated(Update.class) ResumeOperatorDTO operatorDTO) {
|
||||
resumeService.modify(operatorDTO);
|
||||
return AlitaResult.success();
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("简历管理-删除")
|
||||
public AlitaResult<Void> delete() {
|
||||
resumeService.delete();
|
||||
return AlitaResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@ApiOperation("简历管理-查询单个")
|
||||
public AlitaResult<ResumeDTO> findById(@PathVariable("id") Long id) {
|
||||
return AlitaResult.success(resumeService.findById(id));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("简历管理-列表查询")
|
||||
public AlitaResult<List<ResumeDTO>> list(ResumeQueryDTO queryDTO) {
|
||||
return AlitaResult.success(resumeService.list(queryDTO));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("简历管理-分页查询")
|
||||
public AlitaResult<Page<ResumeDTO>> page(ResumePageQueryDTO queryDTO) {
|
||||
resumeService.page(queryDTO);
|
||||
return AlitaResult.success(queryDTO.getPageResult());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/user_find")
|
||||
@ApiOperation("简历管理-用户查询单个")
|
||||
public AlitaResult<ResumeDTO> userFind() {
|
||||
return AlitaResult.success(resumeService.userFind());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.newyetai.recruit.user.controller;
|
||||
|
||||
|
||||
import com.newyetai.common.AlitaResult;
|
||||
import com.newyetai.common.util.UserContextHolder;
|
||||
import com.newyetai.tkmybatis.pojo.Page;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateCreateDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateModifyDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateQueryDTO;
|
||||
import com.newyetai.recruit.user.service.UserCertificateService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("user_certificate")
|
||||
@Api(tags = "用户证书表")
|
||||
public class UserCertificateController {
|
||||
|
||||
@Autowired
|
||||
private UserCertificateService userCertificateService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@ApiOperation("创建")
|
||||
public AlitaResult<Void> create(@Validated @RequestBody List<UserCertificateCreateDTO> operateDTOs){
|
||||
userCertificateService.create(operateDTOs);
|
||||
return AlitaResult.success();
|
||||
}
|
||||
|
||||
@PutMapping("/modify")
|
||||
@ApiOperation("修改")
|
||||
public AlitaResult<UserCertificateDTO> modify(
|
||||
@Validated @RequestBody UserCertificateModifyDTO operateDTO) {
|
||||
return AlitaResult.success(userCertificateService.modify(operateDTO));
|
||||
}
|
||||
|
||||
@DeleteMapping("/{id}")
|
||||
@ApiOperation("删除")
|
||||
public AlitaResult<UserCertificateDTO> delete(@PathVariable Long id){
|
||||
return AlitaResult.success(userCertificateService.delete(id));
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@ApiOperation("查询单个")
|
||||
public AlitaResult<UserCertificateDTO> findById(@PathVariable("id") Long id) {
|
||||
return AlitaResult.success(userCertificateService.findById(id));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("分页查询")
|
||||
public AlitaResult<Page<UserCertificateDTO>> page(UserCertificateQueryDTO queryDTO){
|
||||
if(queryDTO.getUserId() == null){
|
||||
queryDTO.setUserId(UserContextHolder.getLoginUserId());
|
||||
}
|
||||
userCertificateService.page(queryDTO);
|
||||
return AlitaResult.success(queryDTO.getPageResult());
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("列表查询")
|
||||
public AlitaResult<List<UserCertificateDTO>> list(UserCertificateQueryDTO queryDTO){
|
||||
if(queryDTO.getUserId() == null){
|
||||
queryDTO.setUserId(UserContextHolder.getLoginUserId());
|
||||
}
|
||||
return AlitaResult.success(userCertificateService.list(queryDTO));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.newyetai.recruit.user.controller;
|
||||
|
||||
import com.newyetai.common.AlitaResult;
|
||||
import com.newyetai.common.validation.Create;
|
||||
import com.newyetai.recruit.position.dto.PositionDTO;
|
||||
import com.newyetai.recruit.position.dto.PositionPageQueryDTO;
|
||||
import com.newyetai.tkmybatis.pojo.Page;
|
||||
import com.newyetai.recruit.user.dto.UserCollectionCreateDTO;
|
||||
import com.newyetai.recruit.user.service.UserCollectionService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
|
||||
/**
|
||||
* 招聘系统 - 我的收藏
|
||||
*
|
||||
* @author fzp
|
||||
* @date 2021年10月22日11:17:24
|
||||
*/
|
||||
@Api(tags = "招聘系统 - 用户职位")
|
||||
@RestController
|
||||
@RequestMapping("/user_collections")
|
||||
public class UserCollectionController {
|
||||
|
||||
@Autowired
|
||||
private UserCollectionService userCollectionService;
|
||||
|
||||
|
||||
@ApiOperation("查询收藏的职位列表")
|
||||
@GetMapping("/page")
|
||||
public AlitaResult<Page<PositionDTO>> page(PositionPageQueryDTO queryDTO) {
|
||||
userCollectionService.page(queryDTO);
|
||||
return AlitaResult.success(queryDTO.getPageResult());
|
||||
}
|
||||
|
||||
@ApiOperation("收藏职位")
|
||||
@PostMapping("/create")
|
||||
public AlitaResult create(@Validated(Create.class) @RequestBody UserCollectionCreateDTO dto) {
|
||||
userCollectionService.create(dto);
|
||||
return AlitaResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("取消收藏")
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public AlitaResult delete(@PathVariable("id") Long id) {
|
||||
return AlitaResult.success(userCollectionService.delete(id));
|
||||
}
|
||||
|
||||
@ApiOperation("收藏统计")
|
||||
@GetMapping("/statistics")
|
||||
public AlitaResult<Integer> statistics(){
|
||||
return AlitaResult.success(userCollectionService.statistics());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.newyetai.recruit.user.controller;
|
||||
|
||||
import com.newyetai.common.AlitaResult;
|
||||
import com.newyetai.recruit.user.dto.BrowseRecordUserPageQueryDTO;
|
||||
import com.newyetai.tkmybatis.pojo.Page;
|
||||
import com.newyetai.recruit.user.dto.BrowseRecordDTO;
|
||||
import com.newyetai.recruit.user.dto.BrowseRecordPageQueryDTO;
|
||||
import com.newyetai.recruit.user.service.BrowseRecordService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @description: 用户浏览
|
||||
* @author: guixinman
|
||||
* @create: 2024-04-18 17:15
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/user_position_browse_record")
|
||||
public class UserPositionBrowseRecordController {
|
||||
|
||||
@Autowired
|
||||
private BrowseRecordService browseRecordService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@ApiOperation("新增岗位浏览记录")
|
||||
public AlitaResult<Void> browseRecordCreate(@RequestBody @Validated BrowseRecordDTO recordDTO) {
|
||||
browseRecordService.create(recordDTO);
|
||||
return AlitaResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("分页查询岗位浏览记录")
|
||||
public AlitaResult<Page<BrowseRecordDTO>> browseRecordPage(BrowseRecordPageQueryDTO queryDTO) {
|
||||
browseRecordService.pagePosition(queryDTO);
|
||||
return AlitaResult.success(queryDTO.getPageResult());
|
||||
}
|
||||
|
||||
@ApiOperation("浏览统计")
|
||||
@GetMapping("/statistics")
|
||||
public AlitaResult<Integer> statistics(){
|
||||
return AlitaResult.success(browseRecordService.statistics());
|
||||
}
|
||||
|
||||
@GetMapping("/user_page")
|
||||
@ApiOperation("分页查询岗位浏览记录")
|
||||
public AlitaResult<Page<BrowseRecordDTO>> browseRecordUserPage(BrowseRecordUserPageQueryDTO queryDTO) {
|
||||
browseRecordService.browseRecordUserPage(queryDTO);
|
||||
return AlitaResult.success(queryDTO.getPageResult());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.newyetai.recruit.user.convert;
|
||||
|
||||
import com.newyetai.recruit.user.dto.JobExpectDTO;
|
||||
import com.newyetai.recruit.user.dto.JobExpectOperateDTO;
|
||||
import com.newyetai.recruit.user.entity.JobExpect;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
@Mapper
|
||||
public interface JobExpectMapMapper {
|
||||
|
||||
JobExpectMapMapper INSTANCE =
|
||||
Mappers.getMapper(JobExpectMapMapper.class);
|
||||
|
||||
/**
|
||||
* dto to entity
|
||||
*
|
||||
* @param jobExpectDto
|
||||
* @return
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
JobExpect toEntity(
|
||||
JobExpectDTO jobExpectDto);
|
||||
|
||||
|
||||
/**
|
||||
* @param jobExpectOperateDTO
|
||||
* @return
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
JobExpect toEntity(JobExpectOperateDTO jobExpectOperateDTO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.newyetai.recruit.user.convert;
|
||||
|
||||
import com.newyetai.recruit.user.entity.Resume;
|
||||
import com.newyetai.recruit.user.dto.ResumeDTO;
|
||||
import com.newyetai.recruit.user.dto.ResumeOperatorDTO;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* 简历管理
|
||||
*
|
||||
* @author guixinman
|
||||
* @since 1.0.0 2024-04-19
|
||||
*/
|
||||
@Mapper
|
||||
public interface ResumeConvert {
|
||||
ResumeConvert INSTANCE = Mappers.getMapper(ResumeConvert.class);
|
||||
|
||||
Resume convert(ResumeDTO dto);
|
||||
|
||||
ResumeDTO convert(Resume entity);
|
||||
|
||||
Resume convert(ResumeOperatorDTO dto);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.newyetai.recruit.user.convert;
|
||||
|
||||
import com.newyetai.recruit.user.dto.UserCertificateCreateDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateModifyDTO;
|
||||
import com.newyetai.recruit.user.entity.UserCertificate;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserCertificateMapMapper {
|
||||
|
||||
UserCertificateMapMapper INSTANCE =
|
||||
Mappers.getMapper(UserCertificateMapMapper.class);
|
||||
|
||||
UserCertificate toEntity(UserCertificateModifyDTO jobExpectOperateDTO);
|
||||
|
||||
List<UserCertificate> toEntitys(List<UserCertificateCreateDTO> jobExpectOperateDTOs);
|
||||
|
||||
UserCertificateDTO toDTO(UserCertificate userCertificate);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.newyetai.recruit.user.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.newyetai.recruit.user.dto.BrowseRecordDTO;
|
||||
import com.newyetai.recruit.user.dto.BrowseRecordPageQueryDTO;
|
||||
import com.newyetai.recruit.user.dto.BrowseRecordUserPageQueryDTO;
|
||||
import com.newyetai.recruit.user.entity.BrowseRecord;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户岗位访问记录表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Carlye
|
||||
* @since 2021-01-21
|
||||
*/
|
||||
@Mapper
|
||||
public interface BrowseRecordMapper extends BaseMapper<BrowseRecord> {
|
||||
|
||||
List<BrowseRecordDTO> pagePosition(BrowseRecordPageQueryDTO queryDTO);
|
||||
List<BrowseRecordDTO> pageUserPosition(BrowseRecordUserPageQueryDTO queryDTO);
|
||||
|
||||
int checkUserIdIsWechat(@Param("userId") Long userId);
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.newyetai.recruit.user.dao;
|
||||
|
||||
|
||||
import com.newyetai.recruit.statistics.dto.StatisticsBaseDTO;
|
||||
import com.newyetai.tkmybatis.mybatis.MyMapper;
|
||||
import com.newyetai.recruit.user.dto.JobExpectDTO;
|
||||
import com.newyetai.recruit.user.dto.JobExpectQueryDTO;
|
||||
import com.newyetai.recruit.user.entity.JobExpect;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 求职期望表
|
||||
*
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
@Mapper
|
||||
public interface JobExpectMapper extends MyMapper<JobExpect> {
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param jobExpectQueryDTO
|
||||
* @return
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
List<JobExpectDTO> listJobExpectDTO(@Param("param") JobExpectQueryDTO jobExpectQueryDTO);
|
||||
|
||||
long updateByUserId(@Param("param") JobExpect jobExpect);
|
||||
|
||||
/**
|
||||
* 期望岗位类型分组求数量
|
||||
*/
|
||||
List<StatisticsBaseDTO> positionTypeCodeGroupMap(@Param("recruitPositionType") String recruitPositionType);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.newyetai.recruit.user.dao;
|
||||
|
||||
import com.newyetai.tkmybatis.mybatis.MyMapper;
|
||||
import com.newyetai.recruit.user.entity.Resume;
|
||||
import com.newyetai.recruit.user.dto.ResumeDTO;
|
||||
import com.newyetai.recruit.user.dto.ResumeQueryDTO;
|
||||
import com.newyetai.recruit.user.dto.ResumePageQueryDTO;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 简历管理
|
||||
*
|
||||
* @author guixinman
|
||||
* @since 1.0.0 2024-04-19
|
||||
*/
|
||||
@Mapper
|
||||
public interface ResumeMapper extends MyMapper<Resume> {
|
||||
|
||||
List<ResumeDTO> page(@Param("param") ResumePageQueryDTO queryDTO);
|
||||
|
||||
List<ResumeDTO> list(@Param("param") ResumeQueryDTO queryDTO);
|
||||
|
||||
int updateByUserId(@Param("param") Resume resume);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.newyetai.recruit.user.dao;
|
||||
|
||||
|
||||
import com.newyetai.tkmybatis.mybatis.MyMapper;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateQueryDTO;
|
||||
import com.newyetai.recruit.user.entity.UserCertificate;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@Mapper
|
||||
public interface UserCertificateMapper extends MyMapper<UserCertificate> {
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
*/
|
||||
List<UserCertificateDTO> page(@Param("param") UserCertificateQueryDTO queryDTO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.newyetai.recruit.user.dao;
|
||||
|
||||
|
||||
import com.newyetai.tkmybatis.mybatis.MyMapper;
|
||||
import com.newyetai.recruit.user.entity.UserCollection;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface UserCollectionMapper extends MyMapper<UserCollection> {
|
||||
|
||||
@Select("select post_id from hr_user_collection where deleted = 0 and user_id = #{userId} order by create_time desc limit #{startSize},#{endSize}")
|
||||
List<Long> page(@Param("userId") Long userId, @Param("startSize") Integer startSize, @Param("endSize") Integer endSize);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.entity.BaseEntity;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户岗位访问DTO
|
||||
* </p>
|
||||
*
|
||||
* @author Carlye
|
||||
* @since 2021-01-21
|
||||
*/
|
||||
@ApiModel("招聘用户岗位访问DTO")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
public class BrowseRecordDTO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("岗位ID")
|
||||
@NotNull(message = "岗位ID不能为空")
|
||||
private Long positionId;
|
||||
|
||||
@ApiModelProperty("访问记录数")
|
||||
private Integer numberOfVisits;
|
||||
|
||||
@ApiModelProperty("头像")
|
||||
private String avatar;
|
||||
|
||||
private String positionName;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.dto.PageQueryDTO;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户岗位访问DTO
|
||||
* </p>
|
||||
*
|
||||
* @author Carlye
|
||||
* @since 2021-01-21
|
||||
*/
|
||||
@ApiModel("招聘用户岗位访问查询DTO")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
public class BrowseRecordPageQueryDTO extends PageQueryDTO<BrowseRecordDTO> {
|
||||
|
||||
|
||||
private static final long serialVersionUID = -3261822980006851294L;
|
||||
@ApiModelProperty("岗位ID")
|
||||
@NotNull(message = "岗位ID不能为空")
|
||||
private Long positionId;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.dto.PageQueryDTO;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @author: guixinman
|
||||
* @create: 2024-05-07 10:03
|
||||
**/
|
||||
@Data
|
||||
public class BrowseRecordUserPageQueryDTO extends PageQueryDTO<BrowseRecordDTO> {
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.dto.BaseDTO;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@Data
|
||||
@ApiModel(description = "求职期望表")
|
||||
public class JobExpectDTO extends BaseDTO {
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
@ApiModelProperty("岗位类型编码")
|
||||
private String typeCode;
|
||||
// @ApiModelProperty("岗位类型名称")
|
||||
// private String typeName;
|
||||
@ApiModelProperty("期望城市")
|
||||
private String expectCity;
|
||||
@ApiModelProperty("期望城市名称")
|
||||
private String expectCityName;
|
||||
@ApiModelProperty("期望月薪")
|
||||
private BigDecimal expectSalary;
|
||||
@ApiModelProperty("是否在职 0否 1是")
|
||||
private Boolean onDuty;
|
||||
@ApiModelProperty("入职周期:1随时入职、2 2周内入职、3一个月内入职")
|
||||
private Integer inductionCycle;
|
||||
|
||||
private String positionName;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.dto.BaseOperateDTO;
|
||||
import com.newyetai.common.validation.Create;
|
||||
import com.newyetai.common.validation.Update;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "求职期望表操作")
|
||||
public class JobExpectOperateDTO extends BaseOperateDTO implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
@NotNull(message = "id不能为空", groups = {Update.class})
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
@ApiModelProperty("岗位类型编码")
|
||||
@NotNull(message = "岗位类型不能为空", groups = {Update.class})
|
||||
private String typeCode;
|
||||
@ApiModelProperty("期望城市")
|
||||
@NotNull(message = "期望城市不能为空", groups = {Update.class, Create.class})
|
||||
private String expectCity;
|
||||
@ApiModelProperty("期望月薪")
|
||||
@NotNull(message = "期望月薪不能为空", groups = {Update.class})
|
||||
private BigDecimal expectSalary;
|
||||
|
||||
@ApiModelProperty("是否在职 0否 1是")
|
||||
private Boolean onDuty;
|
||||
@ApiModelProperty("入职周期:1随时入职、2 2周内入职、3一个月内入职")
|
||||
private Integer inductionCycle;
|
||||
|
||||
@NotNull(message = "求职意向岗位不能为空", groups = {Create.class})
|
||||
private String positionName;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.dto.PageQueryDTO;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "求职期望表查询条件")
|
||||
public class JobExpectQueryDTO extends PageQueryDTO<JobExpectDTO> implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
48
src/main/java/com/newyetai/recruit/user/dto/ResumeDTO.java
Normal file
48
src/main/java/com/newyetai/recruit/user/dto/ResumeDTO.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.dto.BaseDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 简历管理
|
||||
*
|
||||
* @author guixinman
|
||||
* @since 1.0.0 2024-04-19
|
||||
*/
|
||||
@ApiModel("简历管理")
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ResumeDTO extends BaseDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("简历附件")
|
||||
private String fileCode;
|
||||
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("所在城市")
|
||||
private String cityCode;
|
||||
|
||||
private String cityCodeName;
|
||||
|
||||
@ApiModelProperty("学历")
|
||||
private String education;
|
||||
|
||||
@ApiModelProperty("个人评价")
|
||||
private String selfEvaluation;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
private String dataJson;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import com.newyetai.common.validation.Create;
|
||||
import com.newyetai.common.validation.Update;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 简历管理
|
||||
*
|
||||
* @author guixinman
|
||||
* @since 1.0.0 2024-04-19
|
||||
*/
|
||||
@ApiModel("简历管理")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ResumeOperatorDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@Length(max = 32,message = "简历附件超长",groups = {Create.class, Update.class})
|
||||
@NotBlank(message = "简历附件不能为空",groups = {Create.class, Update.class})
|
||||
@ApiModelProperty("简历附件")
|
||||
private String fileCode;
|
||||
|
||||
@Length(max = 50,message = "所在城市长度超长",groups = {Create.class, Update.class})
|
||||
@NotBlank(message = "所在城市不能为空",groups = {Create.class, Update.class})
|
||||
@ApiModelProperty("所在城市")
|
||||
private String cityCode;
|
||||
|
||||
@Length(max = 32,message = "学历长度超长",groups = {Create.class, Update.class})
|
||||
@NotBlank(message = "学历不能为空",groups = {Create.class, Update.class})
|
||||
@ApiModelProperty("学历")
|
||||
private String education;
|
||||
|
||||
@Length(max = 255,message = "个人评价长度超长",groups = {Create.class, Update.class})
|
||||
@NotBlank(message = "个人评价不能为空",groups = {Create.class, Update.class})
|
||||
@ApiModelProperty("个人评价")
|
||||
private String selfEvaluation;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
private String dataJson;
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.dto.PageQueryDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 简历管理
|
||||
*
|
||||
* @author guixinman
|
||||
* @since 1.0.0 2024-04-19
|
||||
*/
|
||||
|
||||
@ApiModel("简历管理")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ResumePageQueryDTO extends PageQueryDTO<ResumeDTO> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("简历附件")
|
||||
private String fileCode;
|
||||
|
||||
@ApiModelProperty("所在城市")
|
||||
private String cityCode;
|
||||
|
||||
@ApiModelProperty("学历")
|
||||
private String education;
|
||||
|
||||
@ApiModelProperty("个人评价")
|
||||
private String selfEvaluation;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("创建时间起,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTimeStart;
|
||||
|
||||
@ApiModelProperty("创建时间止,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTimeEnd;
|
||||
|
||||
@ApiModelProperty("更新时间起,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTimeStart;
|
||||
|
||||
@ApiModelProperty("更新时间止,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTimeEnd;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 简历管理
|
||||
*
|
||||
* @author guixinman
|
||||
* @since 1.0.0 2024-04-19
|
||||
*/
|
||||
@ApiModel("简历管理")
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ResumeQueryDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("简历附件")
|
||||
private String fileCode;
|
||||
|
||||
@ApiModelProperty("所在城市")
|
||||
private String cityCode;
|
||||
|
||||
@ApiModelProperty("学历")
|
||||
private String education;
|
||||
|
||||
@ApiModelProperty("个人评价")
|
||||
private String selfEvaluation;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("创建时间起,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTimeStart;
|
||||
|
||||
@ApiModelProperty("创建时间止,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTimeEnd;
|
||||
|
||||
@ApiModelProperty("更新时间起,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTimeStart;
|
||||
|
||||
@ApiModelProperty("更新时间止,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTimeEnd;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.dto.BaseOperateDTO;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户证书创建")
|
||||
public class UserCertificateCreateDTO extends BaseOperateDTO implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("证书Code")
|
||||
@NotBlank(message = "证书code不能为空")
|
||||
private String fileCode;
|
||||
|
||||
@ApiModelProperty("证书名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("证件类型")
|
||||
@NotNull(message = "证件类型不能为空")
|
||||
private Integer certType;
|
||||
|
||||
@NotBlank(message = "证件名称不能为空")
|
||||
@ApiModelProperty("证件名称")
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.dto.BaseDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@Data
|
||||
@ApiModel(description = "用户证书")
|
||||
public class UserCertificateDTO extends BaseDTO {
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("证书Code")
|
||||
private String fileCode;
|
||||
|
||||
@ApiModelProperty("证书名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("证件类型")
|
||||
private Integer certType;
|
||||
|
||||
@ApiModelProperty("证件名称")
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.dto.BaseOperateDTO;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户证书操作")
|
||||
public class UserCertificateModifyDTO extends BaseOperateDTO implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("证书Code")
|
||||
@NotBlank(message = "证书code不能为空")
|
||||
private String fileCode;
|
||||
|
||||
@ApiModelProperty("证书名称")
|
||||
private String fileName;
|
||||
|
||||
@NotBlank(message = "证件名称不能为空")
|
||||
@ApiModelProperty("证件名称")
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.dto.PageQueryDTO;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户证书查询条件")
|
||||
public class UserCertificateQueryDTO extends PageQueryDTO<UserCertificateDTO> implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.newyetai.recruit.user.dto;
|
||||
|
||||
import com.newyetai.common.validation.Create;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserCollectionCreateDTO {
|
||||
|
||||
@ApiModelProperty("岗位id")
|
||||
@NotNull(message = "岗位ID不能为空", groups = {Create.class})
|
||||
private Long positionId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.newyetai.recruit.user.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.newyetai.common.entity.BaseEntity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户岗位访问记录表
|
||||
* </p>
|
||||
*
|
||||
* @author Carlye
|
||||
* @since 2021-01-21
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName("hr_position_browse_record")
|
||||
public class BrowseRecord extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 5473693561130145709L;
|
||||
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
private Long positionId;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.newyetai.recruit.user.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.newyetai.common.entity.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 求职期望表
|
||||
*
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
@TableName(value = "hr_job_expect")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@Data
|
||||
public class JobExpect extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
**/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
**/
|
||||
private Long userId;
|
||||
/**
|
||||
* 岗位类型编码
|
||||
**/
|
||||
private String typeCode;
|
||||
/**
|
||||
* 期望城市
|
||||
**/
|
||||
private String expectCity;
|
||||
/**
|
||||
* 期望月薪
|
||||
**/
|
||||
private BigDecimal expectSalary;
|
||||
/**
|
||||
* 是否在职 0否 1是
|
||||
**/
|
||||
private Boolean onDuty;
|
||||
/**
|
||||
* 入职周期:1随时入职、2 2周内入职、3一个月内入职
|
||||
**/
|
||||
private Integer inductionCycle;
|
||||
|
||||
private String positionName;
|
||||
|
||||
}
|
||||
51
src/main/java/com/newyetai/recruit/user/entity/Resume.java
Normal file
51
src/main/java/com/newyetai/recruit/user/entity/Resume.java
Normal file
@@ -0,0 +1,51 @@
|
||||
package com.newyetai.recruit.user.entity;
|
||||
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.newyetai.common.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 简历管理
|
||||
*
|
||||
* @author guixinman
|
||||
* @since 1.0.0 2024-04-19
|
||||
*/
|
||||
@TableName(value = "hr_resume")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class Resume extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 简历附件
|
||||
*/
|
||||
private String fileCode;
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
private String cityCode;
|
||||
/**
|
||||
* 学历
|
||||
*/
|
||||
private String education;
|
||||
/**
|
||||
* 个人评价
|
||||
*/
|
||||
private String selfEvaluation;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
private String dataJson;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.newyetai.recruit.user.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.newyetai.common.entity.BaseEntity;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author fzp
|
||||
* @date 2022年6月8日09:29:20
|
||||
*/
|
||||
|
||||
@TableName(value = "uc_user_certificate")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@Data
|
||||
public class UserCertificate extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 简历Code
|
||||
*/
|
||||
private String fileCode;
|
||||
/**
|
||||
* 简历名称
|
||||
*/
|
||||
private String fileName;
|
||||
|
||||
/** 证件类型 **/
|
||||
private Integer certType;
|
||||
|
||||
@ApiModelProperty("证件名称")
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.newyetai.recruit.user.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.newyetai.common.entity.BaseEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author fzp
|
||||
* @date 2021年10月21日10:47:31
|
||||
*/
|
||||
@TableName(value = "hr_user_collection")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserCollection extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 收藏的岗位ID
|
||||
*/
|
||||
private Long postId;
|
||||
|
||||
@Builder
|
||||
public UserCollection(Long id, Boolean deleted, Long createBy, Date createTime, Long updateBy, Date updateTime, Long proxyBy, Long userId, Long postId) {
|
||||
super(id, deleted, createBy, createTime, updateBy, updateTime, proxyBy);
|
||||
this.userId = userId;
|
||||
this.postId = postId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.newyetai.recruit.user.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.newyetai.mybatis.handle.BaseEnum;
|
||||
|
||||
/**
|
||||
* 入职周期枚举
|
||||
*/
|
||||
public enum InductionCycleEnum implements BaseEnum<Integer> {
|
||||
|
||||
ANY_TIME(1, "随时入职"),
|
||||
TWO_WEEKS(2, "2周内入职"),
|
||||
ONE_MONTH(3, "一个月内入职");
|
||||
|
||||
@EnumValue
|
||||
private final Integer type;
|
||||
|
||||
private final String desc;
|
||||
|
||||
InductionCycleEnum(Integer type, String desc) {
|
||||
this.type = type;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getValue() {
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
public static Integer findTypeByDesc(String desc) {
|
||||
for (InductionCycleEnum type : InductionCycleEnum.values()) {
|
||||
if (type.getDesc().equals(desc)) {
|
||||
return type.getType();
|
||||
}
|
||||
}
|
||||
return null; // 如果没有找到,返回null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.newyetai.recruit.user.dao.BrowseRecordMapper">
|
||||
|
||||
<select id="pagePosition" resultType="com.newyetai.recruit.user.dto.BrowseRecordDTO">
|
||||
SELECT a.*,
|
||||
u.avatar
|
||||
FROM (SELECT MAX(pbr.id) id, pbr.user_id, COUNT(*) numberOfVisits
|
||||
FROM hr_position_browse_record pbr
|
||||
WHERE pbr.deleted = 0
|
||||
AND pbr.position_id = #{positionId}
|
||||
GROUP BY pbr.user_id) a
|
||||
LEFT JOIN uc_user u ON a.user_id = u.id
|
||||
WHERE u.deleted = 0
|
||||
ORDER BY a.id DESC
|
||||
</select>
|
||||
<select id="checkUserIdIsWechat" resultType="java.lang.Integer">
|
||||
SELECT count(*)
|
||||
FROM xs_wechat_user wu
|
||||
WHERE wu.deleted = 0
|
||||
AND wu.user_id = #{userId}
|
||||
</select>
|
||||
<select id="pageUserPosition"
|
||||
resultType="com.newyetai.recruit.user.dto.BrowseRecordDTO">
|
||||
select
|
||||
a.*,b.position_name
|
||||
from hr_position_browse_record a
|
||||
left join hr_position b on a.position_id = b.id and b.deleted = 0
|
||||
where
|
||||
a.deleted = 0
|
||||
and a.user_id = #{operateUserId}
|
||||
ORDER BY a.id DESC
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.newyetai.recruit.user.dao.JobExpectMapper">
|
||||
|
||||
<update id="updateByUserId">
|
||||
update hr_job_expect
|
||||
set type_code = #{param.typeCode},
|
||||
expect_city = #{param.expectCity},
|
||||
expect_salary = #{param.expectSalary},
|
||||
on_duty = #{param.onDuty},
|
||||
induction_cycle = #{param.inductionCycle},
|
||||
update_by = #{param.userId},
|
||||
update_time = now()
|
||||
where user_id = #{param.userId} and deleted = 0
|
||||
</update>
|
||||
<select id="listJobExpectDTO" resultType="com.newyetai.recruit.user.dto.JobExpectDTO">
|
||||
select
|
||||
concat(xd3.name,xd2.name,xd1.name) expectCityName, pt.name typeName , je.*
|
||||
from hr_job_expect je left join hr_position_type pt on je.type_code = pt.code
|
||||
left join xs_district xd1 on je.expect_city = xd1.code
|
||||
left join xs_district xd2 on xd1.parent_id = xd2.id
|
||||
left join xs_district xd3 on xd2.parent_id = xd3.id
|
||||
where
|
||||
je.deleted = 0
|
||||
<if test="param.id != null">
|
||||
and je.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
and je.user_id = #{param.userId}
|
||||
</if>
|
||||
order by je.id desc
|
||||
</select>
|
||||
<select id="positionTypeCodeGroupMap"
|
||||
resultType="com.newyetai.recruit.statistics.dto.StatisticsBaseDTO">
|
||||
SELECT substring(a.type_code,0,2) name, count(*) valueCount
|
||||
from hr_job_expect a
|
||||
left join hr_position_type b on a.type_code = b.code and b.deleted = 0
|
||||
where a.deleted = 0 and a.type_code is not null and a.type_code != ''
|
||||
<if test="recruitPositionType != null and recruitPositionType != '' ">
|
||||
and b.recruit_position_type = #{recruitPositionType}
|
||||
</if>
|
||||
group by substring(a.type_code,0,2)
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.newyetai.recruit.user.dao.ResumeMapper">
|
||||
|
||||
<update id="updateByUserId">
|
||||
update hr_resume
|
||||
set
|
||||
update_by = #{param.userId},
|
||||
update_time = now()
|
||||
|
||||
<if test='param.fileCode != null and param.fileCode.trim() != ""'>
|
||||
,file_code = #{param.fileCode}
|
||||
</if>
|
||||
<if test='param.cityCode != null and param.cityCode.trim() != ""'>
|
||||
,city_code = #{param.cityCode}
|
||||
</if>
|
||||
<if test='param.education != null and param.education.trim() != ""'>
|
||||
,education = #{param.education}
|
||||
</if>
|
||||
<if test='param.selfEvaluation != null and param.selfEvaluation.trim() != ""'>
|
||||
,self_evaluation = #{param.selfEvaluation}
|
||||
</if>
|
||||
<if test='param.deleted != null'>
|
||||
,deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test='param.dataJson != null and param.dataJson.trim() != ""'>
|
||||
,data_json = #{param.dataJson}
|
||||
</if>
|
||||
where user_id = #{param.userId} and deleted = 0
|
||||
|
||||
</update>
|
||||
|
||||
<select id="list" resultType="com.newyetai.recruit.user.dto.ResumeDTO">
|
||||
SELECT t.*,concat(xd2.name,xd1.name) cityCodeName
|
||||
<include refid="queryFromSql"></include>
|
||||
</select>
|
||||
|
||||
<select id="page" resultType="com.newyetai.recruit.user.dto.ResumeDTO">
|
||||
SELECT t.*,concat(xd3.name,xd2.name,xd1.name) cityCodeName
|
||||
<include refid="queryFromSql"></include>
|
||||
</select>
|
||||
|
||||
<sql id="queryFromSql">
|
||||
FROM
|
||||
hr_resume t
|
||||
left join xs_district xd1 on t.city_code = xd1.code
|
||||
left join xs_district xd2 on xd1.parent_id = xd2.id
|
||||
left join xs_district xd3 on xd2.parent_id = xd3.id
|
||||
WHERE t.deleted = 0
|
||||
<if test='param.id != null'>
|
||||
AND t.id = #{param.id}
|
||||
</if>
|
||||
<if test='param.userId != null'>
|
||||
AND t.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test='param.fileCode != null and param.fileCode.trim() != ""'>
|
||||
AND t.file_code = #{param.fileCode}
|
||||
</if>
|
||||
<if test='param.cityCode != null and param.cityCode.trim() != ""'>
|
||||
AND t.city_code = #{param.cityCode}
|
||||
</if>
|
||||
<if test='param.education != null and param.education.trim() != ""'>
|
||||
AND t.education = #{param.education}
|
||||
</if>
|
||||
<if test='param.selfEvaluation != null and param.selfEvaluation.trim() != ""'>
|
||||
AND t.self_evaluation = #{param.selfEvaluation}
|
||||
</if>
|
||||
<if test='param.remark != null and param.remark.trim() != ""'>
|
||||
AND t.remark = #{param.remark}
|
||||
</if>
|
||||
<if test='param.createTimeStart != null'>
|
||||
AND t.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test='param.createTimeEnd != null'>
|
||||
AND t.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test='param.updateTimeStart != null'>
|
||||
AND t.update_time >= #{param.updateTimeStart}
|
||||
</if>
|
||||
<if test='param.updateTimeEnd != null'>
|
||||
AND t.update_time <= #{param.updateTimeEnd}
|
||||
</if>
|
||||
ORDER BY t.id DESC
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.newyetai.recruit.user.dao.UserCertificateMapper">
|
||||
<select id="page" resultType="com.newyetai.recruit.user.dto.UserCertificateDTO">
|
||||
select
|
||||
*
|
||||
from uc_user_certificate
|
||||
where
|
||||
deleted = 0
|
||||
<if test="param.id != null">
|
||||
and id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
and user_id = #{param.userId}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.newyetai.recruit.user.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.newyetai.recruit.user.dto.BrowseRecordDTO;
|
||||
import com.newyetai.recruit.user.dto.BrowseRecordPageQueryDTO;
|
||||
import com.newyetai.recruit.user.dto.BrowseRecordUserPageQueryDTO;
|
||||
import com.newyetai.recruit.user.entity.BrowseRecord;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.groups.Default;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户岗位访问记录表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Carlye
|
||||
* @since 2021-01-21
|
||||
*/
|
||||
@Validated(Default.class)
|
||||
public interface BrowseRecordService extends IService<BrowseRecord> {
|
||||
|
||||
|
||||
/**
|
||||
* 新增用户访问记录
|
||||
*
|
||||
* @param recordDTO 记录dto
|
||||
* @return {@link BrowseRecord}
|
||||
*/
|
||||
void create(BrowseRecordDTO recordDTO);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param queryDTO 查询dto
|
||||
* @return {@link List< BrowseRecordDTO >}
|
||||
*/
|
||||
List<BrowseRecordDTO> pagePosition(@Valid BrowseRecordPageQueryDTO queryDTO);
|
||||
|
||||
Integer statistics();
|
||||
|
||||
List<BrowseRecordDTO> browseRecordUserPage(BrowseRecordUserPageQueryDTO queryDTO);
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.newyetai.recruit.user.service;
|
||||
|
||||
|
||||
import com.newyetai.recruit.user.dto.JobExpectDTO;
|
||||
import com.newyetai.recruit.user.dto.JobExpectOperateDTO;
|
||||
import com.newyetai.recruit.user.dto.JobExpectQueryDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 求职期望表
|
||||
*
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
public interface JobExpectService {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param jobExpectOperateDTO
|
||||
* @return
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
Long create(JobExpectOperateDTO jobExpectOperateDTO);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param jobExpectOperateDTO
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
void modify(JobExpectOperateDTO jobExpectOperateDTO);
|
||||
|
||||
/**
|
||||
* 更新求职状态
|
||||
* @param jobExpectOperateDTO
|
||||
*/
|
||||
void modifyOnDuty(JobExpectOperateDTO jobExpectOperateDTO);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
void remove(Long id);
|
||||
void removeByUserId();
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param jobExpectQueryDTO
|
||||
* @return
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
List<JobExpectDTO> list(JobExpectQueryDTO jobExpectQueryDTO);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param jobExpectQueryDTO
|
||||
* @return
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
void page(JobExpectQueryDTO jobExpectQueryDTO);
|
||||
|
||||
/**
|
||||
* 单个查询
|
||||
*
|
||||
* @param jobExpectQueryDTO
|
||||
* @return
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
JobExpectDTO find(JobExpectQueryDTO jobExpectQueryDTO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.newyetai.recruit.user.service;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.groups.Default;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.newyetai.recruit.user.dto.*;
|
||||
|
||||
/**
|
||||
* 简历管理
|
||||
*
|
||||
* @author guixinman
|
||||
* @since 1.0.0 2024-04-19
|
||||
*/
|
||||
@Validated(Default.class)
|
||||
public interface ResumeService {
|
||||
|
||||
/**
|
||||
* 简历管理 - 创建
|
||||
*
|
||||
* @param operatorDto 操作dto
|
||||
* @return {@link ResumeDTO}
|
||||
*/
|
||||
void createOrModify(ResumeOperatorDTO operatorDto);
|
||||
|
||||
/**
|
||||
* 简历管理 - 修改
|
||||
*
|
||||
* @param operatorDto 操作dto
|
||||
* @return {@link ResumeDTO}
|
||||
*/
|
||||
void modify(@Valid ResumeOperatorDTO operatorDto);
|
||||
|
||||
/**
|
||||
* 简历管理 - 删除
|
||||
*
|
||||
* @param id id
|
||||
* @return {@link ResumeDTO}
|
||||
*/
|
||||
void delete();
|
||||
|
||||
/**
|
||||
* 简历管理 - 根据ID查询单个
|
||||
*
|
||||
* @param id id
|
||||
* @return {@link ResumeDTO}
|
||||
*/
|
||||
ResumeDTO findById(Long id);
|
||||
|
||||
/**
|
||||
* 简历管理 - 列表查询
|
||||
*
|
||||
* @param queryDTO 列表查询dto
|
||||
* @return {@link List}<{@link ResumeDTO}>
|
||||
*/
|
||||
List<ResumeDTO> list(ResumeQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 简历管理 - 分页查询
|
||||
*
|
||||
* @param queryDTO 分页查询dto
|
||||
* @return {@link ResumeDTO}
|
||||
*/
|
||||
List<ResumeDTO> page(ResumePageQueryDTO queryDTO);
|
||||
|
||||
ResumeDTO userFind();
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.newyetai.recruit.user.service;
|
||||
|
||||
|
||||
|
||||
import com.newyetai.recruit.user.dto.UserCertificateCreateDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateModifyDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateQueryDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserCertificateService {
|
||||
|
||||
void create(List<UserCertificateCreateDTO> operateDTOs);
|
||||
|
||||
UserCertificateDTO modify(UserCertificateModifyDTO operateDTO);
|
||||
|
||||
UserCertificateDTO delete(Long id);
|
||||
|
||||
List<UserCertificateDTO> list(UserCertificateQueryDTO queryDTO);
|
||||
|
||||
List<UserCertificateDTO> page(UserCertificateQueryDTO queryDTO);
|
||||
|
||||
UserCertificateDTO findById(Long queryDTO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.newyetai.recruit.user.service;
|
||||
|
||||
import com.newyetai.recruit.position.dto.PositionDTO;
|
||||
import com.newyetai.recruit.position.dto.PositionPageQueryDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCollectionCreateDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author fzp
|
||||
* @Date 2021年10月21日10:39:46
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface UserCollectionService {
|
||||
|
||||
List<PositionDTO> page(PositionPageQueryDTO queryDTO);
|
||||
|
||||
void create(UserCollectionCreateDTO dto);
|
||||
|
||||
int delete(Long id);
|
||||
|
||||
Integer statistics();
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.newyetai.recruit.user.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.newyetai.common.exception.util.Assert;
|
||||
import com.newyetai.common.util.UserContextHolder;
|
||||
import com.newyetai.recruit.user.dao.BrowseRecordMapper;
|
||||
import com.newyetai.recruit.user.dto.BrowseRecordDTO;
|
||||
import com.newyetai.recruit.user.dto.BrowseRecordPageQueryDTO;
|
||||
import com.newyetai.recruit.user.dto.BrowseRecordUserPageQueryDTO;
|
||||
import com.newyetai.recruit.user.entity.BrowseRecord;
|
||||
import com.newyetai.recruit.user.service.BrowseRecordService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户岗位访问记录表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Carlye
|
||||
* @since 2021-01-21
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class BrowseRecordServiceImpl extends ServiceImpl<BrowseRecordMapper, BrowseRecord> implements BrowseRecordService {
|
||||
|
||||
@Override
|
||||
public void create(BrowseRecordDTO recordDTO) {
|
||||
BrowseRecord browseRecord = new BrowseRecord();
|
||||
browseRecord.setPositionId(recordDTO.getPositionId());
|
||||
browseRecord.setUserId(UserContextHolder.getExistLoginUserId());
|
||||
browseRecord.setCreateBy(UserContextHolder.getExistLoginUserId());
|
||||
browseRecord.setCreateTime(new Date());
|
||||
Assert.isTrue(save(browseRecord), "新增浏览记录失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BrowseRecordDTO> pagePosition(BrowseRecordPageQueryDTO queryDTO) {
|
||||
return getBaseMapper().pagePosition(queryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer statistics() {
|
||||
Integer count = getBaseMapper().selectCount(new LambdaQueryWrapper<BrowseRecord>()
|
||||
.eq(BrowseRecord::getDeleted, false)
|
||||
.eq(BrowseRecord::getUserId, UserContextHolder.getExistLoginUserId())
|
||||
);
|
||||
return count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BrowseRecordDTO> browseRecordUserPage(BrowseRecordUserPageQueryDTO queryDTO) {
|
||||
return getBaseMapper().pageUserPosition(queryDTO);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.newyetai.recruit.user.service.impl;
|
||||
|
||||
|
||||
import com.newyetai.common.exception.BusinessException;
|
||||
import com.newyetai.common.exception.util.Assert;
|
||||
import com.newyetai.common.util.ListUtil;
|
||||
import com.newyetai.common.util.UserContextHolder;
|
||||
import com.newyetai.recruit.user.convert.JobExpectMapMapper;
|
||||
import com.newyetai.recruit.user.dao.JobExpectMapper;
|
||||
import com.newyetai.recruit.user.dto.JobExpectDTO;
|
||||
import com.newyetai.recruit.user.dto.JobExpectOperateDTO;
|
||||
import com.newyetai.recruit.user.dto.JobExpectQueryDTO;
|
||||
import com.newyetai.recruit.user.entity.JobExpect;
|
||||
import com.newyetai.recruit.user.service.JobExpectService;
|
||||
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @author fzp on 2022-02-23
|
||||
*/
|
||||
@Service
|
||||
public class JobExpectServiceImpl implements JobExpectService {
|
||||
|
||||
@Autowired
|
||||
private JobExpectMapper jobExpectMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Long create(JobExpectOperateDTO jobExpectOperateDTO) {
|
||||
// List<JobExpectDTO> jobExpectDTOS = this.list(JobExpectQueryDTO.builder().userId(UserContextHolder.getLoginUserId()).build());
|
||||
// if (jobExpectDTOS.size() >= 3) {
|
||||
// throw new BusinessException("添加失败,求职期望数量最多3个");
|
||||
// }
|
||||
this.removeByUserId();
|
||||
JobExpect jobExpect = JobExpectMapMapper.INSTANCE.toEntity(jobExpectOperateDTO);
|
||||
jobExpect.setUserId(UserContextHolder.getLoginUserId());
|
||||
jobExpectMapper.saveEntity(jobExpect);
|
||||
return jobExpect.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void modify(JobExpectOperateDTO jobExpectOperateDTO) {
|
||||
JobExpect jobExpect = JobExpectMapMapper.INSTANCE.toEntity(jobExpectOperateDTO);
|
||||
jobExpect.setUserId(UserContextHolder.getLoginUserId());
|
||||
jobExpectMapper.updateEntitySelective(jobExpect);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void modifyOnDuty(JobExpectOperateDTO jobExpectOperateDTO) {
|
||||
JobExpect jobExpect = JobExpectMapMapper.INSTANCE.toEntity(jobExpectOperateDTO);
|
||||
jobExpect.setUserId(UserContextHolder.getLoginUserId());
|
||||
// 批量更新未删除的求职状态
|
||||
jobExpectMapper.updateByUserId(jobExpect);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void remove(Long id) {
|
||||
List<JobExpectDTO> list = this.list(JobExpectQueryDTO.builder().userId(UserContextHolder.getLoginUserId()).build());
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
List<JobExpectDTO> jobExpectDTOList = list.stream()
|
||||
.filter(jobExpectDTO -> jobExpectDTO.getUserId().equals(UserContextHolder.getExistLoginUserId()) &&
|
||||
jobExpectDTO.getId().equals(id)
|
||||
).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(jobExpectDTOList)) {
|
||||
return;
|
||||
}
|
||||
|
||||
jobExpectMapper.deleteEntity(JobExpect.builder().id(id).build(), UserContextHolder.getLoginUserId());
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public void removeByUserId() {
|
||||
List<JobExpectDTO> list = this.list(JobExpectQueryDTO.builder().userId(UserContextHolder.getLoginUserId()).build());
|
||||
for (JobExpectDTO jobExpectDTO : list) {
|
||||
jobExpectMapper.deleteEntity(JobExpect.builder().id(jobExpectDTO.getId()).build(), UserContextHolder.getLoginUserId());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JobExpectDTO> list(JobExpectQueryDTO jobExpectQueryDTO) {
|
||||
jobExpectQueryDTO.disablePage();
|
||||
return jobExpectMapper.listJobExpectDTO(jobExpectQueryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void page(JobExpectQueryDTO jobExpectQueryDTO) {
|
||||
jobExpectQueryDTO.setUserId(UserContextHolder.getLoginUserId());
|
||||
jobExpectMapper.listJobExpectDTO(jobExpectQueryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JobExpectDTO find(JobExpectQueryDTO jobExpectQueryDTO) {
|
||||
List<JobExpectDTO> jobExpectDTOs = this.list(jobExpectQueryDTO);
|
||||
return jobExpectDTOs.isEmpty() ? null : ListUtil.first(jobExpectDTOs);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.newyetai.recruit.user.service.impl;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.newyetai.component.file.entity.FileRecord;
|
||||
import com.newyetai.component.file.service.FileRecordService;
|
||||
import com.newyetai.recruit.user.convert.ResumeConvert;
|
||||
import com.newyetai.recruit.user.dto.*;
|
||||
import com.newyetai.recruit.user.dao.ResumeMapper;
|
||||
import com.newyetai.recruit.user.entity.Resume;
|
||||
import com.newyetai.recruit.user.service.ResumeService;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.newyetai.common.util.UserContextHolder;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 简历管理
|
||||
*
|
||||
* @author guixinman
|
||||
* @since 1.0.0 2024-04-19
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ResumeServiceImpl implements ResumeService {
|
||||
|
||||
@Resource
|
||||
private ResumeMapper resumeMapper;
|
||||
|
||||
@Autowired
|
||||
private FileRecordService fileRecordService;
|
||||
|
||||
@Override
|
||||
public void createOrModify(ResumeOperatorDTO operatorDto) {
|
||||
Integer count = resumeMapper.selectCount(new LambdaQueryWrapper<Resume>()
|
||||
.eq(Resume::getUserId, UserContextHolder.getExistLoginUserId())
|
||||
.eq(Resume::getDeleted, false)
|
||||
);
|
||||
if (count == 0) {
|
||||
Resume resume = ResumeConvert.INSTANCE.convert(operatorDto);
|
||||
resume.setUserId(UserContextHolder.getExistLoginUserId());
|
||||
resumeMapper.saveEntity(resume);
|
||||
} else {
|
||||
this.modify(operatorDto);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modify(ResumeOperatorDTO operatorDto) {
|
||||
Resume resume = ResumeConvert.INSTANCE.convert(operatorDto);
|
||||
resume.setUserId(UserContextHolder.getExistLoginUserId());
|
||||
resumeMapper.updateByUserId(resume);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete() {
|
||||
|
||||
Resume resume = Resume.builder().build();
|
||||
resume.setUserId(UserContextHolder.getExistLoginUserId());
|
||||
resume.setDeleted(true);
|
||||
resumeMapper.updateByUserId(resume);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResumeDTO findById(Long id) {
|
||||
Resume resume = resumeMapper.getById(id);
|
||||
if (Objects.isNull(resume)) {
|
||||
return null;
|
||||
}
|
||||
return ResumeConvert.INSTANCE.convert(resume);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResumeDTO> list(ResumeQueryDTO queryDTO) {
|
||||
return resumeMapper.list(queryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResumeDTO> page(ResumePageQueryDTO queryDTO) {
|
||||
return resumeMapper.page(queryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResumeDTO userFind() {
|
||||
Resume resume = resumeMapper.selectOne(new LambdaQueryWrapper<Resume>()
|
||||
.eq(Resume::getDeleted, false)
|
||||
.eq(Resume::getUserId, UserContextHolder.getExistLoginUserId())
|
||||
);
|
||||
if (Objects.isNull(resume)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ResumeDTO resumeDTO = ResumeDTO.builder().build();
|
||||
if (StringUtils.isNotBlank(resume.getFileCode())) {
|
||||
FileRecord fileRecord = fileRecordService.find(FileRecord.builder().fileCode(resume.getFileCode()).build());
|
||||
if (Objects.nonNull(fileRecord)) {
|
||||
resumeDTO.setFileName(fileRecord.getFileName());
|
||||
}
|
||||
}
|
||||
resumeDTO.setFileCode(resume.getFileCode());
|
||||
resumeDTO.setSelfEvaluation(resume.getSelfEvaluation());
|
||||
resumeDTO.setEducation(resume.getEducation());
|
||||
resumeDTO.setCityCode(resume.getCityCode());
|
||||
resumeDTO.setDataJson(resume.getDataJson());
|
||||
return resumeDTO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.newyetai.recruit.user.service.impl;
|
||||
|
||||
|
||||
import com.newyetai.common.util.UserContextHolder;
|
||||
import com.newyetai.frame.redis.aop.annotation.AutoUnLock;
|
||||
import com.newyetai.recruit.user.convert.UserCertificateMapMapper;
|
||||
import com.newyetai.recruit.user.dao.UserCertificateMapper;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateCreateDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateModifyDTO;
|
||||
import com.newyetai.recruit.user.dto.UserCertificateQueryDTO;
|
||||
import com.newyetai.recruit.user.entity.UserCertificate;
|
||||
import com.newyetai.recruit.user.service.UserCertificateService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author fzp on 2022年6月8日09:58:44
|
||||
*/
|
||||
@Service
|
||||
public class UserCertificateServiceImpl implements UserCertificateService {
|
||||
|
||||
@Autowired
|
||||
private UserCertificateMapper userCertificateMapper;
|
||||
|
||||
@Override
|
||||
@AutoUnLock
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(List<UserCertificateCreateDTO> operateDTOs) {
|
||||
List<UserCertificate> userCertificates = UserCertificateMapMapper.INSTANCE.toEntitys(operateDTOs);
|
||||
userCertificates.forEach(userCertificate -> {
|
||||
userCertificate.setUserId(UserContextHolder.getLoginUserId());
|
||||
});
|
||||
userCertificateMapper.saveEntites(userCertificates, UserContextHolder.getExistLoginUserId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserCertificateDTO modify(UserCertificateModifyDTO operateDTO) {
|
||||
UserCertificate exchange = UserCertificateMapMapper.INSTANCE.toEntity(operateDTO);
|
||||
userCertificateMapper.updateEntitySelective(exchange);
|
||||
UserCertificate byId = userCertificateMapper.getById(exchange.getId());
|
||||
return UserCertificateMapMapper.INSTANCE.toDTO(byId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserCertificateDTO delete(Long id) {
|
||||
UserCertificate userCertificate = userCertificateMapper.getById(id);
|
||||
if (Objects.isNull(userCertificate)) {
|
||||
return null;
|
||||
}
|
||||
UserCertificate param = new UserCertificate();
|
||||
param.setId(id);
|
||||
userCertificateMapper.deleteEntity(param, UserContextHolder.getLoginUserId());
|
||||
return UserCertificateMapMapper.INSTANCE.toDTO(userCertificate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserCertificateDTO findById(Long id) {
|
||||
UserCertificate byId = userCertificateMapper.getById(id);
|
||||
if (Objects.isNull(byId)) {
|
||||
return null;
|
||||
}
|
||||
return UserCertificateMapMapper.INSTANCE.toDTO(byId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserCertificateDTO> page(UserCertificateQueryDTO queryDTO) {
|
||||
return userCertificateMapper.page(queryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserCertificateDTO> list(UserCertificateQueryDTO queryDTO) {
|
||||
queryDTO.disablePage();
|
||||
return userCertificateMapper.page(queryDTO);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.newyetai.recruit.user.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.newyetai.common.util.UserContextHolder;
|
||||
import com.newyetai.recruit.position.dto.PositionDTO;
|
||||
import com.newyetai.recruit.position.dto.PositionPageQueryDTO;
|
||||
import com.newyetai.recruit.position.service.PositionService;
|
||||
import com.newyetai.recruit.user.dao.UserCollectionMapper;
|
||||
import com.newyetai.recruit.user.dto.UserCollectionCreateDTO;
|
||||
import com.newyetai.recruit.user.entity.UserCollection;
|
||||
import com.newyetai.recruit.user.service.UserCollectionService;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @Author dylanyuan
|
||||
* @Date 2021/1/16 3:44 下午
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class UserCollectionServiceImpl implements UserCollectionService {
|
||||
|
||||
|
||||
@Resource
|
||||
private UserCollectionMapper userCollectionMapper;
|
||||
|
||||
@Resource
|
||||
private PositionService positionService;
|
||||
|
||||
@Override
|
||||
public List<PositionDTO> page(PositionPageQueryDTO queryDTO) {
|
||||
int pageNo = queryDTO.getPageNo();
|
||||
int pageSize = queryDTO.getPageSize();
|
||||
// 收藏的岗位id
|
||||
List<Long> ids = userCollectionMapper.page(UserContextHolder.getLoginUserId(), (pageNo - 1) * pageSize, pageSize);
|
||||
queryDTO.setIds(ids);
|
||||
return CollectionUtils.isEmpty(ids) ? new ArrayList<>() : positionService.userPage(queryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(UserCollectionCreateDTO dto) {
|
||||
UserCollection userCollection = UserCollection.builder()
|
||||
.userId(UserContextHolder.getExistLoginUserId())
|
||||
.postId(dto.getPositionId())
|
||||
.deleted(false).build();
|
||||
|
||||
if (CollectionUtil.isEmpty(userCollectionMapper.selectList(new LambdaQueryWrapper<UserCollection>()
|
||||
.eq(UserCollection::getUserId, UserContextHolder.getExistLoginUserId())
|
||||
.eq(UserCollection::getPostId, dto.getPositionId())
|
||||
.eq(UserCollection::getDeleted, false)
|
||||
))) {
|
||||
userCollectionMapper.saveEntity(userCollection);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delete(Long id) {
|
||||
|
||||
List<UserCollection> userCollection = userCollectionMapper.selectList(new LambdaQueryWrapper<UserCollection>()
|
||||
.eq(UserCollection::getUserId, UserContextHolder.getExistLoginUserId())
|
||||
.eq(UserCollection::getPostId, id)
|
||||
.eq(UserCollection::getDeleted, false));
|
||||
if (!CollectionUtil.isEmpty(userCollection)) {
|
||||
UserCollection entity = UserCollection.builder().id(userCollection.get(0).getId())
|
||||
.postId(id).build();
|
||||
return userCollectionMapper.deleteEntity(entity, UserContextHolder.getLoginUserId());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer statistics() {
|
||||
return userCollectionMapper.selectCount(new LambdaQueryWrapper<UserCollection>().eq(UserCollection::getDeleted, false).eq(UserCollection::getUserId, UserContextHolder.getExistLoginUserId()));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user