小程序获取手机号接口
This commit is contained in:
parent
d7ba3068f4
commit
0e5b2ecfb6
|
|
@ -37,7 +37,12 @@ public class UserAuthorizationController {
|
|||
return CzgResult.success(userAuthorizationService.login(userAuthorizationLoginDTO));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
/**
|
||||
* 获取手机号
|
||||
* @param getPhoneDTO 获取手机号信息
|
||||
* @return 手机号
|
||||
*/
|
||||
@PostMapping("/phone")
|
||||
public CzgResult<String> getPhone(@RequestBody @Validated GetPhoneDTO getPhoneDTO) {
|
||||
return CzgResult.success(userAuthorizationService.getPhone(getPhoneDTO));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.czg.account.dto.auth;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
|
@ -10,8 +11,19 @@ public class GetPhoneDTO {
|
|||
/**
|
||||
* 来源 alipay支付宝 wechat微信
|
||||
*/
|
||||
@NotBlank(message = "来源不能为空")
|
||||
private String source;
|
||||
/**
|
||||
* 数据
|
||||
*/
|
||||
@NotBlank(message = "数据不能为空")
|
||||
private String encryptedData;
|
||||
/**
|
||||
* 获取到的凭证code
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 仅微信传递
|
||||
*/
|
||||
private String iv;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue