添加登陆表单信息错误处理
This commit is contained in:
parent
93c1e1c2ca
commit
3ef2688320
|
@ -49,8 +49,11 @@ public class UserController {
|
|||
* @author 176yunxuan
|
||||
*/
|
||||
@PostMapping("/user/login")
|
||||
public BaseResponse userLogin(@RequestBody UserLoginVO userLoginVO){
|
||||
|
||||
public BaseResponse userLogin(@RequestBody UserLoginVO userLoginVO, BindingResult bindingResult){
|
||||
// 判断是否有参数错误
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultUtil.error(ErrorCode.REQUEST_BODY_ERROR, Processing.getValidatedErrorList(bindingResult));
|
||||
}
|
||||
return userService.userLogin(userLoginVO);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user