Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhaomeijing
2022-06-15 10:04:24 +08:00
@@ -211,7 +211,7 @@ public class SyncDataServiceImpl implements ISyncDataService{
if (!localUserMap.containsKey(ppEmployee.getId())) { if (!localUserMap.containsKey(ppEmployee.getId())) {
//删除数据库中与该账户相同的数据 //删除数据库中与该账户相同的数据
if(StringUtils.isNotBlank(ppEmployee.getId())) { if(StringUtils.isNotBlank(ppEmployee.getId())) {
sysUserService.removeById(ppEmployee.getId()); // sysUserService.removeById(ppEmployee.getId()); // 这个为什么是逻辑删除
log.info("需要新增的用户信息为:" + JSONObject.toJSONString(ppEmployee)); log.info("需要新增的用户信息为:" + JSONObject.toJSONString(ppEmployee));
SysUser newUser = sysUserService.addPPUserInfo(ppEmployee); SysUser newUser = sysUserService.addPPUserInfo(ppEmployee);
localUserMap.put(ppEmployee.getId(), newUser); localUserMap.put(ppEmployee.getId(), newUser);
@@ -260,16 +260,16 @@ public class SyncDataServiceImpl implements ISyncDataService{
} }
List<PPEmployee> userEmailInfoList = JSONObject.parseArray(user.get("people_contact_email").toString(), PPEmployee.class); List<PPEmployee> userEmailInfoList = JSONObject.parseArray(user.get("people_contact_email").toString(), PPEmployee.class);
if (CollectionUtil.isNotEmpty(userEmailInfoList)) { if (CollectionUtil.isNotEmpty(userEmailInfoList)) {
PPEmployee userEmailInfo = userEmailInfoList.stream().filter(e->"WORK".equals(e.getEmail_type())).collect(Collectors.toList()).get(0); List<PPEmployee> userEmailInfo = userEmailInfoList.stream().filter(e->"WORK".equals(e.getEmail_type())).collect(Collectors.toList());
if (ObjectUtil.isNotEmpty(userEmailInfo)) { if (CollectionUtil.isNotEmpty(userEmailInfo)) {
userMainInfo.setEmail_address(userEmailInfo.getEmail_address()); userMainInfo.setEmail_address(userEmailInfo.get(0).getEmail_address());
} }
} }
List<PPEmployee> userPhoneInfoList = JSONObject.parseArray(user.get("people_contact_phone").toString(), PPEmployee.class); List<PPEmployee> userPhoneInfoList = JSONObject.parseArray(user.get("people_contact_phone").toString(), PPEmployee.class);
if (CollectionUtil.isNotEmpty(userPhoneInfoList)) { if (CollectionUtil.isNotEmpty(userPhoneInfoList)) {
PPEmployee userPhoneInfo = userPhoneInfoList.stream().filter(e->"WORK".equals(e.getPhone_type()) && "Mobile".equals(e.getPhone_device_type())).collect(Collectors.toList()).get(0); List<PPEmployee> userPhoneInfo = userPhoneInfoList.stream().filter(e->"WORK".equals(e.getPhone_type()) && "Mobile".equals(e.getPhone_device_type())).collect(Collectors.toList());
if (ObjectUtil.isNotEmpty(userPhoneInfo)) { if (CollectionUtil.isNotEmpty(userPhoneInfo)) {
userMainInfo.setFormatted_phone_number(userPhoneInfo.getFormatted_phone_number()); userMainInfo.setFormatted_phone_number(userPhoneInfo.get(0).getFormatted_phone_number());
} }
} }