|
|
@ -1188,6 +1188,8 @@ public class WhiteController extends CoreBaseController {
|
|
|
|
ResultBean result = getDingUserIdByPhoneNumber(el, batchSendOTOHeaders.xAcsDingtalkAccessToken);
|
|
|
|
ResultBean result = getDingUserIdByPhoneNumber(el, batchSendOTOHeaders.xAcsDingtalkAccessToken);
|
|
|
|
if (result.isSuccess()) {
|
|
|
|
if (result.isSuccess()) {
|
|
|
|
userIdList.add((String) result.getResultObject());
|
|
|
|
userIdList.add((String) result.getResultObject());
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
LOGGER.info("手机号:{}没法获取的钉钉用户id",el);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -1263,9 +1265,15 @@ public class WhiteController extends CoreBaseController {
|
|
|
|
req.setMobile(phoneNumber);
|
|
|
|
req.setMobile(phoneNumber);
|
|
|
|
// req.setMobile("13298408382");
|
|
|
|
// req.setMobile("13298408382");
|
|
|
|
OapiV2UserGetbymobileResponse rsp = client.execute(req, accessToken);
|
|
|
|
OapiV2UserGetbymobileResponse rsp = client.execute(req, accessToken);
|
|
|
|
|
|
|
|
if (ObjectUtils.isEmpty(rsp)||ObjectUtils.isEmpty(rsp.getResult()) || StringUtils.isBlank(rsp.getResult().getUserid())){
|
|
|
|
|
|
|
|
return ResultBean.fail("根据手机号无法获取用户id");
|
|
|
|
|
|
|
|
}
|
|
|
|
return ResultBean.success("获取用户id成功").setResultObject(rsp.getResult().getUserid());
|
|
|
|
return ResultBean.success("获取用户id成功").setResultObject(rsp.getResult().getUserid());
|
|
|
|
} catch (ApiException e) {
|
|
|
|
} catch (ApiException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
LOGGER.error("调用钉钉根据手机号获取用户id发生异常:",e);
|
|
|
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
LOGGER.error("调用钉钉根据手机号获取用户id发生异常:",e);
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|