stringwhere=$" 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))";
stringpayMemerNumWhere=$" and (OrderStatus in(2,3,4,6,5) or( {nameof(RB_Goods_Order.OrderStatus)}=7 and {nameof(RB_Goods_Order.PaymentTime)} is not NULL)) ";
stringwhere="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)) ";
stringpayMemerNumWhere=" 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' ) ) ) ";
stringorderTypeWhere="";
stringsql="";
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' ) ) ) ";