hospital-applets-api/app/Services/OrderProductService.php

22 lines
669 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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);
}
}