Commit f58f2dc9 authored by 黄奎's avatar 黄奎

首页统计修改

parent 629cfa00
...@@ -293,7 +293,17 @@ GROUP BY A.GoodsId,A.GoodsName) as a ORDER BY a.{query.OrderBy} LIMIT 100 "); ...@@ -293,7 +293,17 @@ GROUP BY A.GoodsId,A.GoodsName) as a ORDER BY a.{query.OrderBy} LIMIT 100 ");
{ {
query.OrderBy = "Income desc"; query.OrderBy = "Income desc";
} }
List<MallSalesUserTop> list = new List<MallSalesUserTop>(); // builder.AppendFormat($@"
//SELECT *
//FROM
// (
// SELECT C.`Name` AS UserName,C.Photo,COUNT(1) SaleCount,SUM(A.Final_Price) AS Income
// FROM rb_goods_orderdetail AS A LEFT JOIN rb_goods_order AS B ON A.OrderId=B.OrderId
// LEFT JOIN rb_member_user AS C ON B.UserId=C.Id
// WHERE 1=1 AND A.GoodsId>0 {where}
// GROUP BY B.UserId,C.`Name`
// ) as t ORDER BY t.{query.OrderBy} LIMIT 100");
builder.AppendFormat($@" builder.AppendFormat($@"
SELECT * SELECT *
FROM FROM
...@@ -305,9 +315,7 @@ FROM ...@@ -305,9 +315,7 @@ FROM
WHERE 1=1 AND A.GoodsId>0 {where} WHERE 1=1 AND A.GoodsId>0 {where}
GROUP BY oc.UserId,C.`Name` GROUP BY oc.UserId,C.`Name`
) as t ORDER BY t.{query.OrderBy} LIMIT 100"); ) as t ORDER BY t.{query.OrderBy} LIMIT 100");
var list = Get<MallSalesUserTop>(builder.ToString()).ToList();
list = Get<MallSalesUserTop>(builder.ToString()).ToList();
if (list != null && list.Count > 0) if (list != null && list.Count > 0)
{ {
int index = 1; int index = 1;
......
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