|
@@ -171,6 +171,10 @@ public class UserGatewayImpl implements UserGateway {
|
|
|
String accessToken = wxOfficeAccountClient.fetchAccessToken();
|
|
|
//获取用户手机号
|
|
|
String phone = getUserPhone(params.getCode(), accessToken);
|
|
|
+ log.info("Retrieved phone:{}", phone);
|
|
|
+ if (phone == null){
|
|
|
+ throw new BizException(ErrorEnum.PHONE_IS_NULL.getErrorCode(), ErrorEnum.PHONE_IS_NULL.getErrorMessage());
|
|
|
+ }
|
|
|
// 未注册的手机号直接注册用户
|
|
|
userInfo = new UserInfo();
|
|
|
userInfo.setOpenid(params.getOpenId());
|