orderTypeWhere+=$@" and {nameof(RB_Goods_OrderDetail.OrderType)}={dmodel.OrderType}";
orderTypeWhere+=$@" and {nameof(RB_Goods_OrderDetail.OrderType)}={dmodel.OrderType}";
}
}
if(dmodel.OrderStatus==1||dmodel.OrderStatus==0)
if(dmodel.OrderStatus==0)
{
{
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' ) ) )";
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' ) ) ) ";
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' ) ) ) ";
}
}
elseif(dmodel.OrderStatus==1)
{
where+=$@" and a.{nameof(RB_Goods_Order.OrderStatus)} in(2,3,4,5,6)";
payMemerNumWhere+=$@" and {nameof(RB_Goods_Order.OrderStatus)} in(2,3,4,5,6)";
}
elseif(dmodel.OrderStatus==2)
elseif(dmodel.OrderStatus==2)
{
{
where+=$@" and a.{nameof(RB_Goods_Order.OrderStatus)}=5";
where+=$@" and a.{nameof(RB_Goods_Order.OrderStatus)}=5";