修改订单统计

This commit is contained in:
luofei 2024-03-22 12:04:56 +08:00
parent 46141c5d41
commit 4282a50d18
2 changed files with 9 additions and 3 deletions

View File

@ -903,14 +903,15 @@ class StoreOrderRepository extends BaseRepository
$all = $this->dao->search($where, $sysDel)->where($this->getOrderType(0))->count();
$statusAll = $all;
$unpaid = $this->dao->search($where, $sysDel)->where($this->getOrderType(1))->count();
$unshipped = $this->dao->search($where, $sysDel)->where($this->getOrderType(2))->count();
$unshipped = $this->dao->search($where, $sysDel)->where($this->getOrderType(2))->where('order_type', 0)->count();
$untake = $this->dao->search($where, $sysDel)->where($this->getOrderType(3))->count();
$unevaluate = $this->dao->search($where, $sysDel)->where($this->getOrderType(4))->count();
$complete = $this->dao->search($where, $sysDel)->where($this->getOrderType(5))->count();
$refund = $this->dao->search($where, $sysDel)->where($this->getOrderType(6))->count();
$verify = $this->dao->search($where, $sysDel)->where($this->getOrderType(2))->where('order_type', 1)->count();
$del = $this->dao->search($where, $sysDel)->where($this->getOrderType(7))->count();
return compact('all', 'statusAll', 'unpaid', 'unshipped', 'untake', 'unevaluate', 'complete', 'refund', 'del');
return compact('all', 'statusAll', 'unpaid', 'unshipped', 'untake', 'unevaluate', 'complete', 'refund', 'del', 'verify');
}
public function orderType(array $where)
@ -2686,7 +2687,11 @@ class StoreOrderRepository extends BaseRepository
$result = $this->findNearestPriceProduct($products, $money, $minNum);
}
$count = count($result);//计算数量的
return compact('count', 'result','merInfo');
return [
'count' => $count,
'list' => $result,
'merInfo' => $merInfo,
];
} else {
return compact('count', 'list','merInfo');

View File

@ -93,6 +93,7 @@ class StoreOrder extends BaseController
unset($where['product_type']);
}
$where['order_search'] = $this->request->param('search_info');
/** @var StoreOrderRepository $repository */
$repository = \app()->make(StoreOrderRepository::class);
$result = $repository->merchantGetList($where, $page, $limit);