|
|
|
@ -6,6 +6,7 @@ import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo; |
|
|
|
import cn.binarywang.wx.miniapp.bean.WxMaUserInfo; |
|
|
|
import cn.binarywang.wx.miniapp.util.crypt.WxMaCryptUtils; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import cn.hutool.json.JSONUtil; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.elink.esua.epdc.async.GroupTask; |
|
|
|
import com.elink.esua.epdc.async.PartyGroupTask; |
|
|
|
@ -1459,6 +1460,7 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<String> getUserWxPhone(EpdcAppUserMaInfoFormDTO formDto) { |
|
|
|
log.info("获取用户手机号参数:"+JSONUtil.toJsonStr(formDto)); |
|
|
|
try { |
|
|
|
WxMaService wxMaService; |
|
|
|
if(StringUtils.isNotBlank(formDto.getType()) && "volunteer".equals(formDto.getType())){ |
|
|
|
@ -1467,7 +1469,9 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
wxMaService = wxMaServiceUtils.normalWxMaService(); |
|
|
|
} |
|
|
|
WxMaJscode2SessionResult wxMaJscode2SessionResult = wxMaService.jsCode2SessionInfo(formDto.getWxCode()); |
|
|
|
log.info("根据WxCode获取的SessionKey:{}" + wxMaJscode2SessionResult.getSessionKey()); |
|
|
|
WxMaPhoneNumberInfo phoneNoInfo = wxMaService.getUserService().getPhoneNoInfo(wxMaJscode2SessionResult.getSessionKey(), formDto.getEncryptedData(), formDto.getIv()); |
|
|
|
log.info("获取到的手机号信息:{}" + phoneNoInfo.getPurePhoneNumber()); |
|
|
|
if (null != phoneNoInfo) { |
|
|
|
return new Result().ok(phoneNoInfo.getPurePhoneNumber()); |
|
|
|
} |
|
|
|
|