| | |
| | | userService.deleteCache(userDTO.getUserId()); |
| | | UserDTO getUserDTO=userService.login(userDTO); |
| | | if(getUserDTO!=null){ |
| | | return Result.seccess(userDTO); |
| | | return Result.success(userDTO); |
| | | }else{ |
| | | throw new ServiceException(Constants.Code_600,"用户名或密码错误"); |
| | | } |
| | |
| | | if(getUser == null){ |
| | | throw new ServiceException(Constants.Code_500,"注册失败"); |
| | | }else { |
| | | return Result.seccess(getUser); |
| | | return Result.success(getUser); |
| | | } |
| | | |
| | | //return |
| | |
| | | @ApiOperation("修改密码") |
| | | @PostMapping("/updatePassWord") |
| | | public Result updatePassWord(@RequestBody Map<String,Object> object){ |
| | | return Result.seccess( userService.updatePassWord(object)); |
| | | return Result.success( userService.updatePassWord(object)); |
| | | } |
| | | |
| | | @ApiOperation("修改用户名") |
| | | @PostMapping("/updateUserName") |
| | | public Result updateUserName(@RequestBody Map<String,Object> object){ |
| | | return Result.success( userService.updateUserName(object)); |
| | | } |
| | | |
| | | } |