25 lines
648 B
Java
25 lines
648 B
Java
package com.bwie.auth.controller;
|
|
|
|
import com.bwie.auth.service.AuthService;
|
|
import com.bwie.common.domain.User;
|
|
import com.bwie.common.result.Result;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
@RestController
|
|
@RequestMapping("/auth")
|
|
public class AuthController {
|
|
@Autowired
|
|
private AuthService authService;
|
|
//登录
|
|
@PostMapping("/doLogin")
|
|
public Result doLogin(@RequestBody User user){
|
|
return authService.doLogin(user);
|
|
}
|
|
//获取登录信息
|
|
@GetMapping("/info")
|
|
public Result info(){
|
|
return authService.info();
|
|
}
|
|
}
|