Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
浙江兰德纵横网络技术股份有限公司
o2oa
提交
f2403dac
o2oa
项目概览
浙江兰德纵横网络技术股份有限公司
/
o2oa
通知
339
Star
10
Fork
6
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f2403dac
编写于
9月 29, 2022
作者:
楼
楼国栋
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'hotfix/qywx_sync' into 'master'
企业微信新版api无法同步用户的bug,暂时填充userid到手机号码字段 See merge request o2oa/o2oa!1105
上级
afd4edda
b108b973
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
1 deletion
+19
-1
o2server/x_program_center/src/main/java/com/x/program/center/qiyeweixin/QiyeweixinFactory.java
...va/com/x/program/center/qiyeweixin/QiyeweixinFactory.java
+19
-1
未找到文件。
o2server/x_program_center/src/main/java/com/x/program/center/qiyeweixin/QiyeweixinFactory.java
浏览文件 @
f2403dac
...
...
@@ -12,6 +12,7 @@ import com.x.base.core.project.gson.GsonPropertyObject;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.tools.ListTools
;
import
org.apache.commons.lang3.StringUtils
;
public
class
QiyeweixinFactory
{
...
...
@@ -59,7 +60,24 @@ public class QiyeweixinFactory {
if
(
resp
.
getErrcode
()
!=
0
)
{
throw
new
ExceptionListUser
(
resp
.
getErrcode
(),
resp
.
getErrmsg
());
}
return
resp
.
getUserlist
();
// @Date 2022-09-29 因为企业微信api权限调整,无法读取用户手机号码,这里开始填充一个假的值
List
<
User
>
userList
=
resp
.
getUserlist
();
if
(
userList
!=
null
&&
!
userList
.
isEmpty
())
{
return
userList
.
stream
().
peek
(
this
::
setDefaultMobileStr
).
collect
(
Collectors
.
toList
());
}
return
userList
;
}
private
void
setDefaultMobileStr
(
User
user
)
{
if
(
user
!=
null
&&
StringUtils
.
isNotEmpty
(
user
.
getUserid
())
&&
StringUtils
.
isEmpty
(
user
.
getMobile
()))
{
String
userId
=
user
.
getUserid
();
if
(
userId
.
length
()
<
11
)
{
userId
=
String
.
format
(
"%11s"
,
userId
).
replace
(
" "
,
"0"
);
}
logger
.
debug
(
"这里是补全11位,{}."
,
userId
);
user
.
setMobile
(
userId
);
}
}
public
List
<
User
>
listUser
(
Department
org
)
throws
Exception
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录