Commit 37f02009 by fudahua

同步优化初步3

parent 2dfec65b
......@@ -221,7 +221,12 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
*/
private void dealDepartmentInit(String taskId, String wxEnterpriseId, List<SyncSingleDealDTO> addList) {
Set<String> addListMid = addList.stream().filter(dto -> dto.getStoreFlag().equals(0)).map(dto -> dto.getRelatedId()).collect(Collectors.toSet());
dealDepartmentToMq(taskId, addListMid, SyncTaskStatusEnum.group_sync);
if (CollectionUtils.isNotEmpty(addListMid)) {
dealDepartmentToMq(taskId, addListMid, SyncTaskStatusEnum.group_sync);
} else {
addListMid = addList.stream().filter(dto -> dto.getStoreFlag().equals(1)).map(dto -> dto.getRelatedId()).collect(Collectors.toSet());
dealDepartmentToMq(taskId, addListMid, SyncTaskStatusEnum.store_sync);
}
}
/**
......
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