Commit b556ba6b authored by 吴春's avatar 吴春

通天塔

parent ca62430b
......@@ -794,7 +794,7 @@ SELECT 0 as Total,0 as MemberNum, 0 as GoodsNum,0 as OrderNum,
/// <returns></returns>
public List<RB_Goods_Order_Extend> GetWeeklyOrder(DataStatistics_Query dmodel)
{
string where = $" where 1=1 and a.OrderStatus in(2,3,4,6,5)";
string where = $" where 1=1 and (a.OrderStatus in(2,3,4,6,5) or( a.{nameof(RB_Goods_Order.OrderStatus)}=7 and a.{nameof(RB_Goods_Order.PaymentTime)} is not NULL))";
string payMemerNumWhere = "";
string orderTypeWhere = "";
string sql = "";
......@@ -832,7 +832,8 @@ from (SELECT DATE_FORMAT(a.CreateDate,'%Y-%m-%d' )as CreateDate,b.GoodsTotalNum,
LEFT JOIN (SELECT OrderId,SUM(Number)as GoodsTotalNum from rb_goods_orderdetail where 1=1 {orderTypeWhere} GROUP BY OrderId)as b on a.OrderId=b.OrderId
LEFT JOIN (SELECT COUNT(DISTINCT UserId) as PayMemerNum, DATE_FORMAT(CreateDate,'%Y-%m-%d' ) as CreateDate from rb_goods_order where 1=1 {payMemerNumWhere} GROUP BY DATE_FORMAT(CreateDate,'%Y-%m-%d' ))
as c on c.CreateDate=DATE_FORMAT(a.CreateDate,'%Y-%m-%d' ) {where} )
as t GROUP BY t.CreateDate desc ";
as t GROUP BY t.CreateDate desc";
return Get<RB_Goods_Order_Extend>(sql).ToList();
}
......@@ -945,8 +946,8 @@ LEFT JOIN rb_member_user as c on b.UserId=c.Id
}
else if (dmodel.OrderStatus == 3)
{
where += $@" and a.{nameof(RB_Goods_Order.OrderStatus)}=7";
payMemerNumWhere += $@" and {nameof(RB_Goods_Order.OrderStatus)}=7";
where += $@" and a.{nameof(RB_Goods_Order.OrderStatus)}=7 and a.{nameof(RB_Goods_Order.PaymentTime)} is not NULL";
payMemerNumWhere += $@" and {nameof(RB_Goods_Order.OrderStatus)}=7 and a.{nameof(RB_Goods_Order.PaymentTime)} is not NULL";
}
else if (dmodel.OrderStatus == 4)//后面做因为现在还没有售后表
{
......
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