Commit d8805ff1 by fudahua

同步优化初步3

parent 6223d011
......@@ -161,6 +161,8 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
* @param addList
*/
private void dealAddSync(String taskId, String wxEnterpriseId, List<SyncSingleDealDTO> addList) {
Map<String, String> pMap = addList.stream().collect(Collectors.toMap(SyncSingleDealDTO::getRelatedId, SyncSingleDealDTO::getParentDepartmentId));
//获取企业与分组map
Map<String, List<String>> eidListMap = addList.stream().filter(dto -> {
String departmentId = dto.getDepartmentId();
......@@ -183,7 +185,11 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
List<TabHaobanPreDealLog> dealList = groupDTOList.stream().map(storeGroupDTO -> {
TabHaobanPreDealLog dealLog = new TabHaobanPreDealLog();
dealLog.setDataId(storeGroupDTO.getStoreGroupId());
dealLog.setpDataId(storeGroupDTO.getParentGroupId());
if (pMap.containsKey(storeGroupDTO.getStoreGroupId())) {
dealLog.setpDataId(pMap.get(storeGroupDTO.getStoreGroupId()));
} else {
dealLog.setpDataId(storeGroupDTO.getParentGroupId());
}
dealLog.setDataType(PreDealTypeEnum.group.getVal());
dealLog.setStatusFlag(0);
dealLog.setTaskId(taskId);
......
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