diff --git a/app/admin/lists/store_order_cart_info/StoreOrderCartInfoGroupLists.php b/app/admin/lists/store_order_cart_info/StoreOrderCartInfoGroupLists.php index 37153b05..20d36225 100644 --- a/app/admin/lists/store_order_cart_info/StoreOrderCartInfoGroupLists.php +++ b/app/admin/lists/store_order_cart_info/StoreOrderCartInfoGroupLists.php @@ -52,6 +52,8 @@ class StoreOrderCartInfoGroupLists extends BaseAdminDataLists implements ListsSe if($this->request->get('start_time')==''){ $this->searchWhere[]=['create_time','between',[strtotime(date('Y-m-d 00:00:00')),strtotime(date('Y-m-d 23:59:59'))]]; } + $this->searchWhere[]=['is_pay','=',1]; + $this->searchWhere[]=['status','>=',0]; return StoreOrderCartInfo::where($this->searchWhere) ->field('product_id,price,SUM(total_price) as total_price,SUM(cart_num) as cart_num')->group('product_id') ->limit($this->limitOffset, $this->limitLength) diff --git a/app/admin/lists/store_order_cart_info/StoreOrderCartInfoTwoLists.php b/app/admin/lists/store_order_cart_info/StoreOrderCartInfoTwoLists.php index 2a8557d5..468e3ee9 100644 --- a/app/admin/lists/store_order_cart_info/StoreOrderCartInfoTwoLists.php +++ b/app/admin/lists/store_order_cart_info/StoreOrderCartInfoTwoLists.php @@ -52,6 +52,8 @@ class StoreOrderCartInfoTwoLists extends BaseAdminDataLists implements ListsSear if ($this->request->get('start_time') == '') { $this->searchWhere[] = ['create_time', 'between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]]; } + $this->searchWhere[]=['is_pay','=',1]; + $this->searchWhere[]=['status','>=',0]; $query = StoreOrderCartInfo::where($this->searchWhere); if ($this->request->get('is_group') == 1) { $query->field('store_id,product_id,price,SUM(total_price) as total_price,SUM(cart_num) as cart_num')->group(['store_id', 'product_id']); diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 1d478114..31e42377 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -563,6 +563,7 @@ class PayNotifyLogic extends BaseLogic */ public static function afterPay($order, $transaction_id = 0) { + StoreOrderCartInfo::where('oid', $order['id'])->update(['is_pay' => 1]); $financeLogic = new StoreFinanceFlowLogic(); $off_activity = Config::where('name', 'off_activity')->value('value'); $village_uid = 0;