|
|
@ -80,16 +80,15 @@ public class DataSyncUserAndOrgServiceImpl implements DataSyncUserAndOrgService |
|
|
|
for (UserData u : data) { |
|
|
|
CustomerStaffInfoDTOCache staffInfo = CustomerStaffRedis.getStaffInfoByMobile(customerId, u.getMobileTelephoneNumber()); |
|
|
|
DataSyncUserDataEntity entity = ConvertUtils.sourceToTarget(u, DataSyncUserDataEntity.class); |
|
|
|
entity.setOrganizationId(org.getOrganizationId()); |
|
|
|
entity.setCustomerId(customerId); |
|
|
|
entity.setRemark(""); |
|
|
|
if (null == staffInfo){ |
|
|
|
entity.setStatus(NumConstant.ZERO_STR); |
|
|
|
entity.setOrganizationId(""); |
|
|
|
entity.setStaffId(""); |
|
|
|
}else { |
|
|
|
CustomerStaffInfoCacheResult staffInfo1 = CustomerStaffRedis.getStaffInfo(customerId, staffInfo.getUserId()); |
|
|
|
entity.setStatus(NumConstant.ONE_STR); |
|
|
|
entity.setOrganizationId(null == staffInfo1 ? "" : staffInfo1.getAgencyId()); |
|
|
|
entity.setStaffId(staffInfo.getUserId()); |
|
|
|
} |
|
|
|
needInsert.add(entity); |
|
|
|