Эх сурвалжийг харах

根据审核订单获取审核短信

qinchaoyue 4 сар өмнө
parent
commit
2b23dc22b3

+ 3 - 2
src/Hotline.Application/Snapshot/RedPackApplication.cs

@@ -89,9 +89,10 @@ public class RedPackApplication : IRedPackApplication, IScopeDependency
         var items = await _snapshotSMSTemplateRepository.Queryable(includeDeleted: true)
             .LeftJoin<Industry>((sms, industry) => sms.IndustryId == industry.Id)
             .LeftJoin<OrderSnapshot>((sms, industry, snapshot) => snapshot.IndustryId == industry.Id)
-            .Where((sms, industry, snapshot) => 
-            snapshot.Id == dto.OrderId && sms.Status == dto.Status && sms.IsEnable == true)
+            .Where((sms, industry, snapshot) => (sms.IsPublic == true || sms.IndustryId == snapshot.IndustryId) 
+             && sms.Status == dto.Status && sms.IsEnable == true)
             .Select<GetRedPackAuditSMSTemplateOutDto>()
+            .Distinct()
             .ToListAsync();
         return items;
     }