|
@@ -4,7 +4,6 @@ import com.mooctest.crowd.domain.exception.*;
|
|
|
import com.mooctest.crowd.site.annotation.LoginRequired;
|
|
|
import com.mooctest.crowd.site.annotation.SysAdminRequired;
|
|
|
import com.mooctest.crowd.site.anticorruption.impl.data.UserCommon;
|
|
|
-import com.mooctest.crowd.site.anticorruption.impl.data.UserInfo;
|
|
|
import com.mooctest.crowd.site.command.*;
|
|
|
import com.mooctest.crowd.site.data.dto.UserDTO;
|
|
|
import com.mooctest.crowd.site.data.response.ResponseVO;
|
|
@@ -83,16 +82,40 @@ public class UserController extends BaseController {
|
|
|
* 获取邮箱验证码
|
|
|
*/
|
|
|
@RequestMapping(value = "/verify/email", method = RequestMethod.PUT)
|
|
|
- public ResponseVO<Boolean> verifyMail(@RequestBody UserInfo userInfo) {
|
|
|
- return new ResponseVO<>(ServerCode.SUCCESS, userService.verifyMail(userInfo.getEmail()));
|
|
|
+ public ResponseVO<Object> verifyMail(@RequestBody ModifyCommand modifyCommand, HttpServletRequest request) throws InvocationTargetException, IllegalAccessException {
|
|
|
+ return userService.verifyMail(modifyCommand, request);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 绑定邮箱
|
|
|
*/
|
|
|
@RequestMapping(value = "/user/email", method = RequestMethod.PUT)
|
|
|
- public ResponseVO<UserCommon> updateEmail(@RequestBody ModifyEmailCommand modifyEmailCommand, HttpServletRequest request) throws InvocationTargetException, IllegalAccessException {
|
|
|
- return new ResponseVO<>(ServerCode.SUCCESS, userService.updateEmail(modifyEmailCommand, request));
|
|
|
+ public ResponseVO<Object> updateEmail(@RequestBody ModifyCommand modifyCommand, HttpServletRequest request) throws InvocationTargetException, IllegalAccessException {
|
|
|
+ return userService.updateEmail(modifyCommand, request);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取手机验证码(新旧手机号)
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/verify/mobile", method = RequestMethod.PUT)
|
|
|
+ public ResponseVO<Object> verifyMobile(@RequestBody ModifyCommand mobileCommand, HttpServletRequest request) throws InvocationTargetException, IllegalAccessException {
|
|
|
+ return userService.getVerifyMobileCode(mobileCommand, request);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 验证旧手机验证码
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/verify/old/mobile", method = RequestMethod.PUT)
|
|
|
+ public ResponseVO<Object> verifyOldMobile(@RequestBody ModifyCommand mobileCommand, HttpServletRequest request) throws InvocationTargetException, IllegalAccessException {
|
|
|
+ return userService.verifyOldMobile(mobileCommand, request);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改手机号
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/user/mobile", method = RequestMethod.PUT)
|
|
|
+ public ResponseVO<Object> updateMobile(@RequestBody ModifyCommand mobileCommand, HttpServletRequest request) throws InvocationTargetException, IllegalAccessException {
|
|
|
+ return userService.updateMobile(mobileCommand, request);
|
|
|
}
|
|
|
|
|
|
/**
|