/// <summary> /// 某个 trace 除了某个 guid 外,还存不存在其他的 guid /// </summary> /// <param name="traceId"></param> /// <param name="guid"></param> /// <param name="happenTime"></param> /// <returns></returns> public async Task <(bool, bool)> GetTracePageExist(string traceId, string pageId, string guid, DateTime happenTime) { bool traceExists, pageExists; var trace = await traceRepository.FindByTraceId(traceId, happenTime); //traceExists = trace?.Items.Any(x => x.Guid != guid) ?? false;//trace 为空可能是没来得及写入 traceExists = trace != null; var page = await pageRepository.FindByPageId(pageId, happenTime); //pageExists = page?.Items.Any(x => x.TraceId != traceId) ?? false;//page 为空可能是没来得及写入 pageExists = page != null; return(traceExists, pageExists); }