All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.quhaodian.user.controller.rest.UserRestController Maven / Gradle / Ivy

There is a newer version: 1.8.31
Show newest version
package com.quhaodian.user.controller.rest;

import com.quhaodian.discover.rest.base.ResponseObject;
import com.quhaodian.user.api.UserHandler;
import com.quhaodian.user.domain.request.CheckPhoneCodeRequest;
import com.quhaodian.user.domain.request.UserChangePasswordRequestion;
import com.quhaodian.user.domain.request.UserChangePhoneRequestion;
import com.quhaodian.user.domain.request.UserCodeRequest;
import com.quhaodian.user.domain.request.UserLoginCodeRequest;
import com.quhaodian.user.domain.request.UserLoginOatuthRequest;
import com.quhaodian.user.domain.request.UserLoginRequest;
import com.quhaodian.user.domain.request.UserRegisterCodeRequest;
import com.quhaodian.user.domain.request.UserRegisterOatuthRequest;
import com.quhaodian.user.domain.request.UserResetPasswordRequestion;
import com.quhaodian.user.domain.request.UserUpdateRequestion;
import com.quhaodian.user.domain.response.UserResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by ada on 2017/6/29.
 */


@RestController
@RequestMapping(value = "rest")
public class UserRestController {


  @RequestMapping(value = "/user/sendCode")
  public ResponseObject sendCode(UserCodeRequest request) {
    return userHandler.sendCode(request);
  }

  @RequestMapping(value = "/user/loginByCode")
  public UserResponse loginByCode(UserLoginCodeRequest request) {
    return userHandler.loginByCode(request);
  }


  @RequestMapping(value = "/user/login")
  public UserResponse login(UserLoginRequest request) {
    return userHandler.login(request);
  }

  @RequestMapping(value = "/user/loginOauth")
  public UserResponse loginOauth(UserLoginOatuthRequest request) {
    return userHandler.loginOauth(request);
  }

  @RequestMapping(value = "/user/registerOauth")
  public UserResponse registerOauth(UserRegisterOatuthRequest request) {
    return userHandler.registerOauth(request);
  }

  @RequestMapping(value = "/user/registerByCode")
  public UserResponse registerByCode(UserRegisterCodeRequest request) {
    return userHandler.registerByCode(request);
  }


  @RequestMapping(value = "/user/resetPassword")
  public UserResponse resetPassword(UserResetPasswordRequestion request) {
    return userHandler.resetPassword(request);
  }


  @RequestMapping(value = "/user/changePhone")
  public ResponseObject changePhone(UserChangePhoneRequestion request) {
    return userHandler.changePhone(request);
  }

  @RequestMapping(value = "/user/changePassword")
  public ResponseObject changePassword(UserChangePasswordRequestion request) {
    return userHandler.changePassword(request);
  }


  @RequestMapping(value = "/user/update")
  public ResponseObject update(UserUpdateRequestion request) {
    return userHandler.update(request);
  }


  @RequestMapping(value = "/user/checkPhoneCode")
  public ResponseObject checkPhoneCode(CheckPhoneCodeRequest request) {
    return userHandler.checkPhoneCode(request);
  }


  @RequestMapping(value = "/user/loginoauthok")
  public UserResponse loginOauthOk(UserLoginOatuthRequest request) {
    return userHandler.loginOauthOk(request);
  }

  @Autowired
  UserHandler userHandler;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy