com.haoxuer.discover.user.controller.rest.UserRestController Maven / Gradle / Ivy
package com.haoxuer.discover.user.controller.rest;
import com.haoxuer.discover.rest.base.ResponseObject;
import com.haoxuer.discover.user.rest.api.UserHandler;
import com.haoxuer.discover.user.rest.domain.request.CheckPhoneCodeRequest;
import com.haoxuer.discover.user.rest.domain.request.SendCodeRequest;
import com.haoxuer.discover.user.rest.domain.request.UserChangePasswordRequest;
import com.haoxuer.discover.user.rest.domain.request.UserChangePhoneRequest;
import com.haoxuer.discover.user.rest.domain.request.UserLoginCodeRequest;
import com.haoxuer.discover.user.rest.domain.request.UserLoginOatuthRequest;
import com.haoxuer.discover.user.rest.domain.request.UserLoginRequest;
import com.haoxuer.discover.user.rest.domain.request.UserRegisterCodeRequest;
import com.haoxuer.discover.user.rest.domain.request.UserRegisterOatuthRequest;
import com.haoxuer.discover.user.rest.domain.request.UserResetPasswordRequest;
import com.haoxuer.discover.user.rest.domain.request.UserUpdateRequest;
import com.haoxuer.discover.user.rest.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(SendCodeRequest 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(UserResetPasswordRequest request) {
return userHandler.resetPassword(request);
}
@RequestMapping(value = "/user/changephone")
public ResponseObject changePhone(UserChangePhoneRequest request) {
return userHandler.changePhone(request);
}
@RequestMapping(value = "/user/changepassword")
public ResponseObject changePassword(UserChangePasswordRequest request) {
return userHandler.changePassword(request);
}
@RequestMapping(value = "/user/update")
public ResponseObject update(UserUpdateRequest 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