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