package com.example.web.controller; import com.example.web.entity.Personnel; import com.example.web.service.PersonnelService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; /** * @Description: 员工信息控制器 */ @RestController public class PersonnelController { @Autowired private PersonnelService personnelService; /** * 根据负责人ID获取员工信息 * @param managerId 负责人ID * @return Personnel对象 */ @GetMapping("/api/personnel") public Personnel getPersonnelByManagerId(@RequestParam String managerId) { return personnelService.getPersonnelByManagerId(managerId); } }