Commit b3481104 authored by liudong1993's avatar liudong1993

1

parent 55d362d5
...@@ -321,6 +321,7 @@ where {where} order by di.CreateDate desc"; ...@@ -321,6 +321,7 @@ where {where} order by di.CreateDate desc";
if (dmodel.TenantId > 0) if (dmodel.TenantId > 0)
{ {
where += $@" and di.{nameof(RB_Distributor_Info.TenantId)}={dmodel.TenantId}"; where += $@" and di.{nameof(RB_Distributor_Info.TenantId)}={dmodel.TenantId}";
where += $@" and mu.{nameof(RB_Distributor_Info.TenantId)}={dmodel.TenantId}";
} }
if (dmodel.MallBaseId > 0) if (dmodel.MallBaseId > 0)
{ {
...@@ -362,6 +363,7 @@ where {where} order by di.CreateDate desc"; ...@@ -362,6 +363,7 @@ where {where} order by di.CreateDate desc";
if (dmodel.TenantId > 0) if (dmodel.TenantId > 0)
{ {
where += $@" and di.{nameof(RB_Distributor_Info.TenantId)}={dmodel.TenantId}"; where += $@" and di.{nameof(RB_Distributor_Info.TenantId)}={dmodel.TenantId}";
where += $@" and mu.{nameof(RB_Distributor_Info.TenantId)}={dmodel.TenantId}";
} }
if (dmodel.MallBaseId > 0) if (dmodel.MallBaseId > 0)
{ {
......
...@@ -1705,7 +1705,9 @@ FROM RB_Member_User AS a LEFT JOIN rb_miai_baseinfo AS b ON a.Id = b.UserId) as ...@@ -1705,7 +1705,9 @@ FROM RB_Member_User AS a LEFT JOIN rb_miai_baseinfo AS b ON a.Id = b.UserId) as
/// <returns></returns> /// <returns></returns>
public int GetMemberUserTotalNumForDay(int tenantId, int mallBaseId, string startTime) public int GetMemberUserTotalNumForDay(int tenantId, int mallBaseId, string startTime)
{ {
string sql = $" select count(0) as count from RB_Member_User where TenantId={tenantId} and MallBaseId={mallBaseId} and CreateDate <='{startTime} 23:59:59'"; string sql = $@" select count(0) as count from RB_Member_User u
inner join rb_distributor_info d on u.Id = d.UserId
where u.TenantId={tenantId} and u.MallBaseId={mallBaseId} and d.TenantId={tenantId} and d.AuditStatus =2 and u.CreateDate <='{startTime} 23:59:59'";
var obj = ExecuteScalar(sql); var obj = ExecuteScalar(sql);
return obj == null ? 0 : Convert.ToInt32(obj); return obj == null ? 0 : Convert.ToInt32(obj);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment