Commit 76faa63f authored by 钱坤's avatar 钱坤

企微user信息的IsLeader空指针问题

parent 6a216e2f
......@@ -545,6 +545,10 @@ public class OrgSyncByWxcpJob {
for (WxCpDepart wxCpDepart : wxCpDepartList) {
try {
List<WxCpUser> wxCpUsers = cpService.getUserService().listByDepartment(wxCpDepart.getId(), Boolean.FALSE, 0);
if (wxCpUsers == null) {
wxCpUsers = new ArrayList<>();
}
wxCpUsers.stream().filter(p -> p.getIsLeader() == null).forEach(p -> p.setIsLeader(0));
WxCpDepartDto wxCpDepartDto = new WxCpDepartDto();
BeanUtil.copyProperties(wxCpDepart, wxCpDepartDto, true);
wxCpDepartDto.setWxCpUserList(wxCpUsers);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment