diff --git a/crmeb/app/dao/order/StoreOrderStoreOrderStatusDao.php b/crmeb/app/dao/order/StoreOrderStoreOrderStatusDao.php index 20694e48e..9ca67d449 100644 --- a/crmeb/app/dao/order/StoreOrderStoreOrderStatusDao.php +++ b/crmeb/app/dao/order/StoreOrderStoreOrderStatusDao.php @@ -81,8 +81,11 @@ class StoreOrderStoreOrderStatusDao extends BaseDao * @param array $where * @return array */ - public function getTakeOrderIds(array $where) + public function getTakeOrderIds(array $where, int $limit = 0) { - return $this->search($where)->whereIn('refund_status', [0, 1])->field([$this->alias . '.*'])->select()->toArray(); + return $this->search($where)->whereIn('refund_type', [0, 3])->field([$this->alias . '.*']) + ->when($limit != 0, function ($query) use ($limit) { + $query->limit($limit); + })->select()->toArray(); } } diff --git a/crmeb/app/services/order/StoreOrderStoreOrderStatusServices.php b/crmeb/app/services/order/StoreOrderStoreOrderStatusServices.php index bd94214b2..5ec2e41a3 100644 --- a/crmeb/app/services/order/StoreOrderStoreOrderStatusServices.php +++ b/crmeb/app/services/order/StoreOrderStoreOrderStatusServices.php @@ -18,7 +18,7 @@ use app\services\BaseServices; /** * Class StoreOrderStoreOrderStatusServices * @package app\services\order - * @method getTakeOrderIds(array $where) + * @method getTakeOrderIds(array $where, ?int $limit = 0) */ class StoreOrderStoreOrderStatusServices extends BaseServices {