This commit is contained in:
mkm 2024-05-16 16:10:04 +08:00
parent 368815b4e0
commit 84460f27e1

View File

@ -34,7 +34,7 @@ class RetailOrderController extends BaseApiController
} }
/** /**
* 收银机对应的采购零售订单列表 * 摊贩订单列表
*/ */
public function merchant_order_list() public function merchant_order_list()
{ {
@ -50,6 +50,7 @@ class RetailOrderController extends BaseApiController
} }
$where[] = ['merchant', '=',$this->userInfo['merchant']['mer_id']]; $where[] = ['merchant', '=',$this->userInfo['merchant']['mer_id']];
$where[] = ['paid', '=',1]; $where[] = ['paid', '=',1];
$where[] = ['pay_type', '<>',9];
$where[] = ['is_opurchase', '=',0]; $where[] = ['is_opurchase', '=',0];
$res = Cashierclass::where($where)->page($page_no, 25)->whereDay('create_time', $date) $res = Cashierclass::where($where)->page($page_no, 25)->whereDay('create_time', $date)
->order('address_id asc,id desc') ->order('address_id asc,id desc')
@ -63,7 +64,18 @@ class RetailOrderController extends BaseApiController
$data['page_siz'] = 15; $data['page_siz'] = 15;
return $this->success('ok', $data); return $this->success('ok', $data);
} }
/**
* 摊贩订单统计
*/
public function merchant_order_count()
{
$where[] = ['merchant', '=',$this->userInfo['merchant']['mer_id']];
$where[] = ['paid', '=',1];
$where[] = ['pay_type', '<>',9];
$where[] = ['is_opurchase', '=',0];
$res = Cashierclass::where($where)->count();
return $this->success('ok', ['order_count' => $res]);
}
public function order_count() public function order_count()
{ {
$userId = $this->request->userId; $userId = $this->request->userId;