@PostMapping
public R<String> save(HttpServletRequest request, @RequestBody Employee employee) {
log.info("新增员工,员工信息:{}", employee.toString());
//初始密码123456,md5加密
employee.setPassword(DigestUtils.md5DigestAsHex("123456".getBytes()));
//employee.setCreateTime(LocalDateTime.now());
//employee.setUpdateTime(LocalDateTime.now());
//
////获取当前登录用户id
//Long empId = (Long) request.getSession().getAttribute("employee");
//
//employee.setCreateUser(empId);
//employee.setUpdateUser(empId);
employeeService.save(employee);
return R.success("新增员工成功");
}
=========================================================
标签:empId,123456,新增,员工,employee,EmployeeController,save From: https://www.cnblogs.com/dahuilang21/p/17235310.html