登录接口增加日志
parent
f611a65475
commit
756a4370d4
|
@ -63,6 +63,7 @@ public class LoginController {
|
||||||
@PostMapping("/users/login")
|
@PostMapping("/users/login")
|
||||||
public GeneralResult<Map<String, Object>> userLogin(@RequestBody LoginModel loginModel,
|
public GeneralResult<Map<String, Object>> userLogin(@RequestBody LoginModel loginModel,
|
||||||
HttpServletRequest request) {
|
HttpServletRequest request) {
|
||||||
|
try {
|
||||||
log.info("开始执行登录请求");
|
log.info("开始执行登录请求");
|
||||||
long start;
|
long start;
|
||||||
String account = loginModel.getAccount();
|
String account = loginModel.getAccount();
|
||||||
|
@ -122,6 +123,10 @@ public class LoginController {
|
||||||
log.info("删除Redis耗时{}ms", System.currentTimeMillis() - start);
|
log.info("删除Redis耗时{}ms", System.currentTimeMillis() - start);
|
||||||
log.info("登录请求处理完成");
|
log.info("登录请求处理完成");
|
||||||
return loginResult;
|
return loginResult;
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error("登录异常",e);
|
||||||
|
return new GeneralResult<>(false,"登录异常:" + e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue