| | |
| | | import java.time.LocalDate; |
| | | |
| | | import com.talentcard.server.business.PageResult; |
| | | import com.talentcard.server.business.admin.StatusUpdateRequest; |
| | | import com.talentcard.server.common.ApiResponse; |
| | | import jakarta.validation.Valid; |
| | | import org.springframework.http.HttpStatus; |
| | |
| | | return ApiResponse.success(talentService.availableAdvisors()); |
| | | } |
| | | |
| | | @GetMapping("/service-staff") |
| | | public ApiResponse<java.util.List<Map<String, Object>>> serviceStaff() { |
| | | return ApiResponse.success(talentService.availableServiceStaff()); |
| | | } |
| | | |
| | | @PostMapping(value = "/import", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | public ApiResponse<Map<String, Object>> importExcel(@RequestParam("file") MultipartFile file) throws java.io.IOException { |
| | | if (file.isEmpty() || file.getOriginalFilename() == null || !file.getOriginalFilename().toLowerCase().endsWith(".xlsx")) { |
| | |
| | | return ApiResponse.success(talentService.updateAdvisor(id, request.advisorId())); |
| | | } |
| | | |
| | | @PatchMapping("/{id}/service-staff") |
| | | public ApiResponse<Map<String, Object>> updateServiceStaff( |
| | | @PathVariable Long id, |
| | | @RequestBody TalentAdvisorUpdateRequest request |
| | | ) { |
| | | return ApiResponse.success(talentService.updateServiceStaff(id, request.advisorId())); |
| | | } |
| | | |
| | | @PatchMapping("/{id}/status") |
| | | public ApiResponse<Map<String, Object>> updateStatus( |
| | | @PathVariable Long id, |
| | | @Valid @RequestBody StatusUpdateRequest request |
| | | ) { |
| | | return ApiResponse.success(talentService.updateStatus(id, request.status())); |
| | | } |
| | | |
| | | @GetMapping("/{id}/cards") |
| | | public ApiResponse<PageResult<Map<String, Object>>> cards( |
| | | @PathVariable Long id, |