|
@@ -2,7 +2,6 @@ package com.example.hotel.controller.user;
|
|
|
|
|
|
|
|
import com.example.hotel.blImpl.user.AccountServiceImpl;
|
|
import com.example.hotel.blImpl.user.AccountServiceImpl;
|
|
|
import com.example.hotel.po.User;
|
|
import com.example.hotel.po.User;
|
|
|
-import com.example.hotel.util.TokenUtil;
|
|
|
|
|
import com.example.hotel.vo.UserForm;
|
|
import com.example.hotel.vo.UserForm;
|
|
|
import com.example.hotel.vo.ResponseVO;
|
|
import com.example.hotel.vo.ResponseVO;
|
|
|
import com.example.hotel.vo.UserInfoVO;
|
|
import com.example.hotel.vo.UserInfoVO;
|
|
@@ -25,7 +24,6 @@ public class AccountController {
|
|
|
if (user == null) {
|
|
if (user == null) {
|
|
|
return ResponseVO.buildFailure(ACCOUNT_INFO_ERROR);
|
|
return ResponseVO.buildFailure(ACCOUNT_INFO_ERROR);
|
|
|
}
|
|
}
|
|
|
- // String token = TokenUtil.sign(user);
|
|
|
|
|
return ResponseVO.buildSuccess(user);
|
|
return ResponseVO.buildSuccess(user);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -38,8 +36,6 @@ public class AccountController {
|
|
|
|
|
|
|
|
@GetMapping("/{id}/getUserInfo")
|
|
@GetMapping("/{id}/getUserInfo")
|
|
|
public ResponseVO getUserInfo(@PathVariable int id) {
|
|
public ResponseVO getUserInfo(@PathVariable int id) {
|
|
|
-// String token = httpServletRequest.getHeader("Authorization");
|
|
|
|
|
-// String email = TokenUtil.getEmail(token);
|
|
|
|
|
User user = accountService.getUserInfo(id);
|
|
User user = accountService.getUserInfo(id);
|
|
|
if(user==null){
|
|
if(user==null){
|
|
|
return ResponseVO.buildFailure(ACCOUNT_INFO_ERROR);
|
|
return ResponseVO.buildFailure(ACCOUNT_INFO_ERROR);
|
|
@@ -49,8 +45,6 @@ public class AccountController {
|
|
|
|
|
|
|
|
@PostMapping("/{id}/userInfo/update")
|
|
@PostMapping("/{id}/userInfo/update")
|
|
|
public ResponseVO updateInfo(@RequestBody UserInfoVO userInfoVO,@PathVariable int id){
|
|
public ResponseVO updateInfo(@RequestBody UserInfoVO userInfoVO,@PathVariable int id){
|
|
|
- //String token = httpServletRequest.getHeader("token");
|
|
|
|
|
- // String email = TokenUtil.getEmail(token);
|
|
|
|
|
return accountService.updateUserInfo(id,userInfoVO.getPassword(),userInfoVO.getUserName(),userInfoVO.getPhoneNumber());
|
|
return accountService.updateUserInfo(id,userInfoVO.getPassword(),userInfoVO.getUserName(),userInfoVO.getPhoneNumber());
|
|
|
|
|
|
|
|
}
|
|
}
|