Browse Source

项目接口-推广码每日统计 接口 无分页bug修复

lifa 1 year ago
parent
commit
122427bff3
1 changed files with 17 additions and 0 deletions
  1. 17 0
      src/platform/ZhonTai.Admin/Services/DiTuiAPI/ProjectsService.cs

+ 17 - 0
src/platform/ZhonTai.Admin/Services/DiTuiAPI/ProjectsService.cs

@@ -616,9 +616,26 @@ namespace ZhonTai.Admin.Services.DiTuiAPI
             //    QrcodeUrl = m.QrcodeUrl,
             //    QueryUrl = m.QueryUrl
             //});
+            //ProjectLinkEntity
+            var projectLink = await _ProjectLinkRepository.Select.DisableGlobalFilter(FilterNames.Tenant)
+                .Where(a => a.Id == Id)
+                .FirstAsync();
+
+            var listDate = await _projectStatRepository.Select.DisableGlobalFilter(FilterNames.Tenant)
+                .Where(a => a.ProjectId == projectLink.ProjectId && a.Num == projectLink.Num && a.IsSettle == 1)
+                .GroupBy(a => a.EffectDateNum)
+                .Page(input.CurrentPage, input.PageSize)
+                .ToListAsync(a => a.Key); 
+
+            //var result2 = _projectStatRepository.Select.DisableGlobalFilter(FilterNames.Tenant)
+                      
+
+
+
             List<StatOutput> result = await _projectStatRepository.Select.DisableGlobalFilter(FilterNames.Tenant).From<ProjectLinkEntity>((s, l) => s
                 .InnerJoin(a => a.Num == l.Num && a.ProjectId == l.ProjectId))
                 .Where((a, b) => b.Id == Id && a.IsSettle == 1)
+                .WhereIf(listDate is not null, (a,b) => listDate.Contains(a.EffectDateNum))
                 .ToListAsync((a, b) => new StatOutput
                 {
                     Num = a.Num,