From 53a5b64eddd74abd9783451763f4d7a0ec31197e Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Sat, 18 Feb 2023 09:55:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8B=BC=E5=9B=A2=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=B1=95=E7=A4=BA=E6=8B=BC=E5=9B=A2=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../combination/StorePinkServices.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/crmeb/app/services/activity/combination/StorePinkServices.php b/crmeb/app/services/activity/combination/StorePinkServices.php index df25e87b7..223390680 100644 --- a/crmeb/app/services/activity/combination/StorePinkServices.php +++ b/crmeb/app/services/activity/combination/StorePinkServices.php @@ -151,8 +151,23 @@ class StorePinkServices extends BaseServices $where['cid'] = $id; $where['k_id'] = 0; $where['is_refund'] = 0; - $list = $this->dao->pinkList($where); - $ids = array_column($list, 'id'); + $pinkList = $this->dao->pinkList($where); + $ids = array_column($pinkList, 'id'); + $orderIdKey = array_column($pinkList, 'order_id_key'); + $refunList = []; + if ($orderIdKey) { + $refunList = app()->make(StoreOrderRefundServices::class)->getColumn([['store_order_id', 'in', $orderIdKey]], 'id', 'store_order_id'); + } + if ($refunList) { + $list = []; + foreach ($pinkList as $item) { + if (!isset($refunList[$item['order_id_key']])) { + $list[] = $item; + } + } + } else { + $list = $pinkList; + } $counts = $this->dao->getPinkPeopleCount($ids); if ($type) { $pinkAll = [];