Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
3d52be8c
Commit
3d52be8c
authored
Aug 17, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通讯录
parent
7a9c1a3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
26 deletions
+27
-26
QywxDeptSyncOperation.java
...gic/haoban/manage/service/task/QywxDeptSyncOperation.java
+27
-26
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/QywxDeptSyncOperation.java
View file @
3d52be8c
...
...
@@ -151,33 +151,34 @@ public class QywxDeptSyncOperation implements BaseSyncOperation {
}
private
void
getStaff
(
String
taskId
,
String
dataId
,
String
enterpriseId
,
String
wxEnterpriseId
,
SecretSettingDTO
secretSetting
,
WxEnterpriseQwDTO
qwDTO
)
{
List
<
UserDTO
>
list
=
null
;
if
(
qwDTO
.
getWxSecurityType
()==
4
)
{
list
=
this
.
qywxUserApiService
.
listDepartmentUser
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
dataId
,
0
)
;
logger
.
info
(
"从(第三方)获取通讯录={}"
,
JSON
.
toJSONString
(
list
))
;
}
else
{
list
=
this
.
qywxUserApiService
.
listSelfDepartmentUser
(
qwDTO
.
getDkCorpid
(),
secretSetting
.
getSecretVal
(),
dataId
,
0
,
qwDTO
.
getUrlHost
());
logger
.
info
(
"从(代开)获取通讯录={}"
,
JSON
.
toJSONString
(
list
))
;
}
if
(
null
==
list
)
{
logger
.
info
(
"微信获取部门成员异常:{},{}"
,
taskId
,
dataId
);
return
;
if
(
"1"
.
equals
(
dataId
))
{
List
<
UserDTO
>
list
=
null
;
if
(
qwDTO
.
getWxSecurityType
()==
4
)
{
list
=
this
.
qywxUserApiService
.
listDepartmentUser
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
dataId
,
1
)
;
logger
.
info
(
"从(第三方)获取通讯录={}"
,
JSON
.
toJSONString
(
list
))
;
}
else
{
list
=
this
.
qywxUserApiService
.
listSelfDepartmentUser
(
qwDTO
.
getDkCorpid
(),
secretSetting
.
getSecretVal
(),
dataId
,
1
,
qwDTO
.
getUrlHost
());
logger
.
info
(
"从(代开)获取通讯录={}"
,
JSON
.
toJSONString
(
list
))
;
}
if
(
null
==
list
)
{
logger
.
info
(
"微信获取部门成员异常:{},{}"
,
taskId
,
dataId
);
return
;
}
logger
.
info
(
"拉取成员数={},taskId={}"
,
list
.
size
(),
taskId
);
List
<
TabHaobanPreDealLog
>
preDealLogList
=
list
.
stream
().
map
(
userDTO
->
{
TabHaobanPreDealLog
dealLog
=
new
TabHaobanPreDealLog
();
dealLog
.
setDataId
(
userDTO
.
getUserid
());
dealLog
.
setpDataId
(
dataId
);
dealLog
.
setDataType
(
PreDealTypeEnum
.
clerk
.
getVal
());
dealLog
.
setStatusFlag
(
0
);
dealLog
.
setDataContent
(
EmojiFilterUtil
.
removeAllEmoji
(
userDTO
.
getName
()));
dealLog
.
setTaskId
(
taskId
);
dealLog
.
setWxEnterpriseId
(
wxEnterpriseId
);
dealLog
.
setEnterpriseId
(
enterpriseId
);
return
dealLog
;
}).
collect
(
Collectors
.
toList
());
this
.
preDealService
.
insert
(
preDealLogList
);
}
logger
.
info
(
"拉取成员数={},部门={}"
,
list
.
size
(),
dataId
);
//List<String> dataList = preDealService.listDataIdByTaskIdAndDataType(taskId, PreDealTypeEnum.clerk.getVal());
List
<
TabHaobanPreDealLog
>
preDealLogList
=
list
.
stream
().
map
(
userDTO
->
{
TabHaobanPreDealLog
dealLog
=
new
TabHaobanPreDealLog
();
dealLog
.
setDataId
(
userDTO
.
getUserid
());
dealLog
.
setpDataId
(
dataId
);
dealLog
.
setDataType
(
PreDealTypeEnum
.
clerk
.
getVal
());
dealLog
.
setStatusFlag
(
0
);
dealLog
.
setDataContent
(
EmojiFilterUtil
.
removeAllEmoji
(
userDTO
.
getName
()));
dealLog
.
setTaskId
(
taskId
);
dealLog
.
setWxEnterpriseId
(
wxEnterpriseId
);
dealLog
.
setEnterpriseId
(
enterpriseId
);
return
dealLog
;
}).
collect
(
Collectors
.
toList
());
this
.
preDealService
.
insert
(
preDealLogList
);
}
@Override
public
void
dealSuccess
(
String
taskId
,
String
dataId
,
String
enterpriseId
,
String
wxEnterpriseId
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment