File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,11 +83,21 @@ public async Task<SystemUsageSummary> GetSystemUsageAsync(string accountName)
8383 {
8484 var databaseQuery = @"
8585 SELECT
86- HasCampaignCreated AS HasCampaingsCreated,
87- HasListCreated AS HasListsCreated,
88- HasCampaignSent AS HasCampaingsSent
89- FROM dbo.[User]
90- WHERE Email = @accountName" ;
86+ HasCampaignCreated,
87+ HasListCreated,
88+ HasCampaignSent,
89+ ISNULL(DomainInfo.HasDomainsReady, 0) AS HasDomainsReady
90+ FROM [User]
91+ OUTER APPLY (
92+ SELECT TOP 1 1 AS HasDomainsReady
93+ FROM DomainInformationXUser
94+ WHERE
95+ DomainInformationXUser.IdDomainStatus = 2 AND
96+ DomainInformationXUser.Active = 1 AND
97+ DomainInformationXUser.IdUser = [User].IdUser
98+ ) DomainInfo
99+ WHERE
100+ [User].Email = @accountName" ;
91101
92102 var results = await connection . QueryAsync < SystemUsageSummary > ( databaseQuery , new { accountName } ) ;
93103 var result = results . SingleOrDefault ( ) ;
Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ public class SystemUsageSummary
99 {
1010 public bool HasListsCreated { get ; set ; }
1111 public bool HasCampaingsCreated { get ; set ; }
12- ///// <summary>
13- ///// Has DKIM/SPF configuration completed and valid
14- ///// </summary>
15- // public bool HasDomainsReady { get; set; }
12+ /// <summary>
13+ /// Has DKIM/SPF configuration completed and valid
14+ /// </summary>
15+ public bool HasDomainsReady { get ; set ; }
1616 public bool HasCampaingsSent { get ; set ; }
1717 }
1818}
You can’t perform that action at this time.
0 commit comments