外卖项目day02-员工管理--编辑员工功能实现

This commit is contained in:
xx
2026-11-16 11:10:53 +08:00
parent 2f1dcbf595
commit 78b22f7cfa
5 changed files with 54 additions and 1 deletions
@@ -108,4 +108,21 @@ public class EmployeeController {
return Result.success();
}
@ApiOperation("根据ID查询员工")
@GetMapping("/{id}")
public Result<Employee> getById(@PathVariable Long id){
log.info("根据ID查询员工:{}",id);
Employee employee = employeeService.getById(id);
return Result.success(employee);
}
@ApiOperation("编辑员工")
@PutMapping
public Result update(@RequestBody EmployeeDTO employeeDTO){
log.info("编辑员工:{}",employeeDTO);
employeeService.update(employeeDTO);
return Result.success();
}
}