diff --git a/vetti-admin/src/main/java/com/vetti/filter/AuthFilter.java b/vetti-admin/src/main/java/com/vetti/filter/AuthFilter.java deleted file mode 100644 index f9b48db..0000000 --- a/vetti-admin/src/main/java/com/vetti/filter/AuthFilter.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.vetti.filter; - -import com.vetti.common.constant.CacheConstants; -import com.vetti.common.constant.SecurityConstants; -import com.vetti.common.constant.TokenConstants; -import com.vetti.common.core.redis.RedisService; -import com.vetti.common.utils.JwtUtils; -import com.vetti.common.utils.MessageUtils; -import com.vetti.common.utils.StringUtils; -import com.vetti.config.IgnoreWhiteProperties; -import io.jsonwebtoken.Claims; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import javax.servlet.*; -import javax.servlet.annotation.WebFilter; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - -/** - * APP登录鉴权 - * - * @author wangxiangshun - */ -@Component -@WebFilter -public class AuthFilter implements Filter -{ - private static final Logger log = LoggerFactory.getLogger(AuthFilter.class); - - // 排除过滤的 uri 地址 - @Autowired - private IgnoreWhiteProperties ignoreWhite; - - @Autowired - private RedisService redisService; - - /** - * 获取缓存key - */ - private String getTokenKey(String token) - { - return CacheConstants.LOGIN_TOKEN_KEY + token; - } - - /** - * 获取请求token - */ - private String getToken(HttpServletRequest request) - { - String token = request.getHeader(SecurityConstants.AUTHORIZATION_HEADER); - // 如果前端设置了令牌前缀,则裁剪掉前缀 - if (StringUtils.isNotEmpty(token) && token.startsWith(TokenConstants.PREFIX)) - { - token = token.replaceFirst(TokenConstants.PREFIX, StringUtils.EMPTY); - } - return token; - } - - @Override - public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) - throws IOException, ServletException { - - HttpServletRequest httpRequest = (HttpServletRequest) request; - HttpServletResponse httpResponse = (HttpServletResponse) response; - // 执行拦截逻辑 - String url = httpRequest.getRequestURI(); - // 跳过不需要验证的路径 - if ((url != null && url.contains("/v1/app")) - && !StringUtils.matches(url, ignoreWhite.getWhites())) - { - String token = getToken(httpRequest); - if (StringUtils.isEmpty(token)) - { - // 认证失败:返回 401 - sendResponse(httpResponse,HttpServletResponse.SC_UNAUTHORIZED, MessageUtils.messageCustomize("systemExceptionAuthFilter10001")); - // 中断请求 - return; - } - Claims claims = JwtUtils.parseToken(token); - if (claims == null) - { - // 认证失败:返回 401 - sendResponse(httpResponse,HttpServletResponse.SC_UNAUTHORIZED,MessageUtils.messageCustomize("systemExceptionAuthFilter10002")); - // 中断请求 - return; - } - String userkey = JwtUtils.getUserKey(claims); - boolean islogin = redisService.hasKey(getTokenKey(userkey)); - if (!islogin) - { - // 认证失败:返回 401 - sendResponse(httpResponse,HttpServletResponse.SC_UNAUTHORIZED,MessageUtils.messageCustomize("systemExceptionAuthFilter10003")); - // 中断请求 - return; - } - - String userid = JwtUtils.getUserId(claims); - String username = JwtUtils.getUserName(claims); - if (StringUtils.isEmpty(userid) || StringUtils.isEmpty(username)) - { - // 认证失败:返回 401 - sendResponse(httpResponse,HttpServletResponse.SC_UNAUTHORIZED,MessageUtils.messageCustomize("systemExceptionAuthFilter10004")); - // 中断请求 - return; - } - } - // 拦截通过,继续执行后续过滤器或控制器 - chain.doFilter(request, response); - } - - /** - * 返回响应结构体 - * @param response - * @param code HTTP状态码 - * @param message 提示信息 - * @throws IOException - */ - private void sendResponse(HttpServletResponse response,int code, String message) throws IOException { - // 设置HTTP状态码 - response.setStatus(code); - // 设置响应内容类型(JSON格式便于前端解析) - response.setContentType("application/json;charset=UTF-8"); - // 构建响应体(包含错误信息) - String jsonResponse = String.format( - "{\"code\": "+code+", \"msg\": \"%s\"}", - message - ); - // 写入响应并关闭流 - PrintWriter writer = response.getWriter(); - writer.write(jsonResponse); - writer.flush(); - writer.close(); - } -} \ No newline at end of file diff --git a/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeInitScreQuestionsReplyRecordInfoController.java b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeInitScreQuestionsReplyRecordInfoController.java new file mode 100644 index 0000000..5785463 --- /dev/null +++ b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeInitScreQuestionsReplyRecordInfoController.java @@ -0,0 +1,98 @@ +package com.vetti.web.controller.hotake; + +import com.vetti.common.annotation.Log; +import com.vetti.common.core.controller.BaseController; +import com.vetti.common.core.domain.R; +import com.vetti.common.core.page.TableDataInfo; +import com.vetti.common.enums.BusinessType; +import com.vetti.hotake.domain.HotakeInitScreQuestionsReplyRecordInfo; +import com.vetti.hotake.service.IHotakeInitScreQuestionsReplyRecordInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 初步筛选问题回答记录信息Controller + * + * @author wangxiangshun + * @date 2025-12-14 + */ +@Api(tags ="初步筛选问题回答记录信息") +@RestController +@RequestMapping("/hotake/initScreQuestionsReplyRecordInfo") +public class HotakeInitScreQuestionsReplyRecordInfoController extends BaseController +{ + @Autowired + private IHotakeInitScreQuestionsReplyRecordInfoService hotakeInitScreQuestionsReplyRecordInfoService; + + /** + * 查询初步筛选问题回答记录信息列表 + */ + @ApiOperation("查询初步筛选问题回答记录信息列表") + @GetMapping("/getPageList") + public TableDataInfo pageList(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo) + { + startPage(); + List list = hotakeInitScreQuestionsReplyRecordInfoService.selectHotakeInitScreQuestionsReplyRecordInfoList(hotakeInitScreQuestionsReplyRecordInfo); + return getDataTable(list); + } + + /** + * 查询初步筛选问题回答记录信息列表(无分页) + */ + @ApiOperation("查询初步筛选问题回答记录信息列表(无分页)") + @GetMapping("/getList") + public R> list(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo) + { + List list = hotakeInitScreQuestionsReplyRecordInfoService.selectHotakeInitScreQuestionsReplyRecordInfoList(hotakeInitScreQuestionsReplyRecordInfo); + return R.ok(list); + } + + + + /** + * 获取初步筛选问题回答记录信息详细信息 + */ + @ApiOperation("获取初步筛选问题回答记录信息详细信息") + @GetMapping(value = "/{id}") + public R getInfo(@PathVariable("id") Long id) + { + return R.ok(hotakeInitScreQuestionsReplyRecordInfoService.selectHotakeInitScreQuestionsReplyRecordInfoById(id)); + } + + /** + * 新增初步筛选问题回答记录信息 + */ + @ApiOperation("新增初步筛选问题回答记录信息") + @Log(title = "初步筛选问题回答记录信息", businessType = BusinessType.INSERT) + @PostMapping + public R add(@RequestBody HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo) + { + return R.ok(hotakeInitScreQuestionsReplyRecordInfoService.insertHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfo)); + } + + /** + * 修改初步筛选问题回答记录信息 + */ + @ApiOperation("修改初步筛选问题回答记录信息") + @Log(title = "初步筛选问题回答记录信息", businessType = BusinessType.UPDATE) + @PutMapping + public R edit(@RequestBody HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo) + { + return R.ok(hotakeInitScreQuestionsReplyRecordInfoService.updateHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfo)); + } + + /** + * 删除初步筛选问题回答记录信息 + */ + @ApiOperation("删除初步筛选问题回答记录信息") + @Log(title = "初步筛选问题回答记录信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@PathVariable Long[] ids) + { + return R.ok(hotakeInitScreQuestionsReplyRecordInfoService.deleteHotakeInitScreQuestionsReplyRecordInfoByIds(ids)); + } +} diff --git a/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeInitialScreeningQuestionsInfoController.java b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeInitialScreeningQuestionsInfoController.java new file mode 100644 index 0000000..2006955 --- /dev/null +++ b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeInitialScreeningQuestionsInfoController.java @@ -0,0 +1,96 @@ +package com.vetti.web.controller.hotake; + +import com.vetti.common.annotation.Log; +import com.vetti.common.core.controller.BaseController; +import com.vetti.common.core.domain.R; +import com.vetti.common.core.page.TableDataInfo; +import com.vetti.common.enums.BusinessType; +import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo; +import com.vetti.hotake.service.IHotakeInitialScreeningQuestionsInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 初步筛选问题信息Controller + * + * @author wangxiangshun + * @date 2025-12-14 + */ +@Api(tags ="初步筛选问题信息") +@RestController +@RequestMapping("/hotake/initialScreeningQuestionsInfo") +public class HotakeInitialScreeningQuestionsInfoController extends BaseController +{ + @Autowired + private IHotakeInitialScreeningQuestionsInfoService hotakeInitialScreeningQuestionsInfoService; + + /** + * 查询初步筛选问题信息列表 + */ + @ApiOperation("查询初步筛选问题信息列表") + @GetMapping("/getPageList") + public TableDataInfo pageList(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo) + { + startPage(); + List list = hotakeInitialScreeningQuestionsInfoService.selectHotakeInitialScreeningQuestionsInfoList(hotakeInitialScreeningQuestionsInfo); + return getDataTable(list); + } + + /** + * 查询初步筛选问题信息列表(无分页) + */ + @ApiOperation("查询初步筛选问题信息列表(无分页)") + @GetMapping("/getList") + public R> list(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo) + { + List list = hotakeInitialScreeningQuestionsInfoService.selectHotakeInitialScreeningQuestionsInfoList(hotakeInitialScreeningQuestionsInfo); + return R.ok(list); + } + + /** + * 获取初步筛选问题信息详细信息 + */ + @ApiOperation("获取初步筛选问题信息详细信息") + @GetMapping(value = "/{id}") + public R getInfo(@PathVariable("id") Long id) + { + return R.ok(hotakeInitialScreeningQuestionsInfoService.selectHotakeInitialScreeningQuestionsInfoById(id)); + } + + /** + * 新增初步筛选问题信息 + */ + @ApiOperation("新增初步筛选问题信息") + @Log(title = "初步筛选问题信息", businessType = BusinessType.INSERT) + @PostMapping + public R add(@RequestBody HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo) + { + return R.ok(hotakeInitialScreeningQuestionsInfoService.insertHotakeInitialScreeningQuestionsInfo(hotakeInitialScreeningQuestionsInfo)); + } + + /** + * 修改初步筛选问题信息 + */ + @ApiOperation("修改初步筛选问题信息") + @Log(title = "初步筛选问题信息", businessType = BusinessType.UPDATE) + @PutMapping + public R edit(@RequestBody HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo) + { + return R.ok(hotakeInitialScreeningQuestionsInfoService.updateHotakeInitialScreeningQuestionsInfo(hotakeInitialScreeningQuestionsInfo)); + } + + /** + * 删除初步筛选问题信息 + */ + @ApiOperation("删除初步筛选问题信息") + @Log(title = "初步筛选问题信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@PathVariable Long[] ids) + { + return R.ok(hotakeInitialScreeningQuestionsInfoService.deleteHotakeInitialScreeningQuestionsInfoByIds(ids)); + } +} diff --git a/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeRolesInfoController.java b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeRolesInfoController.java index b1f5d6f..bacd163 100644 --- a/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeRolesInfoController.java +++ b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeRolesInfoController.java @@ -3,15 +3,15 @@ package com.vetti.web.controller.hotake; import com.vetti.common.annotation.Log; import com.vetti.common.core.controller.BaseController; import com.vetti.common.core.domain.AjaxResult; +import com.vetti.common.core.domain.R; import com.vetti.common.core.page.TableDataInfo; import com.vetti.common.enums.BusinessType; -import com.vetti.common.utils.poi.ExcelUtil; import com.vetti.hotake.domain.HotakeRolesInfo; +import com.vetti.hotake.domain.dto.HotakeRolesInfoDto; import com.vetti.hotake.service.IHotakeRolesInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -34,9 +34,8 @@ public class HotakeRolesInfoController extends BaseController * 查询岗位信息列表 */ @ApiOperation("查询岗位信息列表") - @PreAuthorize("@ss.hasPermi('hotake:rolesInfo:list')") - @GetMapping("/list") - public TableDataInfo list(HotakeRolesInfo hotakeRolesInfo) + @GetMapping("/getPageList") + public TableDataInfo listPage(HotakeRolesInfo hotakeRolesInfo) { startPage(); List list = hotakeRolesInfoService.selectHotakeRolesInfoList(hotakeRolesInfo); @@ -44,35 +43,30 @@ public class HotakeRolesInfoController extends BaseController } /** - * 导出岗位信息列表 + * 查询岗位信息列表(无分页) */ - @ApiOperation("导出岗位信息列表") - @PreAuthorize("@ss.hasPermi('hotake:rolesInfo:export')") - @Log(title = "岗位信息", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(HotakeRolesInfo hotakeRolesInfo) + @ApiOperation("查询岗位信息列表(无分页)") + @GetMapping("/getList") + public R> list(HotakeRolesInfo hotakeRolesInfo) { List list = hotakeRolesInfoService.selectHotakeRolesInfoList(hotakeRolesInfo); - ExcelUtil util = new ExcelUtil(HotakeRolesInfo.class); - return util.exportExcel(list, "岗位信息数据"); + return R.ok(list); } /** * 获取岗位信息详细信息 */ @ApiOperation("获取岗位信息详细信息") - @PreAuthorize("@ss.hasPermi('hotake:rolesInfo:query')") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) + public R getInfo(@PathVariable("id") Long id) { - return AjaxResult.success(hotakeRolesInfoService.selectHotakeRolesInfoById(id)); + return R.ok(hotakeRolesInfoService.selectHotakeRolesInfoDtoById(id)); } /** * 新增岗位信息 */ @ApiOperation("新增岗位信息") - @PreAuthorize("@ss.hasPermi('hotake:rolesInfo:add')") @Log(title = "岗位信息", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody HotakeRolesInfo hotakeRolesInfo) @@ -84,7 +78,6 @@ public class HotakeRolesInfoController extends BaseController * 修改岗位信息 */ @ApiOperation("修改岗位信息") - @PreAuthorize("@ss.hasPermi('hotake:rolesInfo:edit')") @Log(title = "岗位信息", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody HotakeRolesInfo hotakeRolesInfo) @@ -96,11 +89,23 @@ public class HotakeRolesInfoController extends BaseController * 删除岗位信息 */ @ApiOperation("删除岗位信息") - @PreAuthorize("@ss.hasPermi('hotake:rolesInfo:remove')") @Log(title = "岗位信息", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) + public R remove(@PathVariable Long[] ids) { - return toAjax(hotakeRolesInfoService.deleteHotakeRolesInfoByIds(ids)); + return R.ok(hotakeRolesInfoService.deleteHotakeRolesInfoByIds(ids)); } + + /** + * 保存岗位信息 + */ + @ApiOperation("保存岗位信息") + @Log(title = "保存岗位信息", businessType = BusinessType.INSERT) + @PostMapping("/save") + public R save(@RequestBody HotakeRolesInfoDto hotakeRolesInfo) + { + return R.ok(hotakeRolesInfoService.saveHotakeRolesInfo(hotakeRolesInfo)); + } + + } diff --git a/vetti-admin/src/main/java/com/vetti/web/controller/system/SysDictDataController.java b/vetti-admin/src/main/java/com/vetti/web/controller/system/SysDictDataController.java index 875d497..b6c60a9 100644 --- a/vetti-admin/src/main/java/com/vetti/web/controller/system/SysDictDataController.java +++ b/vetti-admin/src/main/java/com/vetti/web/controller/system/SysDictDataController.java @@ -79,7 +79,7 @@ public class SysDictDataController extends BaseController */ @ApiOperation("根据字典类型查询字典数据信息(hotake_languages_type:语言类型,hotake_skills_tool_type:技能工具类型," + "role_level:岗位级别,role_location_type:岗位地点类型,role_select_job_type:岗位选择工作类型,role_type:岗位类型," + - "role_required_skills:所需技能,role_nice_to_have_skills:拥有的好技能,role_education_requirements_type:教育要求类型," + + "role_required_skills:所需技能,role_nice_to_have_skills:加分技能,role_education_requirements_type:教育要求类型," + "role_certification_licenses:岗位所需证书,role_benefits:岗位福利,role_publishing_channels:发布渠道)") @GetMapping(value = "/type/{dictType}") public R> dictType(@PathVariable String dictType) diff --git a/vetti-admin/src/main/resources/application-druid.yml b/vetti-admin/src/main/resources/application-druid.yml index ef91b57..96a1507 100644 --- a/vetti-admin/src/main/resources/application-druid.yml +++ b/vetti-admin/src/main/resources/application-druid.yml @@ -177,4 +177,4 @@ chatGpt: http: client: - connect-timeout-seconds: 10 + connect-timeout-seconds: 600 diff --git a/vetti-admin/src/main/resources/application.yml b/vetti-admin/src/main/resources/application.yml index fa1d7de..5d98e0b 100644 --- a/vetti-admin/src/main/resources/application.yml +++ b/vetti-admin/src/main/resources/application.yml @@ -36,6 +36,9 @@ spring: restart: # 热部署开关 enabled: true + mvc: + async: + request-timeout: 120000 # token配置 token: diff --git a/vetti-admin/src/main/resources/i18n/messages_en_US.properties b/vetti-admin/src/main/resources/i18n/messages_en_US.properties index b596e5b..7035452 100644 --- a/vetti-admin/src/main/resources/i18n/messages_en_US.properties +++ b/vetti-admin/src/main/resources/i18n/messages_en_US.properties @@ -55,6 +55,10 @@ systemSysRegisterService10007 = Registration failed, please contact the system a systemEmailUtil10001 = Sending Email Failed systemR10001 = Operation Successful systemR10002 = Operation Failed + + +HotakeRolesInfoServiceImpl10001 = The job information is abnormal. Please try again later + #管理端 # manager.页面,字段 = User Manager VerificationEmailTiTle = Your verification code diff --git a/vetti-admin/src/main/resources/i18n/messages_zh_CN.properties b/vetti-admin/src/main/resources/i18n/messages_zh_CN.properties index 8814c0f..69451eb 100644 --- a/vetti-admin/src/main/resources/i18n/messages_zh_CN.properties +++ b/vetti-admin/src/main/resources/i18n/messages_zh_CN.properties @@ -54,6 +54,9 @@ systemEmailUtil10001 = 发送邮件失败 systemR10001 = 操作成功 systemR10002 = 操作失败 + +HotakeRolesInfoServiceImpl10001 = 岗位信息异常,请稍后再试 + #管理端 # manager.页面,字段 = 用户管理 VerificationEmailTiTle = 你的验证码 diff --git a/vetti-admin/target/classes/application-druid.yml b/vetti-admin/target/classes/application-druid.yml index ef91b57..96a1507 100644 --- a/vetti-admin/target/classes/application-druid.yml +++ b/vetti-admin/target/classes/application-druid.yml @@ -177,4 +177,4 @@ chatGpt: http: client: - connect-timeout-seconds: 10 + connect-timeout-seconds: 600 diff --git a/vetti-admin/target/classes/application.yml b/vetti-admin/target/classes/application.yml index fa1d7de..5d98e0b 100644 --- a/vetti-admin/target/classes/application.yml +++ b/vetti-admin/target/classes/application.yml @@ -36,6 +36,9 @@ spring: restart: # 热部署开关 enabled: true + mvc: + async: + request-timeout: 120000 # token配置 token: diff --git a/vetti-admin/target/classes/i18n/messages_en_US.properties b/vetti-admin/target/classes/i18n/messages_en_US.properties index b596e5b..7035452 100644 --- a/vetti-admin/target/classes/i18n/messages_en_US.properties +++ b/vetti-admin/target/classes/i18n/messages_en_US.properties @@ -55,6 +55,10 @@ systemSysRegisterService10007 = Registration failed, please contact the system a systemEmailUtil10001 = Sending Email Failed systemR10001 = Operation Successful systemR10002 = Operation Failed + + +HotakeRolesInfoServiceImpl10001 = The job information is abnormal. Please try again later + #管理端 # manager.页面,字段 = User Manager VerificationEmailTiTle = Your verification code diff --git a/vetti-admin/target/classes/i18n/messages_zh_CN.properties b/vetti-admin/target/classes/i18n/messages_zh_CN.properties index 8814c0f..69451eb 100644 --- a/vetti-admin/target/classes/i18n/messages_zh_CN.properties +++ b/vetti-admin/target/classes/i18n/messages_zh_CN.properties @@ -54,6 +54,9 @@ systemEmailUtil10001 = 发送邮件失败 systemR10001 = 操作成功 systemR10002 = 操作失败 + +HotakeRolesInfoServiceImpl10001 = 岗位信息异常,请稍后再试 + #管理端 # manager.页面,字段 = 用户管理 VerificationEmailTiTle = 你的验证码 diff --git a/vetti-common/src/main/java/com/vetti/common/enums/RoleOperStepsEnum.java b/vetti-common/src/main/java/com/vetti/common/enums/RoleOperStepsEnum.java new file mode 100644 index 0000000..2977c74 --- /dev/null +++ b/vetti-common/src/main/java/com/vetti/common/enums/RoleOperStepsEnum.java @@ -0,0 +1,35 @@ +package com.vetti.common.enums; + +/** + * 岗位操作步骤 + */ +public enum RoleOperStepsEnum { + + STEPS_1("1", "第一步"), + STEPS_2("2", "第二步"), + STEPS_3("3", "第三步"), + STEPS_4("4", "第四步"), + STEPS_5("5", "第五步"), + STEPS_6("6", "第六步"), + ; + + private final String code; + private final String info; + + RoleOperStepsEnum(String code, String info) + { + this.code = code; + this.info = info; + } + + public String getCode() + { + return code; + } + + public String getInfo() + { + return info; + } + +} diff --git a/vetti-common/src/main/java/com/vetti/common/enums/RoleStatusEnum.java b/vetti-common/src/main/java/com/vetti/common/enums/RoleStatusEnum.java new file mode 100644 index 0000000..4aa738f --- /dev/null +++ b/vetti-common/src/main/java/com/vetti/common/enums/RoleStatusEnum.java @@ -0,0 +1,33 @@ +package com.vetti.common.enums; + +/** + * 岗位状态 + */ +public enum RoleStatusEnum { + + PAUSE("pause", "暂停"), + OPEN("open", "发布"), + EDITING("editing", "编辑中"), + ARCHIVED("archived", "已归档"), + ; + + private final String code; + private final String info; + + RoleStatusEnum(String code, String info) + { + this.code = code; + this.info = info; + } + + public String getCode() + { + return code; + } + + public String getInfo() + { + return info; + } + +} diff --git a/vetti-common/src/main/java/com/vetti/common/utils/DateUtils.java b/vetti-common/src/main/java/com/vetti/common/utils/DateUtils.java index 8a009c3..52f4f72 100644 --- a/vetti-common/src/main/java/com/vetti/common/utils/DateUtils.java +++ b/vetti-common/src/main/java/com/vetti/common/utils/DateUtils.java @@ -3,11 +3,7 @@ package com.vetti.common.utils; import java.lang.management.ManagementFactory; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.LocalTime; -import java.time.ZoneId; -import java.time.ZonedDateTime; +import java.time.*; import java.util.Date; import org.apache.commons.lang3.time.DateFormatUtils; @@ -217,4 +213,52 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils { return calculateDifference(startDate, endDate, unit); } + /** + * 计算指定时间距离当前时间的相对描述(小时前/天前/周前) + * @param createTime 创建时间(Date类型) + * @return 相对时间描述(如:2小时前、3天前、1周前) + */ + public static String getTimeAgo(Date createTime) { + // 空值校验 + if (createTime == null) { + return "Unknown time"; + } + + // 将Date转换为LocalDateTime(默认使用系统时区) + LocalDateTime createLocalTime = createTime.toInstant() + .atZone(ZoneId.systemDefault()) + .toLocalDateTime(); + LocalDateTime now = LocalDateTime.now(); + + // 计算时间差(秒) + Duration duration = Duration.between(createLocalTime, now); + long seconds = duration.getSeconds(); + + // 处理未来时间的情况 + if (seconds < 0) { + return "Future time"; + } + + // 定义时间单位换算 + long secondsPerHour = 3600; + long secondsPerDay = secondsPerHour * 24; + long secondsPerWeek = secondsPerDay * 7; + + // 计算不同维度的时间差 + long hours = seconds / secondsPerHour; + long days = seconds / secondsPerDay; + long weeks = seconds / secondsPerWeek; + + // 按优先级返回(周 > 天 > 小时) + if (weeks >= 1) { + return weeks + "weeks ago"; + } else if (days >= 1) { + return days + "days ago"; + } else if (hours >= 1) { + return hours + "hours ago"; + } else { + return "Just now"; // 1小时内 + } + } + } diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeInitScreQuestionsReplyRecordInfo.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeInitScreQuestionsReplyRecordInfo.java new file mode 100644 index 0000000..02219d4 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeInitScreQuestionsReplyRecordInfo.java @@ -0,0 +1,46 @@ +package com.vetti.hotake.domain; + +import lombok.Data; +import lombok.experimental.Accessors; +import io.swagger.annotations.ApiModelProperty; +import com.vetti.common.annotation.Excel; +import com.vetti.common.core.domain.BaseEntity; + +/** + * 初步筛选问题回答记录信息对象 hotake_init_scre_questions_reply_record_info + * + * @author wangxiangshun + * @date 2025-12-14 + */ +@Data +@Accessors(chain = true) +public class HotakeInitScreQuestionsReplyRecordInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + @ApiModelProperty("主键ID") + private Long id; + + /** 岗位ID */ + @ApiModelProperty("岗位ID") + @Excel(name = "岗位ID") + private Long roleId; + + /** 候选人ID */ + @ApiModelProperty("候选人ID") + @Excel(name = "候选人ID") + private Long candidateId; + + /** 问题ID */ + @ApiModelProperty("问题ID") + @Excel(name = "问题ID") + private Long questionId; + + /** 答案 */ + @ApiModelProperty("答案") + @Excel(name = "答案") + private String answerConnect; + + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeInitialScreeningQuestionsInfo.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeInitialScreeningQuestionsInfo.java new file mode 100644 index 0000000..33af793 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeInitialScreeningQuestionsInfo.java @@ -0,0 +1,61 @@ +package com.vetti.hotake.domain; + +import com.vetti.hotake.domain.dto.AnswerOptionsDto; +import lombok.Data; +import lombok.experimental.Accessors; +import io.swagger.annotations.ApiModelProperty; +import com.vetti.common.annotation.Excel; +import com.vetti.common.core.domain.BaseEntity; + +import java.util.List; + +/** + * 初步筛选问题信息对象 hotake_initial_screening_questions_info + * + * @author wangxiangshun + * @date 2025-12-14 + */ +@Data +@Accessors(chain = true) +public class HotakeInitialScreeningQuestionsInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + @ApiModelProperty("主键ID") + private Long id; + + /** 岗位ID */ + @ApiModelProperty("岗位ID") + @Excel(name = "岗位ID") + private Long roleId; + + /** 招聘人ID */ + @ApiModelProperty("招聘人ID") + @Excel(name = "招聘人ID") + private Long recruiterId; + + /** 问题 */ + @ApiModelProperty("问题") + @Excel(name = "问题") + private String questionTitle; + + /** 问题类型 */ + @ApiModelProperty("问题类型") + @Excel(name = "问题类型") + private String questionType; + + /** 问题答案json */ + @ApiModelProperty("问题答案json") + @Excel(name = "问题答案json") + private String answerOptions; + + /** 是否是必填项 */ + @ApiModelProperty("是否是必填项") + @Excel(name = "是否是必填项") + private String requiredField; + + @ApiModelProperty("问题答案选项数据集合") + private List answerOptionsList; + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeRolesInfo.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeRolesInfo.java index 9f3dd15..40e8c97 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeRolesInfo.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeRolesInfo.java @@ -23,6 +23,9 @@ public class HotakeRolesInfo extends BaseEntity @ApiModelProperty("主键ID") private Long id; + @ApiModelProperty("UUID主键") + private String uuid; + /** 招聘人ID */ @ApiModelProperty("招聘人ID") @Excel(name = "招聘人ID") @@ -33,6 +36,12 @@ public class HotakeRolesInfo extends BaseEntity @Excel(name = "岗位名称") private String roleName; + @ApiModelProperty("招聘公司名称") + private String companyName; + + @ApiModelProperty("岗位类型") + private String roleType; + /** 工作地点类型 */ @ApiModelProperty("工作地点类型") @Excel(name = "工作地点类型") @@ -116,7 +125,7 @@ public class HotakeRolesInfo extends BaseEntity /** 角色福利 */ @ApiModelProperty("角色福利") @Excel(name = "角色福利") - private String roleBenefits; + private String roleBenefitsJson; /** 发布渠道 */ @ApiModelProperty("发布渠道") @@ -143,16 +152,19 @@ public class HotakeRolesInfo extends BaseEntity @Excel(name = "发布日期") private String posted; - /** 数据类型(normal:正常,draft:草稿) */ - @ApiModelProperty("数据类型(normal:正常,draft:草稿)") - @Excel(name = "数据类型", readConverterExp = "n=ormal:正常,draft:草稿") + @ApiModelProperty("语言") + private String languages; + + @ApiModelProperty("数据类型(release:发布Job,draft:草稿,template:模版)") private String dataType; /** 当前操作步骤 */ - @ApiModelProperty("当前操作步骤") + @ApiModelProperty("当前操作步骤()") @Excel(name = "当前操作步骤") private String operStep; + @ApiModelProperty("当前岗位状态(pause:暂停,archived:关闭/归档,open:发布,editing:编辑中)") + private String status; } diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/AnswerOptionsDto.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/AnswerOptionsDto.java new file mode 100644 index 0000000..cd41d97 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/AnswerOptionsDto.java @@ -0,0 +1,19 @@ +package com.vetti.hotake.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 问题答案 + * + * @author wangxiangshun + * @date 2025-11-30 + */ +@Data +@Accessors(chain = true) +public class AnswerOptionsDto { + + @ApiModelProperty("答案选项") + private String answers; +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/HotakeRolesInfoDto.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/HotakeRolesInfoDto.java new file mode 100644 index 0000000..839b8ac --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/HotakeRolesInfoDto.java @@ -0,0 +1,43 @@ +package com.vetti.hotake.domain.dto; + +import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo; +import com.vetti.hotake.domain.HotakeRolesInfo; +import com.vetti.hotake.domain.dto.roleDto.*; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.List; + +/** + * 岗位信息 hotake_cv_info + * + * @author wangxiangshun + * @date 2025-11-30 + */ +@Data +@Accessors(chain = true) +public class HotakeRolesInfoDto extends HotakeRolesInfo { + + @ApiModelProperty("所需技能数据集合") + private List requiredSkillsList; + + @ApiModelProperty("加分技能数据集合") + private List niceToHaveSkillsList; + + @ApiModelProperty("教育要求") + private EducationRequirementsDto educationRequirements; + + @ApiModelProperty("证书数据集合") + private List certificationsLicensesList; + + @ApiModelProperty("角色福利数据集合") + private List roleBenefitsList; + + @ApiModelProperty("发布渠道数据集合") + private List publishingChannelsList; + + @ApiModelProperty("初步筛选问题数据集合") + private List initialScreeningQuestionsInfoList; + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/CertificationsLicensesDto.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/CertificationsLicensesDto.java new file mode 100644 index 0000000..bc7e271 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/CertificationsLicensesDto.java @@ -0,0 +1,22 @@ +package com.vetti.hotake.domain.dto.roleDto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 证书信息 + * + * @author wangxiangshun + * @date 2025-11-30 + */ +@Data +@Accessors(chain = true) +public class CertificationsLicensesDto { + + @ApiModelProperty("证书Key/自定义证书名") + private String val; + + @ApiModelProperty("standard:标准证书,customize:自定义") + private String type; +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/EducationRequirementsDto.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/EducationRequirementsDto.java new file mode 100644 index 0000000..c7a6e37 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/EducationRequirementsDto.java @@ -0,0 +1,22 @@ +package com.vetti.hotake.domain.dto.roleDto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 教育要求信息 + * + * @author wangxiangshun + * @date 2025-11-30 + */ +@Data +@Accessors(chain = true) +public class EducationRequirementsDto { + + @ApiModelProperty("学历专业名称") + private String academicMajor; + + @ApiModelProperty("学位") + private String degree; +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/NiceToHaveSkillsDto.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/NiceToHaveSkillsDto.java new file mode 100644 index 0000000..355e631 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/NiceToHaveSkillsDto.java @@ -0,0 +1,19 @@ +package com.vetti.hotake.domain.dto.roleDto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 岗位加分技能信息 + * + * @author wangxiangshun + * @date 2025-11-30 + */ +@Data +@Accessors(chain = true) +public class NiceToHaveSkillsDto { + + @ApiModelProperty("加分技能Key") + private String keyValue; +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/PublishingChannelsDto.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/PublishingChannelsDto.java new file mode 100644 index 0000000..c893f99 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/PublishingChannelsDto.java @@ -0,0 +1,19 @@ +package com.vetti.hotake.domain.dto.roleDto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 岗位发布渠道信息 + * + * @author wangxiangshun + * @date 2025-11-30 + */ +@Data +@Accessors(chain = true) +public class PublishingChannelsDto { + + @ApiModelProperty("发布渠道Key") + private String keyValue; +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/RequiredSkillsDto.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/RequiredSkillsDto.java new file mode 100644 index 0000000..c38e276 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/RequiredSkillsDto.java @@ -0,0 +1,20 @@ +package com.vetti.hotake.domain.dto.roleDto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 岗位所需技能信息 + * + * @author wangxiangshun + * @date 2025-11-30 + */ +@Data +@Accessors(chain = true) +public class RequiredSkillsDto { + + @ApiModelProperty("所需技能Key") + private String keyValue; + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/RoleBenefitsDto.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/RoleBenefitsDto.java new file mode 100644 index 0000000..e3f5673 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/roleDto/RoleBenefitsDto.java @@ -0,0 +1,19 @@ +package com.vetti.hotake.domain.dto.roleDto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 岗位福利信息 + * + * @author wangxiangshun + * @date 2025-11-30 + */ +@Data +@Accessors(chain = true) +public class RoleBenefitsDto { + + @ApiModelProperty("福利Key") + private String keyValue; +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeInitScreQuestionsReplyRecordInfoMapper.java b/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeInitScreQuestionsReplyRecordInfoMapper.java new file mode 100644 index 0000000..33c9eae --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeInitScreQuestionsReplyRecordInfoMapper.java @@ -0,0 +1,69 @@ +package com.vetti.hotake.mapper; + +import java.util.List; +import com.vetti.hotake.domain.HotakeInitScreQuestionsReplyRecordInfo; + +/** + * 初步筛选问题回答记录信息Mapper接口 + * + * @author wangxiangshun + * @date 2025-12-14 + */ +public interface HotakeInitScreQuestionsReplyRecordInfoMapper +{ + /** + * 查询初步筛选问题回答记录信息 + * + * @param id 初步筛选问题回答记录信息主键 + * @return 初步筛选问题回答记录信息 + */ + public HotakeInitScreQuestionsReplyRecordInfo selectHotakeInitScreQuestionsReplyRecordInfoById(Long id); + + /** + * 查询初步筛选问题回答记录信息列表 + * + * @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息 + * @return 初步筛选问题回答记录信息集合 + */ + public List selectHotakeInitScreQuestionsReplyRecordInfoList(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo); + + /** + * 新增初步筛选问题回答记录信息 + * + * @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息 + * @return 结果 + */ + public int insertHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo); + + /** + * 修改初步筛选问题回答记录信息 + * + * @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息 + * @return 结果 + */ + public int updateHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo); + + /** + * 删除初步筛选问题回答记录信息 + * + * @param id 初步筛选问题回答记录信息主键 + * @return 结果 + */ + public int deleteHotakeInitScreQuestionsReplyRecordInfoById(Long id); + + /** + * 批量删除初步筛选问题回答记录信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteHotakeInitScreQuestionsReplyRecordInfoByIds(Long[] ids); + /** + * 批量新增初步筛选问题回答记录信息 + * + * @param hotakeInitScreQuestionsReplyRecordInfoList 初步筛选问题回答记录信息列表 + * @return 结果 + */ + public int batchInsertHotakeInitScreQuestionsReplyRecordInfo(List hotakeInitScreQuestionsReplyRecordInfoList); + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeInitialScreeningQuestionsInfoMapper.java b/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeInitialScreeningQuestionsInfoMapper.java new file mode 100644 index 0000000..5ca7f9c --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeInitialScreeningQuestionsInfoMapper.java @@ -0,0 +1,69 @@ +package com.vetti.hotake.mapper; + +import java.util.List; +import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo; + +/** + * 初步筛选问题信息Mapper接口 + * + * @author wangxiangshun + * @date 2025-12-14 + */ +public interface HotakeInitialScreeningQuestionsInfoMapper +{ + /** + * 查询初步筛选问题信息 + * + * @param id 初步筛选问题信息主键 + * @return 初步筛选问题信息 + */ + public HotakeInitialScreeningQuestionsInfo selectHotakeInitialScreeningQuestionsInfoById(Long id); + + /** + * 查询初步筛选问题信息列表 + * + * @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息 + * @return 初步筛选问题信息集合 + */ + public List selectHotakeInitialScreeningQuestionsInfoList(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo); + + /** + * 新增初步筛选问题信息 + * + * @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息 + * @return 结果 + */ + public int insertHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo); + + /** + * 修改初步筛选问题信息 + * + * @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息 + * @return 结果 + */ + public int updateHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo); + + /** + * 删除初步筛选问题信息 + * + * @param id 初步筛选问题信息主键 + * @return 结果 + */ + public int deleteHotakeInitialScreeningQuestionsInfoById(Long id); + + /** + * 批量删除初步筛选问题信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteHotakeInitialScreeningQuestionsInfoByIds(Long[] ids); + /** + * 批量新增初步筛选问题信息 + * + * @param hotakeInitialScreeningQuestionsInfoList 初步筛选问题信息列表 + * @return 结果 + */ + public int batchInsertHotakeInitialScreeningQuestionsInfo(List hotakeInitialScreeningQuestionsInfoList); + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeRolesInfoMapper.java b/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeRolesInfoMapper.java index 6ce40f3..34d39cd 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeRolesInfoMapper.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeRolesInfoMapper.java @@ -66,4 +66,14 @@ public interface HotakeRolesInfoMapper */ public int batchInsertHotakeRolesInfo(List hotakeRolesInfoList); + + /** + * 修改岗位信息 + * + * @param hotakeRolesInfo 岗位信息 + * @return 结果 + */ + public int updateAllHotakeRolesInfo(HotakeRolesInfo hotakeRolesInfo); + + } diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeInitScreQuestionsReplyRecordInfoService.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeInitScreQuestionsReplyRecordInfoService.java new file mode 100644 index 0000000..6c7d0fa --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeInitScreQuestionsReplyRecordInfoService.java @@ -0,0 +1,70 @@ +package com.vetti.hotake.service; + +import java.util.List; +import com.vetti.hotake.domain.HotakeInitScreQuestionsReplyRecordInfo; + +/** + * 初步筛选问题回答记录信息Service接口 + * + * @author wangxiangshun + * @date 2025-12-14 + */ +public interface IHotakeInitScreQuestionsReplyRecordInfoService +{ + /** + * 查询初步筛选问题回答记录信息 + * + * @param id 初步筛选问题回答记录信息主键 + * @return 初步筛选问题回答记录信息 + */ + public HotakeInitScreQuestionsReplyRecordInfo selectHotakeInitScreQuestionsReplyRecordInfoById(Long id); + + /** + * 查询初步筛选问题回答记录信息列表 + * + * @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息 + * @return 初步筛选问题回答记录信息集合 + */ + public List selectHotakeInitScreQuestionsReplyRecordInfoList(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo); + + /** + * 新增初步筛选问题回答记录信息 + * + * @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息 + * @return 结果 + */ + public int insertHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo); + + /** + * 修改初步筛选问题回答记录信息 + * + * @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息 + * @return 结果 + */ + public int updateHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo); + + /** + * 批量删除初步筛选问题回答记录信息 + * + * @param ids 需要删除的初步筛选问题回答记录信息主键集合 + * @return 结果 + */ + public int deleteHotakeInitScreQuestionsReplyRecordInfoByIds(Long[] ids); + + /** + * 删除初步筛选问题回答记录信息信息 + * + * @param id 初步筛选问题回答记录信息主键 + * @return 结果 + */ + public int deleteHotakeInitScreQuestionsReplyRecordInfoById(Long id); + + /** + * 批量新增初步筛选问题回答记录信息 + * + * @param hotakeInitScreQuestionsReplyRecordInfoList 初步筛选问题回答记录信息列表 + * @return 结果 + */ + public int batchInsertHotakeInitScreQuestionsReplyRecordInfo(List hotakeInitScreQuestionsReplyRecordInfoList); + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeInitialScreeningQuestionsInfoService.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeInitialScreeningQuestionsInfoService.java new file mode 100644 index 0000000..f036652 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeInitialScreeningQuestionsInfoService.java @@ -0,0 +1,70 @@ +package com.vetti.hotake.service; + +import java.util.List; +import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo; + +/** + * 初步筛选问题信息Service接口 + * + * @author wangxiangshun + * @date 2025-12-14 + */ +public interface IHotakeInitialScreeningQuestionsInfoService +{ + /** + * 查询初步筛选问题信息 + * + * @param id 初步筛选问题信息主键 + * @return 初步筛选问题信息 + */ + public HotakeInitialScreeningQuestionsInfo selectHotakeInitialScreeningQuestionsInfoById(Long id); + + /** + * 查询初步筛选问题信息列表 + * + * @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息 + * @return 初步筛选问题信息集合 + */ + public List selectHotakeInitialScreeningQuestionsInfoList(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo); + + /** + * 新增初步筛选问题信息 + * + * @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息 + * @return 结果 + */ + public int insertHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo); + + /** + * 修改初步筛选问题信息 + * + * @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息 + * @return 结果 + */ + public int updateHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo); + + /** + * 批量删除初步筛选问题信息 + * + * @param ids 需要删除的初步筛选问题信息主键集合 + * @return 结果 + */ + public int deleteHotakeInitialScreeningQuestionsInfoByIds(Long[] ids); + + /** + * 删除初步筛选问题信息信息 + * + * @param id 初步筛选问题信息主键 + * @return 结果 + */ + public int deleteHotakeInitialScreeningQuestionsInfoById(Long id); + + /** + * 批量新增初步筛选问题信息 + * + * @param hotakeInitialScreeningQuestionsInfoList 初步筛选问题信息列表 + * @return 结果 + */ + public int batchInsertHotakeInitialScreeningQuestionsInfo(List hotakeInitialScreeningQuestionsInfoList); + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeRolesInfoService.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeRolesInfoService.java index 9669732..7ccb1d3 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeRolesInfoService.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeRolesInfoService.java @@ -2,6 +2,7 @@ package com.vetti.hotake.service; import java.util.List; import com.vetti.hotake.domain.HotakeRolesInfo; +import com.vetti.hotake.domain.dto.HotakeRolesInfoDto; /** * 岗位信息Service接口 @@ -19,6 +20,15 @@ public interface IHotakeRolesInfoService */ public HotakeRolesInfo selectHotakeRolesInfoById(Long id); + /** + * 查询岗位信息 + * + * @param id 岗位信息主键 + * @return 岗位信息 + */ + public HotakeRolesInfoDto selectHotakeRolesInfoDtoById(Long id); + + /** * 查询岗位信息列表 * @@ -67,4 +77,13 @@ public interface IHotakeRolesInfoService */ public int batchInsertHotakeRolesInfo(List hotakeRolesInfoList); + + /** + * 保存岗位信息 + * + * @param hotakeRolesInfo 岗位信息 + * @return 结果 + */ + public HotakeRolesInfoDto saveHotakeRolesInfo(HotakeRolesInfoDto hotakeRolesInfo); + } diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeInitScreQuestionsReplyRecordInfoServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeInitScreQuestionsReplyRecordInfoServiceImpl.java new file mode 100644 index 0000000..cd3e583 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeInitScreQuestionsReplyRecordInfoServiceImpl.java @@ -0,0 +1,118 @@ +package com.vetti.hotake.service.impl; + +import java.util.List; + +import com.vetti.common.core.service.BaseServiceImpl; +import com.vetti.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.vetti.hotake.mapper.HotakeInitScreQuestionsReplyRecordInfoMapper; +import com.vetti.hotake.domain.HotakeInitScreQuestionsReplyRecordInfo; +import com.vetti.hotake.service.IHotakeInitScreQuestionsReplyRecordInfoService; + +/** + * 初步筛选问题回答记录信息Service业务层处理 + * + * @author wangxiangshun + * @date 2025-12-14 + */ +@SuppressWarnings("all") +@Service +public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServiceImpl implements IHotakeInitScreQuestionsReplyRecordInfoService +{ + @Autowired + private HotakeInitScreQuestionsReplyRecordInfoMapper hotakeInitScreQuestionsReplyRecordInfoMapper; + + /** + * 查询初步筛选问题回答记录信息 + * + * @param id 初步筛选问题回答记录信息主键 + * @return 初步筛选问题回答记录信息 + */ + @Transactional(readOnly = true) + @Override + public HotakeInitScreQuestionsReplyRecordInfo selectHotakeInitScreQuestionsReplyRecordInfoById(Long id) + { + return hotakeInitScreQuestionsReplyRecordInfoMapper.selectHotakeInitScreQuestionsReplyRecordInfoById(id); + } + + /** + * 查询初步筛选问题回答记录信息列表 + * + * @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息 + * @return 初步筛选问题回答记录信息 + */ + @Transactional(readOnly = true) + @Override + public List selectHotakeInitScreQuestionsReplyRecordInfoList(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo) + { + return hotakeInitScreQuestionsReplyRecordInfoMapper.selectHotakeInitScreQuestionsReplyRecordInfoList(hotakeInitScreQuestionsReplyRecordInfo); + } + + /** + * 新增初步筛选问题回答记录信息 + * + * @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息 + * @return 结果 + */ + @Transactional(rollbackFor=Exception.class) + @Override + public int insertHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo) + { + hotakeInitScreQuestionsReplyRecordInfo.setCreateTime(DateUtils.getNowDate()); + return hotakeInitScreQuestionsReplyRecordInfoMapper.insertHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfo); + } + + /** + * 修改初步筛选问题回答记录信息 + * + * @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息 + * @return 结果 + */ + @Transactional(rollbackFor=Exception.class) + @Override + public int updateHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo) + { + hotakeInitScreQuestionsReplyRecordInfo.setUpdateTime(DateUtils.getNowDate()); + return hotakeInitScreQuestionsReplyRecordInfoMapper.updateHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfo); + } + + /** + * 批量删除初步筛选问题回答记录信息 + * + * @param ids 需要删除的初步筛选问题回答记录信息主键 + * @return 结果 + */ + @Transactional(rollbackFor=Exception.class) + @Override + public int deleteHotakeInitScreQuestionsReplyRecordInfoByIds(Long[] ids) + { + return hotakeInitScreQuestionsReplyRecordInfoMapper.deleteHotakeInitScreQuestionsReplyRecordInfoByIds(ids); + } + + /** + * 删除初步筛选问题回答记录信息信息 + * + * @param id 初步筛选问题回答记录信息主键 + * @return 结果 + */ + @Transactional(rollbackFor=Exception.class) + @Override + public int deleteHotakeInitScreQuestionsReplyRecordInfoById(Long id) + { + return hotakeInitScreQuestionsReplyRecordInfoMapper.deleteHotakeInitScreQuestionsReplyRecordInfoById(id); + } + /** + * 批量新增初步筛选问题回答记录信息 + * + * @param hotakeInitScreQuestionsReplyRecordInfoList 初步筛选问题回答记录信息列表 + * @return 结果 + */ + @Transactional(rollbackFor=Exception.class) + @Override + public int batchInsertHotakeInitScreQuestionsReplyRecordInfo(List hotakeInitScreQuestionsReplyRecordInfoList){ + return hotakeInitScreQuestionsReplyRecordInfoMapper.batchInsertHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfoList); + } +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeInitialScreeningQuestionsInfoServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeInitialScreeningQuestionsInfoServiceImpl.java new file mode 100644 index 0000000..739de52 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeInitialScreeningQuestionsInfoServiceImpl.java @@ -0,0 +1,137 @@ +package com.vetti.hotake.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; +import com.vetti.common.core.service.BaseServiceImpl; +import com.vetti.common.enums.FillTypeEnum; +import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo; +import com.vetti.hotake.domain.dto.AnswerOptionsDto; +import com.vetti.hotake.mapper.HotakeInitialScreeningQuestionsInfoMapper; +import com.vetti.hotake.service.IHotakeInitialScreeningQuestionsInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 初步筛选问题信息Service业务层处理 + * + * @author wangxiangshun + * @date 2025-12-14 + */ +@SuppressWarnings("all") +@Service +public class HotakeInitialScreeningQuestionsInfoServiceImpl extends BaseServiceImpl implements IHotakeInitialScreeningQuestionsInfoService +{ + @Autowired + private HotakeInitialScreeningQuestionsInfoMapper hotakeInitialScreeningQuestionsInfoMapper; + + /** + * 查询初步筛选问题信息 + * + * @param id 初步筛选问题信息主键 + * @return 初步筛选问题信息 + */ + @Transactional(readOnly = true) + @Override + public HotakeInitialScreeningQuestionsInfo selectHotakeInitialScreeningQuestionsInfoById(Long id) + { + HotakeInitialScreeningQuestionsInfo questionsInfo = hotakeInitialScreeningQuestionsInfoMapper.selectHotakeInitialScreeningQuestionsInfoById(id); + if(questionsInfo != null && StrUtil.isNotEmpty(questionsInfo.getAnswerOptions())){ + List answerOptionsDtos = JSONUtil.toList(questionsInfo.getAnswerOptions(), AnswerOptionsDto.class); + questionsInfo.setAnswerOptionsList(answerOptionsDtos); + } + return questionsInfo; + } + + /** + * 查询初步筛选问题信息列表 + * + * @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息 + * @return 初步筛选问题信息 + */ + @Transactional(readOnly = true) + @Override + public List selectHotakeInitialScreeningQuestionsInfoList(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo) + { + return hotakeInitialScreeningQuestionsInfoMapper.selectHotakeInitialScreeningQuestionsInfoList(hotakeInitialScreeningQuestionsInfo); + } + + /** + * 新增初步筛选问题信息 + * + * @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息 + * @return 结果 + */ + @Transactional(rollbackFor=Exception.class) + @Override + public int insertHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo) + { + + fill(FillTypeEnum.INSERT.getCode(), hotakeInitialScreeningQuestionsInfo); + if(CollectionUtil.isNotEmpty(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList())){ + hotakeInitialScreeningQuestionsInfo.setAnswerOptions(JSONUtil.toJsonStr(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList())); + }else { + hotakeInitialScreeningQuestionsInfo.setAnswerOptions(""); + } + return hotakeInitialScreeningQuestionsInfoMapper.insertHotakeInitialScreeningQuestionsInfo(hotakeInitialScreeningQuestionsInfo); + } + + /** + * 修改初步筛选问题信息 + * + * @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息 + * @return 结果 + */ + @Transactional(rollbackFor=Exception.class) + @Override + public int updateHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo) + { + fill(FillTypeEnum.UPDATE.getCode(), hotakeInitialScreeningQuestionsInfo); + if(CollectionUtil.isNotEmpty(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList())){ + hotakeInitialScreeningQuestionsInfo.setAnswerOptions(JSONUtil.toJsonStr(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList())); + }else { + hotakeInitialScreeningQuestionsInfo.setAnswerOptions(""); + } + return hotakeInitialScreeningQuestionsInfoMapper.updateHotakeInitialScreeningQuestionsInfo(hotakeInitialScreeningQuestionsInfo); + } + + /** + * 批量删除初步筛选问题信息 + * + * @param ids 需要删除的初步筛选问题信息主键 + * @return 结果 + */ + @Transactional(rollbackFor=Exception.class) + @Override + public int deleteHotakeInitialScreeningQuestionsInfoByIds(Long[] ids) + { + return hotakeInitialScreeningQuestionsInfoMapper.deleteHotakeInitialScreeningQuestionsInfoByIds(ids); + } + + /** + * 删除初步筛选问题信息信息 + * + * @param id 初步筛选问题信息主键 + * @return 结果 + */ + @Transactional(rollbackFor=Exception.class) + @Override + public int deleteHotakeInitialScreeningQuestionsInfoById(Long id) + { + return hotakeInitialScreeningQuestionsInfoMapper.deleteHotakeInitialScreeningQuestionsInfoById(id); + } + /** + * 批量新增初步筛选问题信息 + * + * @param hotakeInitialScreeningQuestionsInfoList 初步筛选问题信息列表 + * @return 结果 + */ + @Transactional(rollbackFor=Exception.class) + @Override + public int batchInsertHotakeInitialScreeningQuestionsInfo(List hotakeInitialScreeningQuestionsInfoList){ + return hotakeInitialScreeningQuestionsInfoMapper.batchInsertHotakeInitialScreeningQuestionsInfo(hotakeInitialScreeningQuestionsInfoList); + } +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesInfoServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesInfoServiceImpl.java index a0d05c5..b8af300 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesInfoServiceImpl.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesInfoServiceImpl.java @@ -1,16 +1,30 @@ package com.vetti.hotake.service.impl; -import java.util.List; - +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; import com.vetti.common.core.service.BaseServiceImpl; +import com.vetti.common.enums.FillTypeEnum; +import com.vetti.common.enums.RoleOperStepsEnum; +import com.vetti.common.enums.RoleStatusEnum; +import com.vetti.common.exception.ServiceException; import com.vetti.common.utils.DateUtils; +import com.vetti.common.utils.MessageUtils; +import com.vetti.common.utils.SecurityUtils; +import com.vetti.common.utils.uuid.IdUtils; +import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo; +import com.vetti.hotake.domain.HotakeRolesInfo; +import com.vetti.hotake.domain.dto.HotakeRolesInfoDto; +import com.vetti.hotake.domain.dto.roleDto.*; +import com.vetti.hotake.mapper.HotakeRolesInfoMapper; +import com.vetti.hotake.service.IHotakeInitialScreeningQuestionsInfoService; +import com.vetti.hotake.service.IHotakeRolesInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import com.vetti.hotake.mapper.HotakeRolesInfoMapper; -import com.vetti.hotake.domain.HotakeRolesInfo; -import com.vetti.hotake.service.IHotakeRolesInfoService; +import java.util.List; /** * 岗位信息Service业务层处理 @@ -25,6 +39,9 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota @Autowired private HotakeRolesInfoMapper hotakeRolesInfoMapper; + @Autowired + private IHotakeInitialScreeningQuestionsInfoService hotakeInitialScreeningQuestionsInfoService; + /** * 查询岗位信息 * @@ -38,6 +55,62 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota return hotakeRolesInfoMapper.selectHotakeRolesInfoById(id); } + /** + * 查询岗位详细信息 + * @param id 岗位信息主键 + * @return + */ + @Override + public HotakeRolesInfoDto selectHotakeRolesInfoDtoById(Long id) { + HotakeRolesInfoDto dto = new HotakeRolesInfoDto(); + HotakeRolesInfo hotakeRolesInfo = hotakeRolesInfoMapper.selectHotakeRolesInfoById(id); + BeanUtil.copyProperties(hotakeRolesInfo, dto); + + if(hotakeRolesInfo != null) { + String requiredSkillsJson = hotakeRolesInfo.getRequiredSkillsJson(); + if(StrUtil.isNotEmpty(requiredSkillsJson)){ + List requiredSkillsList = JSONUtil.toList(requiredSkillsJson, RequiredSkillsDto.class); + dto.setRequiredSkillsList(requiredSkillsList); + } + + String niceToHaveSkillsJson = hotakeRolesInfo.getNiceToHaveSkillsJson(); + if(StrUtil.isNotEmpty(niceToHaveSkillsJson)){ + List niceToHaveSkillsList = JSONUtil.toList(niceToHaveSkillsJson, NiceToHaveSkillsDto.class); + dto.setNiceToHaveSkillsList(niceToHaveSkillsList); + } + + String educationRequirementsJson = hotakeRolesInfo.getEducationRequirementsJson(); + if(StrUtil.isNotEmpty(educationRequirementsJson)){ + EducationRequirementsDto educationRequirements = JSONUtil.toBean(educationRequirementsJson, EducationRequirementsDto.class); + dto.setEducationRequirements(educationRequirements); + } + + String certificationsLicensesJson = hotakeRolesInfo.getCertificationsLicensesJson(); + if(StrUtil.isNotEmpty(certificationsLicensesJson)){ + List certificationsLicensesList = JSONUtil.toList(certificationsLicensesJson, CertificationsLicensesDto.class); + dto.setCertificationsLicensesList(certificationsLicensesList); + } + + String roleBenefitsJson = hotakeRolesInfo.getRoleBenefitsJson(); + if(StrUtil.isNotEmpty(roleBenefitsJson)){ + List roleBenefitsList = JSONUtil.toList(roleBenefitsJson, RoleBenefitsDto.class); + dto.setRoleBenefitsList(roleBenefitsList); + } + + String publishingChannelsJson = hotakeRolesInfo.getPublishingChannelsJson(); + if(StrUtil.isNotEmpty(publishingChannelsJson)){ + List publishingChannelsList = JSONUtil.toList(publishingChannelsJson, PublishingChannelsDto.class); + dto.setPublishingChannelsList(publishingChannelsList); + } + HotakeInitialScreeningQuestionsInfo queryQuestion = new HotakeInitialScreeningQuestionsInfo(); + queryQuestion.setRoleId(id); + List questionsInfoList = hotakeInitialScreeningQuestionsInfoService.selectHotakeInitialScreeningQuestionsInfoList(queryQuestion); + dto.setInitialScreeningQuestionsInfoList(questionsInfoList); + } + + return dto; + } + /** * 查询岗位信息列表 * @@ -48,7 +121,16 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota @Override public List selectHotakeRolesInfoList(HotakeRolesInfo hotakeRolesInfo) { - return hotakeRolesInfoMapper.selectHotakeRolesInfoList(hotakeRolesInfo); + hotakeRolesInfo.setRecruiterId(SecurityUtils.getUserId()); + List rolesInfoList = hotakeRolesInfoMapper.selectHotakeRolesInfoList(hotakeRolesInfo); + //计算一个发布日期 + if(CollectionUtil.isNotEmpty(rolesInfoList)){ + for (HotakeRolesInfo rolesInfo : rolesInfoList) { + String posted = DateUtils.getTimeAgo(rolesInfo.getCreateTime()); + rolesInfo.setPosted(posted); + } + } + return rolesInfoList; } /** @@ -115,4 +197,113 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota public int batchInsertHotakeRolesInfo(List hotakeRolesInfoList){ return hotakeRolesInfoMapper.batchInsertHotakeRolesInfo(hotakeRolesInfoList); } + + /** + * 保存岗位信息 + * @param hotakeRolesInfo 岗位信息 + * @return + */ + @Override + public HotakeRolesInfoDto saveHotakeRolesInfo(HotakeRolesInfoDto hotakeRolesInfo) { + //先看岗位信息ID是否存在 + HotakeRolesInfo rolesInfo = null; + Long rolesInfoId = 0L; + if(hotakeRolesInfo.getId() == null){ + //先保存一个空数据 + HotakeRolesInfo info = new HotakeRolesInfo(); + fill(FillTypeEnum.INSERT.getCode(), info); + info.setUuid(IdUtils.simpleUUID()); + insertHotakeRolesInfo(info); + rolesInfoId = info.getId(); + }else{ + rolesInfoId = hotakeRolesInfo.getId(); + } + rolesInfo = selectHotakeRolesInfoById(rolesInfoId); + if(rolesInfo == null){ + throw new ServiceException(MessageUtils.messageCustomize("HotakeRolesInfoServiceImpl10001")); + } + //按照步骤来进行保存对应的数据 + if(RoleOperStepsEnum.STEPS_1.getCode().equals(hotakeRolesInfo.getOperStep())){ + rolesInfo.setRoleName(hotakeRolesInfo.getRoleName()); + rolesInfo.setCompanyName(hotakeRolesInfo.getCompanyName()); + rolesInfo.setRoleType(hotakeRolesInfo.getRoleType()); + rolesInfo.setJobLevel(hotakeRolesInfo.getJobLevel()); + rolesInfo.setJobExperience(hotakeRolesInfo.getJobExperience()); + rolesInfo.setLocationType(hotakeRolesInfo.getLocationType()); + rolesInfo.setJobType(hotakeRolesInfo.getJobType()); + rolesInfo.setSalaryStart(hotakeRolesInfo.getSalaryStart()); + rolesInfo.setSalaryEnd(hotakeRolesInfo.getSalaryEnd()); + } + if(RoleOperStepsEnum.STEPS_2.getCode().equals(hotakeRolesInfo.getOperStep())){ + + if(CollectionUtil.isNotEmpty(hotakeRolesInfo.getRequiredSkillsList())){ + String requiredSkillsJson = JSONUtil.toJsonStr(hotakeRolesInfo.getRequiredSkillsList()); + rolesInfo.setRequiredSkillsJson(requiredSkillsJson); + }else{ + rolesInfo.setRequiredSkillsJson(""); + } + + if(CollectionUtil.isNotEmpty(hotakeRolesInfo.getNiceToHaveSkillsList())){ + String niceToHaveSkillsJson = JSONUtil.toJsonStr(hotakeRolesInfo.getNiceToHaveSkillsList()); + rolesInfo.setNiceToHaveSkillsJson(niceToHaveSkillsJson); + }else{ + rolesInfo.setNiceToHaveSkillsJson(""); + } + + if(hotakeRolesInfo.getEducationRequirements() != null){ + rolesInfo.setEducationRequirementsJson(JSONUtil.toJsonStr(hotakeRolesInfo.getEducationRequirements())); + }else { + rolesInfo.setEducationRequirementsJson(""); + } + + if (CollectionUtil.isNotEmpty(hotakeRolesInfo.getCertificationsLicensesList())){ + String certificationsLicensesJson = JSONUtil.toJsonStr(hotakeRolesInfo.getCertificationsLicensesList()); + rolesInfo.setCertificationsLicensesJson(certificationsLicensesJson); + }else{ + rolesInfo.setCertificationsLicensesJson(""); + } + } + if(RoleOperStepsEnum.STEPS_3.getCode().equals(hotakeRolesInfo.getOperStep())){ + rolesInfo.setDescriptionTone(hotakeRolesInfo.getDescriptionTone()); + rolesInfo.setAboutRole(hotakeRolesInfo.getAboutRole()); + rolesInfo.setResponsibilities(hotakeRolesInfo.getResponsibilities()); + if (CollectionUtil.isNotEmpty(hotakeRolesInfo.getRoleBenefitsList())){ + String roleBenefitsJson = JSONUtil.toJsonStr(hotakeRolesInfo.getRoleBenefitsList()); + rolesInfo.setRoleBenefitsJson(roleBenefitsJson); + }else{ + rolesInfo.setRoleBenefitsJson(""); + } + } + if(RoleOperStepsEnum.STEPS_4.getCode().equals(hotakeRolesInfo.getOperStep())){ + + } + if(RoleOperStepsEnum.STEPS_5.getCode().equals(hotakeRolesInfo.getOperStep())){ + + } + if(RoleOperStepsEnum.STEPS_6.getCode().equals(hotakeRolesInfo.getOperStep())){ + + if (CollectionUtil.isNotEmpty(hotakeRolesInfo.getPublishingChannelsList())){ + String publishingChannelsJson = JSONUtil.toJsonStr(hotakeRolesInfo.getPublishingChannelsList()); + rolesInfo.setPublishingChannelsJson(publishingChannelsJson); + }else{ + rolesInfo.setPublishingChannelsJson(""); + } + rolesInfo.setPublishingScheduleDate(hotakeRolesInfo.getPublishingScheduleDate()); + rolesInfo.setPublishingScheduleTime(hotakeRolesInfo.getPublishingScheduleTime()); + rolesInfo.setApplicationDeadline(hotakeRolesInfo.getApplicationDeadline()); + } + //默认是编辑中状态 + if(StrUtil.isEmpty(hotakeRolesInfo.getStatus())){ + rolesInfo.setStatus(RoleStatusEnum.EDITING.getCode()); + } + rolesInfo.setDataType(hotakeRolesInfo.getDataType()); + rolesInfo.setLanguages(hotakeRolesInfo.getLanguages()); + rolesInfo.setOperStep(hotakeRolesInfo.getOperStep()); + rolesInfo.setRecruiterId(SecurityUtils.getUserId()); + fill(FillTypeEnum.UPDATE.getCode(), rolesInfo); + hotakeRolesInfoMapper.updateAllHotakeRolesInfo(rolesInfo); + //查询返回所有的结果数据 + HotakeRolesInfoDto rolesInfoDto = selectHotakeRolesInfoDtoById(rolesInfo.getId()); + return rolesInfoDto; + } } diff --git a/vetti-hotakes/src/main/resources/mapper/hotake/HotakeInitScreQuestionsReplyRecordInfoMapper.xml b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeInitScreQuestionsReplyRecordInfoMapper.xml new file mode 100644 index 0000000..c7fe633 --- /dev/null +++ b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeInitScreQuestionsReplyRecordInfoMapper.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + select id, role_id, candidate_id, question_id, answer_connect, del_flag, create_by, create_time, update_by, update_time, remark from hotake_init_scre_questions_reply_record_info + + + + + + + + insert into hotake_init_scre_questions_reply_record_info + + role_id, + candidate_id, + question_id, + answer_connect, + del_flag, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{roleId}, + #{candidateId}, + #{questionId}, + #{answerConnect}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update hotake_init_scre_questions_reply_record_info + + role_id = #{roleId}, + candidate_id = #{candidateId}, + question_id = #{questionId}, + answer_connect = #{answerConnect}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from hotake_init_scre_questions_reply_record_info where id = #{id} + + + + delete from hotake_init_scre_questions_reply_record_info where id in + + #{id} + + + + + insert into hotake_init_scre_questions_reply_record_info( id, role_id, candidate_id, question_id, answer_connect, del_flag, create_by, create_time, update_by, update_time, remark) values + + ( #{item.id}, #{item.roleId}, #{item.candidateId}, #{item.questionId}, #{item.answerConnect}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark}) + + + \ No newline at end of file diff --git a/vetti-hotakes/src/main/resources/mapper/hotake/HotakeInitialScreeningQuestionsInfoMapper.xml b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeInitialScreeningQuestionsInfoMapper.xml new file mode 100644 index 0000000..c1c1309 --- /dev/null +++ b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeInitialScreeningQuestionsInfoMapper.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + select id, role_id, recruiter_id, question_title, question_type, answer_options, required_field, del_flag, create_by, create_time, update_by, update_time, remark from hotake_initial_screening_questions_info + + + + + + + + insert into hotake_initial_screening_questions_info + + role_id, + recruiter_id, + question_title, + question_type, + answer_options, + required_field, + del_flag, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{roleId}, + #{recruiterId}, + #{questionTitle}, + #{questionType}, + #{answerOptions}, + #{requiredField}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update hotake_initial_screening_questions_info + + role_id = #{roleId}, + recruiter_id = #{recruiterId}, + question_title = #{questionTitle}, + question_type = #{questionType}, + answer_options = #{answerOptions}, + required_field = #{requiredField}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from hotake_initial_screening_questions_info where id = #{id} + + + + delete from hotake_initial_screening_questions_info where id in + + #{id} + + + + + insert into hotake_initial_screening_questions_info( id, role_id, recruiter_id, question_title, question_type, answer_options, required_field, del_flag, create_by, create_time, update_by, update_time, remark) values + + ( #{item.id}, #{item.roleId}, #{item.recruiterId}, #{item.questionTitle}, #{item.questionType}, #{item.answerOptions}, #{item.requiredField}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark}) + + + \ No newline at end of file diff --git a/vetti-hotakes/src/main/resources/mapper/hotake/HotakeRolesInfoMapper.xml b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeRolesInfoMapper.xml index 2091077..23b4d74 100644 --- a/vetti-hotakes/src/main/resources/mapper/hotake/HotakeRolesInfoMapper.xml +++ b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeRolesInfoMapper.xml @@ -6,8 +6,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + @@ -24,14 +27,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + + @@ -41,12 +46,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, recruiter_id, role_name, location_type, locations, applied, job_Level, job_type, job_experience, salary_start, salary_end, required_skills_json, nice_to_have_skills_json, education_requirements_json, accept_equivalent_work_flag, certifications_licenses_json, description_tone, about_role, responsibilities, role_benefits, publishing_channels_json, publishing_schedule_date, publishing_schedule_time, application_deadline, posted, data_type, oper_step, del_flag, create_by, create_time, update_by, update_time, remark from hotake_roles_info + select id, uuid,recruiter_id, role_name,company_name,role_type, location_type, locations, applied, job_Level, job_type, job_experience, salary_start, salary_end, required_skills_json, + nice_to_have_skills_json, education_requirements_json, accept_equivalent_work_flag, + certifications_licenses_json, description_tone, about_role, responsibilities, role_benefits_json, + publishing_channels_json, publishing_schedule_date, publishing_schedule_time, application_deadline, posted, languages,data_type, + oper_step, status,del_flag, create_by, create_time, update_by, update_time, remark from hotake_roles_info + + insert into hotake_roles_info + uuid, recruiter_id, role_name, + company_name, + role_type, location_type, locations, applied, @@ -102,14 +122,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" description_tone, about_role, responsibilities, - role_benefits, + role_benefits_json, publishing_channels_json, publishing_schedule_date, publishing_schedule_time, application_deadline, posted, + languages, data_type, oper_step, + status, del_flag, create_by, create_time, @@ -118,8 +140,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" remark, + #{uuid}, #{recruiterId}, #{roleName}, + #{companyName}, + #{roleType}, #{locationType}, #{locations}, #{applied}, @@ -136,14 +161,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{descriptionTone}, #{aboutRole}, #{responsibilities}, - #{roleBenefits}, + #{roleBenefitsJson}, #{publishingChannelsJson}, #{publishingScheduleDate}, #{publishingScheduleTime}, #{applicationDeadline}, #{posted}, + #{languages}, #{dataType}, #{operStep}, + #{status}, #{delFlag}, #{createBy}, #{createTime}, @@ -158,6 +185,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" recruiter_id = #{recruiterId}, role_name = #{roleName}, + company_name = #{companyName}, + role_type = #{roleType}, location_type = #{locationType}, locations = #{locations}, applied = #{applied}, @@ -174,14 +203,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" description_tone = #{descriptionTone}, about_role = #{aboutRole}, responsibilities = #{responsibilities}, - role_benefits = #{roleBenefits}, + role_benefits_json = #{roleBenefitsJson}, publishing_channels_json = #{publishingChannelsJson}, publishing_schedule_date = #{publishingScheduleDate}, publishing_schedule_time = #{publishingScheduleTime}, application_deadline = #{applicationDeadline}, posted = #{posted}, + languages = #{languages}, data_type = #{dataType}, oper_step = #{operStep}, + status = #{status}, del_flag = #{delFlag}, create_by = #{createBy}, create_time = #{createTime}, @@ -192,6 +223,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} + + update hotake_roles_info + + recruiter_id = #{recruiterId}, + role_name = #{roleName}, + company_name = #{companyName}, + role_type = #{roleType}, + location_type = #{locationType}, + locations = #{locations}, + applied = #{applied}, + job_Level = #{jobLevel}, + job_type = #{jobType}, + job_experience = #{jobExperience}, + salary_start = #{salaryStart}, + salary_end = #{salaryEnd}, + required_skills_json = #{requiredSkillsJson}, + nice_to_have_skills_json = #{niceToHaveSkillsJson}, + education_requirements_json = #{educationRequirementsJson}, + accept_equivalent_work_flag = #{acceptEquivalentWorkFlag}, + certifications_licenses_json = #{certificationsLicensesJson}, + description_tone = #{descriptionTone}, + about_role = #{aboutRole}, + responsibilities = #{responsibilities}, + role_benefits_json = #{roleBenefitsJson}, + publishing_channels_json = #{publishingChannelsJson}, + publishing_schedule_date = #{publishingScheduleDate}, + publishing_schedule_time = #{publishingScheduleTime}, + application_deadline = #{applicationDeadline}, + posted = #{posted}, + languages = #{languages}, + data_type = #{dataType}, + oper_step = #{operStep}, + status = #{status}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + delete from hotake_roles_info where id = #{id} @@ -204,9 +275,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - insert into hotake_roles_info( id, recruiter_id, role_name, location_type, locations, applied, job_Level, job_type, job_experience, salary_start, salary_end, required_skills_json, nice_to_have_skills_json, education_requirements_json, accept_equivalent_work_flag, certifications_licenses_json, description_tone, about_role, responsibilities, role_benefits, publishing_channels_json, publishing_schedule_date, publishing_schedule_time, application_deadline, posted, data_type, oper_step, del_flag, create_by, create_time, update_by, update_time, remark,) values + insert into hotake_roles_info( id, recruiter_id, role_name, location_type, locations, applied, job_Level, job_type, job_experience, salary_start, salary_end, required_skills_json, nice_to_have_skills_json, education_requirements_json, accept_equivalent_work_flag, certifications_licenses_json, description_tone, about_role, responsibilities, role_benefits_json, publishing_channels_json, publishing_schedule_date, publishing_schedule_time, application_deadline, posted, data_type, oper_step, del_flag, create_by, create_time, update_by, update_time, remark) values - ( #{item.id}, #{item.recruiterId}, #{item.roleName}, #{item.locationType}, #{item.locations}, #{item.applied}, #{item.jobLevel}, #{item.jobType}, #{item.jobExperience}, #{item.salaryStart}, #{item.salaryEnd}, #{item.requiredSkillsJson}, #{item.niceToHaveSkillsJson}, #{item.educationRequirementsJson}, #{item.acceptEquivalentWorkFlag}, #{item.certificationsLicensesJson}, #{item.descriptionTone}, #{item.aboutRole}, #{item.responsibilities}, #{item.roleBenefits}, #{item.publishingChannelsJson}, #{item.publishingScheduleDate}, #{item.publishingScheduleTime}, #{item.applicationDeadline}, #{item.posted}, #{item.dataType}, #{item.operStep}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark},) + ( #{item.id}, #{item.recruiterId}, #{item.roleName}, #{item.locationType}, #{item.locations}, #{item.applied}, #{item.jobLevel}, #{item.jobType}, #{item.jobExperience}, #{item.salaryStart}, #{item.salaryEnd}, #{item.requiredSkillsJson}, #{item.niceToHaveSkillsJson}, #{item.educationRequirementsJson}, #{item.acceptEquivalentWorkFlag}, #{item.certificationsLicensesJson}, #{item.descriptionTone}, #{item.aboutRole}, #{item.responsibilities}, #{item.roleBenefitsJson}, #{item.publishingChannelsJson}, #{item.publishingScheduleDate}, #{item.publishingScheduleTime}, #{item.applicationDeadline}, #{item.posted}, #{item.dataType}, #{item.operStep}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark}) \ No newline at end of file