@RestController
@Slf4j
public class LoginController {
@Autowired
private EmpService empService;
@PostMapping("/login")
public Result login(@RequestBody Emp emp) {
log.info("login");
Emp e = empService.login(emp);
return e != null ? Result.success() : Result.error("
⽤
户
名
或
密
码
错
误
");
}
}