Commit 19e76bdf authored by 吴春's avatar 吴春

提交代码

parent 1370d875
......@@ -794,8 +794,10 @@ 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) or( a.{nameof(RB_Goods_Order.OrderStatus)}=7 and a.{nameof(RB_Goods_Order.PaymentTime)} is not NULL))";
string payMemerNumWhere = $" and (OrderStatus in(2,3,4,6,5) or( {nameof(RB_Goods_Order.OrderStatus)}=7 and {nameof(RB_Goods_Order.PaymentTime)} is not NULL)) ";
string where = "where 1=1 and (a.OrderStatus in(2,3,4,5,6) or (a.OrderStatus=7 and a.PaymentTime is not NULL and a.CancelTime is not NULL and DATE_FORMAT(a.PaymentTime,'%Y-%m-%d' )<DATE_FORMAT(a.CancelTime,'%Y-%m-%d' ) ) ) ";
// 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 = $" and (OrderStatus in(2,3,4,6,5) or( {nameof(RB_Goods_Order.OrderStatus)}=7 and {nameof(RB_Goods_Order.PaymentTime)} is not NULL)) ";
string payMemerNumWhere = " and (OrderStatus in(2,3,4,5,6) or (OrderStatus=7 and PaymentTime is not NULL and CancelTime is not NULL and DATE_FORMAT(PaymentTime,'%Y-%m-%d' )<DATE_FORMAT(CancelTime,'%Y-%m-%d' ) ) ) ";
string orderTypeWhere = "";
string sql = "";
if (dmodel.TenantId > 0)
......@@ -943,8 +945,8 @@ LEFT JOIN rb_member_user as c on b.UserId=c.Id
}
if (dmodel.OrderStatus == 1 || dmodel.OrderStatus == 0)
{
where += $" 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))";
payMemerNumWhere = $" and (OrderStatus in(2,3,4,6,5) or( {nameof(RB_Goods_Order.OrderStatus)}=7 and {nameof(RB_Goods_Order.PaymentTime)} is not NULL)) ";
where += $" and (a.OrderStatus in(2,3,4,5,6) or (a.OrderStatus=7 and a.PaymentTime is not NULL and a.CancelTime is not NULL and DATE_FORMAT(a.PaymentTime,'%Y-%m-%d' )<DATE_FORMAT(a.CancelTime,'%Y-%m-%d' ) ) )";
payMemerNumWhere = $"and (OrderStatus in(2,3,4,5,6) or (OrderStatus=7 and PaymentTime is not NULL and CancelTime is not NULL and DATE_FORMAT(PaymentTime,'%Y-%m-%d' )<DATE_FORMAT(CancelTime,'%Y-%m-%d' ) ) ) ";
}
else if (dmodel.OrderStatus == 2)
{
......
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