package com.mydreamjob.careerprogress; import com.mydreamjob.careerprogress.dto.CareerProgressResponse; import com.mydreamjob.common.api.ApiResponse; import com.mydreamjob.common.exception.BusinessException; import com.mydreamjob.common.exception.ErrorCode; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.enums.ParameterIn; import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.servlet.http.HttpServletRequest; import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; /** * 统一求职进度聚合接口(V34)。 * *
仅 STUDENT 可访问;身份只取 JWT,不接受 userId/studentUserId/candidateId 等参数。 * 未登录 401;COMPANY/ADMIN 403/2002;参数非法 400/1001。
*/ @Tag(name = "求职进度", description = "学生端聚合投递、面试、评分、Offer、竞争力排名与通知计数") @RestController @RequiredArgsConstructor public class CareerProgressController { /** R01-A4:身份只来自安全上下文,不接受请求参数传入的 userId。 */ private final com.mydreamjob.security.CurrentUserAccessor currentUserAccessor; /** R01-A4:requestId 只来自过滤器规范化后的唯一产出点。 */ private final com.mydreamjob.common.logging.RequestIdAccessor requestIdAccessor; private final CareerProgressService careerProgressService; @Operation( summary = "统一求职进度聚合", description = "只读学生端接口:汇总当前学生的投递分页、岗位、下一场面试、最近已提交结构化面试评分、" + "可展示 Offer、同岗位竞争力排名,以及待办/通知计数(仅计数,不含通知详情)。" + "身份仅从 JWT/SecurityContext 获取。", security = @SecurityRequirement(name = "bearerAuth")) @ApiResponses({ @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "400", description = "page/size/status 参数非法"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "未登录"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "403", description = "非 STUDENT 角色") }) @GetMapping("/profile/me/career-progress") public ResponseEntity