| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @Tag(name = "\u7ba1\u7406\u540e\u53f0-\u5bb6\u5c5e\u9644\u5c5e\u5361\u5ba1\u6838", description = "\u5bb6\u5c5e\u9644\u5c5e\u5361\u7533\u8bf7\u67e5\u8be2\u3001\u5ba1\u6838\u548c\u72b6\u6001\u8bb0\u5f55") |
| | | @Tag(name = "管理后台-家属附属卡审核", description = "家属附属卡申请查询、审核和状态记录") |
| | | @RestController |
| | | @RequestMapping("/api/admin/dependent-card-applies") |
| | | public class DependentCardApplyAdminController { |
| | |
| | | this.service = service; |
| | | } |
| | | |
| | | @Operation(summary = "\u5206\u9875\u67e5\u8be2\u5bb6\u5c5e\u9644\u5c5e\u5361\u7533\u8bf7") |
| | | @Operation(summary = "分页查询家属附属卡申请") |
| | | @GetMapping |
| | | public ApiResponse<PageResult<DependentCardApplyAdminResponse>> page( |
| | | @Parameter(description = "\u4e3b\u5361ID") @RequestParam(required = false) Long talentCardId, |
| | | @Parameter(description = "\u72b6\u6001\uff1a0\u5f85\u5ba1\u6838\u30011\u5df2\u901a\u8fc7\u30012\u5df2\u9a73\u56de\u30013\u5df2\u89e3\u7ed1") @RequestParam(required = false) Integer status, |
| | | @Parameter(description = "\u9875\u7801") @RequestParam(defaultValue = "1") int page, |
| | | @Parameter(description = "\u6bcf\u9875\u6570\u91cf\uff0c\u6700\u5927100") @RequestParam(defaultValue = "10") int size |
| | | @Parameter(description = "主卡ID") @RequestParam(required = false) Long talentCardId, |
| | | @Parameter(description = "状态:0待审核、1已通过、2已驳回、3已解绑") @RequestParam(required = false) Integer status, |
| | | @Parameter(description = "页码") @RequestParam(defaultValue = "1") int page, |
| | | @Parameter(description = "每页数量,最大100") @RequestParam(defaultValue = "10") int size |
| | | ) { |
| | | return ApiResponse.success(service.page(talentCardId, status, page, size)); |
| | | } |
| | | |
| | | @Operation(summary = "\u67e5\u8be2\u5bb6\u5c5e\u9644\u5c5e\u5361\u7533\u8bf7\u8be6\u60c5") |
| | | @Operation(summary = "查询家属附属卡申请详情") |
| | | @GetMapping("/{id}") |
| | | public ApiResponse<DependentCardApplyAdminResponse> detail(@PathVariable Long id) { |
| | | return ApiResponse.success(service.detail(id)); |
| | | } |
| | | |
| | | @Operation(summary = "\u5ba1\u6838\u5bb6\u5c5e\u9644\u5c5e\u5361\u7533\u8bf7", description = "\u4ec5\u5f85\u5ba1\u6838\u7533\u8bf7\u53ef\u4ee5\u53d8\u66f4\u4e3a\u901a\u8fc7\u6216\u9a73\u56de\uff1b\u901a\u8fc7\u65f6\u6821\u9a8c\u4e3b\u5361\u6743\u9650\u548c\u5bb6\u5c5e\u5361\u540d\u989d") |
| | | @Operation(summary = "审核家属附属卡申请", description = "仅待审核申请可以变更为通过或驳回;通过时校验主卡权限和家属卡名额") |
| | | @ApiResponses({ |
| | | @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "\u5ba1\u6838\u6210\u529f"), |
| | | @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "500", description = "\u5ba1\u6838\u5931\u8d25\u3001\u7533\u8bf7\u4e0d\u5b58\u5728\u3001\u72b6\u6001\u51b2\u7a81\u6216\u7ed1\u5b9a\u540d\u989d\u5df2\u6ee1") |
| | | @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "审核成功"), |
| | | @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "500", description = "审核失败、申请不存在、状态冲突或绑定名额已满") |
| | | }) |
| | | @PatchMapping("/{id}/audit") |
| | | public ApiResponse<DependentCardApplyAdminResponse> audit( |
| | |
| | | return ApiResponse.success(service.audit(id, request, operatorId)); |
| | | } |
| | | |
| | | @Operation(summary = "\u67e5\u8be2\u5bb6\u5c5e\u9644\u5c5e\u5361\u7533\u8bf7\u72b6\u6001\u8bb0\u5f55") |
| | | @Operation(summary = "查询家属附属卡申请状态记录") |
| | | @GetMapping("/{id}/status-logs") |
| | | public ApiResponse<List<DependentCardApplyStatusLogResponse>> statusLogs(@PathVariable Long id) { |
| | | return ApiResponse.success(service.statusLogs(id)); |