|
|
@ -12,6 +12,7 @@ import com.epmet.commons.tools.security.password.PasswordUtils; |
|
|
|
import com.epmet.commons.tools.utils.CpUserDetailRedis; |
|
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
|
import com.epmet.dto.UserDTO; |
|
|
|
import com.epmet.dto.UserWechatDTO; |
|
|
|
import com.epmet.dto.form.*; |
|
|
@ -135,6 +136,7 @@ public class LoginServiceImpl implements LoginService { |
|
|
|
public String getResiWxPhone(ResiWxPhoneFormDTO formDTO) { |
|
|
|
String phone=""; |
|
|
|
try { |
|
|
|
ValidatorUtils.validateEntity(formDTO, ResiWxPhoneFormDTO.AddUserInternalGroup.class); |
|
|
|
WxMaService wxMaService = wxMaServiceUtils.resiWxMaService(); |
|
|
|
WxMaJscode2SessionResult wxMaJscode2SessionResult = wxMaService.jsCode2SessionInfo(formDTO.getWxCode()); |
|
|
|
WxMaPhoneNumberInfo phoneNoInfo = wxMaService.getUserService().getPhoneNoInfo(wxMaJscode2SessionResult.getSessionKey(), |
|
|
@ -146,6 +148,9 @@ public class LoginServiceImpl implements LoginService { |
|
|
|
} catch (WxErrorException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
log.error(String.format("获取用户微信绑定的手机号接口异常")); |
|
|
|
} catch(Exception e){ |
|
|
|
e.printStackTrace(); |
|
|
|
log.error(String.format("获取用户微信绑定的手机号接口异常")); |
|
|
|
} |
|
|
|
return phone; |
|
|
|
} |
|
|
|