22 lines
669 B
PHP
22 lines
669 B
PHP
<?php
|
||
|
||
namespace App\Services;
|
||
|
||
use App\Model\OrderProduct;
|
||
|
||
class OrderProductService extends BaseService
|
||
{
|
||
/**
|
||
* 获取患者某一状态下的商品订单数量
|
||
* @param string $patient_id 患者id
|
||
* @param int $order_product_status 订单状态(1:待支付 2:待发货 3:已发货 4:已签收 5:已完成 6:已取消)
|
||
* @return int
|
||
*/
|
||
public function getPatientProductWithStatus(string $patient_id,int $order_product_status): int
|
||
{
|
||
$params = array();
|
||
$params['patient_id'] = $patient_id;
|
||
$params['order_product_status'] = $order_product_status;
|
||
return OrderProduct::getCount($params);
|
||
}
|
||
} |