You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
851 B
29 lines
851 B
|
2 months ago
|
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);
|
||
|
|
}
|
||
|
|
}
|