|
@@ -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;
|
|
|
}
|