Compare commits

..

2 Commits

Author SHA1 Message Date
Hoshi 4e0f74e2ed Merge branch 'develop' of http://58.210.154.140:8888/iidi/backend/bocloud.sms into develop 2024-11-12 21:23:43 +08:00
Hoshi 756a4370d4 登录接口增加日志 2024-11-12 21:22:41 +08:00
1 changed files with 57 additions and 52 deletions

View File

@ -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());
}
} }
/** /**