From 705dcbe494b56c8a95dfce9a589e5560cf120ac3 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Fri, 24 Mar 2023 15:18:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E5=8D=A1=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E7=83=AD=E9=97=A8=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0vip=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E7=A7=BB=E5=8A=A8=E7=AB=AF=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=AE=A1=E7=90=86=E5=A4=84=E7=90=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=8D=E7=BB=9F=E4=B8=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/dao/order/StoreOrderDao.php | 4 ++-- crmeb/app/services/other/export/ExportServices.php | 10 ++++++++-- .../services/product/product/StoreProductServices.php | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/crmeb/app/dao/order/StoreOrderDao.php b/crmeb/app/dao/order/StoreOrderDao.php index d99febb71..a0013db6f 100644 --- a/crmeb/app/dao/order/StoreOrderDao.php +++ b/crmeb/app/dao/order/StoreOrderDao.php @@ -495,7 +495,7 @@ class StoreOrderDao extends BaseDao */ public function chartTimePrice($start, $stop) { - return $this->search(['is_del' => 0, 'paid' => 1, 'refund_status' => 0]) + return $this->search(['pid' => 0, 'is_del' => 0, 'paid' => 1, 'refund_status' => [0, 3]]) ->where('add_time', '>=', $start) ->where('add_time', '<', $stop) ->field('sum(pay_price) as num,FROM_UNIXTIME(add_time, \'%Y-%m-%d\') as time') @@ -511,7 +511,7 @@ class StoreOrderDao extends BaseDao */ public function chartTimeNumber($start, $stop) { - return $this->search(['is_del' => 0, 'paid' => 1, 'refund_status' => 0]) + return $this->search(['pid' => 0, 'is_del' => 0, 'paid' => 1, 'refund_status' => [0, 3]]) ->where('add_time', '>=', $start) ->where('add_time', '<', $stop) ->field('count(id) as num,FROM_UNIXTIME(add_time, \'%Y-%m-%d\') as time') diff --git a/crmeb/app/services/other/export/ExportServices.php b/crmeb/app/services/other/export/ExportServices.php index 3648a37ac..f459cf372 100644 --- a/crmeb/app/services/other/export/ExportServices.php +++ b/crmeb/app/services/other/export/ExportServices.php @@ -336,13 +336,19 @@ class ExportServices extends BaseServices $filename = $data['title'] . '批次列表_' . date('YmdHis', time()); $export = $fileKey = []; if (!empty($data['data'])) { + $userIds = array_column($data['data']->toArray(), 'use_uid'); + /** @var UserServices $userService */ + $userService = app()->make(UserServices::class); + $userList = $userService->getColumn([['uid', 'in', $userIds]], 'nickname,phone,real_name', 'uid'); + + $i = 0; foreach ($data['data'] as $item) { $one_data = [ 'card_number' => $item['card_number'], 'card_password' => $item['card_password'], - 'user_name' => $item['user_name'], - 'user_phone' => $item['user_phone'], + 'user_name' => $userList[$item['use_uid']]['real_name'] ?: $userList[$item['use_uid']]['nickname'], + 'user_phone' => $userList[$item['use_uid']] ? $userList[$item['use_uid']]['phone'] : "", 'use_time' => $item['use_time'], 'use_uid' => $item['use_uid'] ? '已领取' : '未领取' ]; diff --git a/crmeb/app/services/product/product/StoreProductServices.php b/crmeb/app/services/product/product/StoreProductServices.php index 1de8d206b..9c6956c5d 100644 --- a/crmeb/app/services/product/product/StoreProductServices.php +++ b/crmeb/app/services/product/product/StoreProductServices.php @@ -1259,7 +1259,7 @@ class StoreProductServices extends BaseServices $page = 1; $limit = $num; } - $list = $this->dao->getSearchList($where, $page, $limit, ['id,store_name,cate_id,image,IFNULL(sales, 0) + IFNULL(ficti, 0) as sales,price,stock,activity,unit_name,presale']); + $list = $this->dao->getSearchList($where, $page, $limit, ['id,store_name,cate_id,image,IFNULL(sales, 0) + IFNULL(ficti, 0) as sales,price,stock,activity,unit_name,presale,is_vip,vip_price']); $list = $this->getActivityList($list); return $list; }