Commit a666282d authored by 吴春's avatar 吴春

修改积分收支-积分支出为0

parent f827f4c9
...@@ -224,7 +224,7 @@ namespace Mall.Repository.User ...@@ -224,7 +224,7 @@ namespace Mall.Repository.User
string sql = @$" SELECT CreateDate,SUM(Income) as Income, SUM(Expend) as Expend from ( string sql = @$" SELECT CreateDate,SUM(Income) as Income, SUM(Expend) as Expend from (
select DATE_FORMAT(a.CreateDate, '%Y-%m-%d') as CreateDate, a.Integral as Income, 0 as Expend from {TableName} as a LEFT JOIN {MemberTableName} as b on a.UserId=b.Id where a.Type = 1 {builder.ToString()} select DATE_FORMAT(a.CreateDate, '%Y-%m-%d') as CreateDate, a.Integral as Income, 0 as Expend from {TableName} as a LEFT JOIN {MemberTableName} as b on a.UserId=b.Id where a.Type = 1 {builder.ToString()}
union all union all
select DATE_FORMAT(a.CreateDate, '%Y-%m-%d') as CreateDate, a.Integral as Income, 0 as Expend from {TableName} as a LEFT JOIN {MemberTableName} as b on a.UserId=b.Id where a.Type = 2 {builder.ToString()} select DATE_FORMAT(a.CreateDate, '%Y-%m-%d') as CreateDate, 0 as Income, a.Integral as Expend from {TableName} as a LEFT JOIN {MemberTableName} as b on a.UserId=b.Id where a.Type = 2 {builder.ToString()}
) as t GROUP BY CreateDate "; ) as t GROUP BY CreateDate ";
return GetPage<Integral_Query>(pageIndex, pageSize, out rowCount, sql).ToList(); return GetPage<Integral_Query>(pageIndex, pageSize, out rowCount, sql).ToList();
} }
......
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