From 4961dca45fd9d861a26a9df00eac4e8fb3ef958c Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Tue, 28 Mar 2023 18:04:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=92=E6=9D=80=E7=9B=B8=E5=85=B3=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/adminapi/controller/v1/marketing/StoreSeckill.php | 2 +- crmeb/app/dao/order/StoreOrderDao.php | 3 ++- crmeb/app/services/activity/seckill/StoreSeckillServices.php | 4 ++-- crmeb/app/services/product/product/StoreProductServices.php | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/marketing/StoreSeckill.php b/crmeb/app/adminapi/controller/v1/marketing/StoreSeckill.php index ce01afc52..79f08398e 100644 --- a/crmeb/app/adminapi/controller/v1/marketing/StoreSeckill.php +++ b/crmeb/app/adminapi/controller/v1/marketing/StoreSeckill.php @@ -151,7 +151,7 @@ class StoreSeckill extends AuthController public function seckillPeople($id) { [$keyword] = $this->request->getMore([ - ['keyword', ''] + ['real_name', '', '', 'keyword'] ], true); return app('json')->success($this->services->seckillPeople($id, $keyword)); } diff --git a/crmeb/app/dao/order/StoreOrderDao.php b/crmeb/app/dao/order/StoreOrderDao.php index a0013db6f..8d9e5084d 100644 --- a/crmeb/app/dao/order/StoreOrderDao.php +++ b/crmeb/app/dao/order/StoreOrderDao.php @@ -894,7 +894,7 @@ class StoreOrderDao extends BaseDao */ public function seckillPeople($id, $keyword, $page = 0, $limit = 0) { - return $this->getModel() + return $this->getModel()->where('paid', 1)->whereIn('refund_type', [0, 3]) ->when($id != 0, function ($query) use ($id) { $query->where('seckill_id', $id); })->when($keyword != '', function ($query) use ($keyword) { @@ -902,6 +902,7 @@ class StoreOrderDao extends BaseDao })->where('paid', 1)->field([ 'real_name', 'uid', + 'user_phone', 'SUM(total_num) as goods_num', 'COUNT(id) as order_num', 'SUM(pay_price) as total_price', diff --git a/crmeb/app/services/activity/seckill/StoreSeckillServices.php b/crmeb/app/services/activity/seckill/StoreSeckillServices.php index 9bb2687b0..3a57da4b8 100644 --- a/crmeb/app/services/activity/seckill/StoreSeckillServices.php +++ b/crmeb/app/services/activity/seckill/StoreSeckillServices.php @@ -362,7 +362,7 @@ class StoreSeckillServices extends BaseServices $header[] = ['title' => $item['value'], 'key' => 'value' . ($key + 1), 'align' => 'center', 'minWidth' => 80]; } $header[] = ['title' => '图片', 'slot' => 'pic', 'align' => 'center', 'minWidth' => 120]; - $header[] = ['title' => '秒杀价', 'slot' => 'price', 'align' => 'center', 'minWidth' => 80]; + $header[] = ['title' => '秒杀价', 'type' => 1, 'key' => 'price', 'align' => 'center', 'minWidth' => 80]; $header[] = ['title' => '成本价', 'key' => 'cost', 'align' => 'center', 'minWidth' => 80]; $header[] = ['title' => '原价', 'key' => 'ot_price', 'align' => 'center', 'minWidth' => 80]; $header[] = ['title' => '库存', 'key' => 'stock', 'align' => 'center', 'minWidth' => 80]; @@ -732,7 +732,7 @@ class StoreSeckillServices extends BaseServices $orderServices = app()->make(StoreOrderServices::class); $pay_count = $orderServices->getDistinctCount([['seckill_id', '=', $id], ['paid', '=', 1]], 'uid', false); $order_count = $orderServices->getDistinctCount([['seckill_id', '=', $id]], 'uid', false); - $all_price = $orderServices->sum([['seckill_id', '=', $id], ['refund_type', 'in', [0, 3]]], 'pay_price'); + $all_price = $orderServices->sum([['seckill_id', '=', $id], ['refund_type', 'in', [0, 3]], ['paid', '=', 1]], 'pay_price'); $seckillInfo = $this->dao->get($id); $pay_rate = $seckillInfo['quota'] . '/' . $seckillInfo['quota_show']; return compact('pay_count', 'order_count', 'all_price', 'pay_rate'); diff --git a/crmeb/app/services/product/product/StoreProductServices.php b/crmeb/app/services/product/product/StoreProductServices.php index 5bca46e8b..5fca857c7 100644 --- a/crmeb/app/services/product/product/StoreProductServices.php +++ b/crmeb/app/services/product/product/StoreProductServices.php @@ -950,7 +950,7 @@ class StoreProductServices extends BaseServices } $header[] = ['title' => '图片', 'slot' => 'pic', 'align' => 'center', 'minWidth' => 120]; if ($type == 1) { - $header[] = ['title' => '秒杀价', 'slot' => 'price', 'align' => 'center', 'minWidth' => 80]; + $header[] = ['title' => '秒杀价', 'type' => 1, 'key' => 'price', 'align' => 'center', 'minWidth' => 80]; $header[] = ['title' => '成本价', 'key' => 'cost', 'align' => 'center', 'minWidth' => 80]; $header[] = ['title' => '原价', 'key' => 'ot_price', 'align' => 'center', 'minWidth' => 80]; } elseif ($type == 2) {