外卖项目day01-新增员工_代码完善-动态获取登录操作者(threadLocal)
This commit is contained in:
@@ -81,6 +81,8 @@ public class EmployeeController {
|
||||
@PostMapping()
|
||||
public Result<String> save(@RequestBody EmployeeDTO employeeDTO) {
|
||||
log.info("新增员工:{}",employeeDTO);
|
||||
//获取请求的线程ID
|
||||
log.error("当前控制器中的线程id:{}",Thread.currentThread().getId());
|
||||
//调用业务层新增员工的功能
|
||||
employeeService.save(employeeDTO);
|
||||
return Result.success();
|
||||
|
||||
Reference in New Issue
Block a user