- 优化:代码过长
This commit is contained in:
parent
0c987989fd
commit
ac86ca2a13
@ -37,8 +37,10 @@ public class UsersOAuth2Controller {
|
|||||||
|
|
||||||
@PostMapping("/mobile_code_authenticate")
|
@PostMapping("/mobile_code_authenticate")
|
||||||
@ApiOperation("手机验证码认证")
|
@ApiOperation("手机验证码认证")
|
||||||
public CommonResult<UsersOAuth2AuthenticateResponse> mobileCodeAuthenticate(UsersOAuth2MobileCodeAuthenticateRequest request,
|
public CommonResult<UsersOAuth2AuthenticateResponse> mobileCodeAuthenticate(
|
||||||
HttpServletRequest httpRequest) {
|
UsersOAuth2MobileCodeAuthenticateRequest request,
|
||||||
|
HttpServletRequest httpRequest
|
||||||
|
) {
|
||||||
// 执行认证
|
// 执行认证
|
||||||
OAuth2MobileCodeAuthenticateDTO authenticateDTO = UsersOAuth2Convert.INSTANCE.convert(request)
|
OAuth2MobileCodeAuthenticateDTO authenticateDTO = UsersOAuth2Convert.INSTANCE.convert(request)
|
||||||
.setIp(HttpUtil.getIp(httpRequest));
|
.setIp(HttpUtil.getIp(httpRequest));
|
||||||
@ -52,8 +54,7 @@ public class UsersOAuth2Controller {
|
|||||||
@PostMapping("/send_mobile_code")
|
@PostMapping("/send_mobile_code")
|
||||||
@ApiOperation("发送手机验证码")
|
@ApiOperation("发送手机验证码")
|
||||||
@ApiImplicitParam(name = "mobile", value = "手机号", required = true, example = "15601691234")
|
@ApiImplicitParam(name = "mobile", value = "手机号", required = true, example = "15601691234")
|
||||||
public CommonResult<Boolean> sendMobileCode(@RequestParam("mobile") String mobile,
|
public CommonResult<Boolean> sendMobileCode(@RequestParam("mobile") String mobile, HttpServletRequest request) {
|
||||||
HttpServletRequest request) {
|
|
||||||
// 执行发送验证码
|
// 执行发送验证码
|
||||||
OAuth2MobileCodeSendDTO sendDTO = new OAuth2MobileCodeSendDTO()
|
OAuth2MobileCodeSendDTO sendDTO = new OAuth2MobileCodeSendDTO()
|
||||||
.setMobile(mobile).setIp(HttpUtil.getIp(request));
|
.setMobile(mobile).setIp(HttpUtil.getIp(request));
|
||||||
|
Loading…
Reference in New Issue
Block a user