@RequestMapping(value = "/userLogin", method = RequestMethod.POST, consumes = "application/json")
 public User userLogin(@RequestBody User user) {
   User loginUser = null;
   List<User> users = userService.userLogin(user);
   if (users != null && users.size() > 0) {
     loginUser = users.get(0);
   }
   return loginUser;
 }
 @RequestMapping(
     value = "/userRegister",
     method = RequestMethod.POST,
     consumes = "application/json")
 public User userRegister(@RequestBody User user) {
   if (UtilTools.validUser(user)) {
     userService.userRegister(user);
   }
   return user;
 }
 @RequestMapping(value = "/getUserById")
 public User getUserById(@RequestParam(value = "userId") long userId) {
   List<User> users = userService.getUserById(userId);
   return users.get(0);
 }