Merge branch 'feature/purchase_record' into dev

This commit is contained in:
luofei 2023-07-14 17:41:06 +08:00
commit e99fae22e8

View File

@ -804,7 +804,7 @@ class StoreOrderRepository extends BaseRepository
//1: 未支付 2: 未发货 3: 待收货 4: 待评价 5: 交易完成 6: 已退款 7: 已删除
$all = $this->dao->search($where, $sysDel)->where($this->getOrderType(0))->count();
$statusAll = $all;
$unpaid = $this->dao->search($where, $sysDel)->where($this->getOrderType(1))->whereRaw("(StoreOrder.paid=0 and StoreOrder.status!=12) or (StoreOrder.paid=1 and StoreOrder.pay_type=8 and StoreOrder.status=2)")->count();
$unpaid = $this->dao->search($where, $sysDel)->where($this->getOrderType(1))->whereRaw("StoreOrder.paid=0 or (StoreOrder.paid=1 and StoreOrder.pay_type=8 and StoreOrder.status=2)")->count();
$unshipped = $this->dao->search($where, $sysDel)->where($this->getOrderType(2))->count();
$untake = $this->dao->search($where, $sysDel)->where($this->getOrderType(3))->count();
$unevaluate = $this->dao->search($where, $sysDel)->where($this->getOrderType(4))->where('paid', 1)->where('pay_type', '<>', StoreGroupOrder::PAY_TYPE_CREDIT_BUY)->count();
@ -1497,7 +1497,7 @@ class StoreOrderRepository extends BaseRepository
$query->where('paid', 1)->where('pay_type', '<>', StoreGroupOrder::PAY_TYPE_CREDIT_BUY);
})
->when($status == 1, function ($query) {
$query->whereRaw("(StoreOrder.paid=0 and StoreOrder.status!=12) or (StoreOrder.paid=1 and StoreOrder.pay_type=8 and StoreOrder.status=2)");
$query->whereRaw("StoreOrder.paid=0 or (StoreOrder.paid=1 and StoreOrder.pay_type=8 and StoreOrder.status=2)");
})
->with([
'orderProduct',