From 90b20a26ddd36de4e68a2a2834fe6088560f6b26 Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Fri, 18 Sep 2020 19:07:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=20=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/CouponRecService.php | 2 +- app/Service/v3/Implementations/OrderListService.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Service/v3/Implementations/CouponRecService.php b/app/Service/v3/Implementations/CouponRecService.php index 7fe58e6..7f74743 100644 --- a/app/Service/v3/Implementations/CouponRecService.php +++ b/app/Service/v3/Implementations/CouponRecService.php @@ -281,7 +281,7 @@ class CouponRecService implements CouponRecServiceInterface ->where('user_id',$userId) ->get(); foreach ($coupons as $coupon){ - if($coupon->coupon->usable_end_time < time() || $coupon->coupon->status != 1){ + if($coupon->coupon->usable_end_time < time()){ $res['expired'] += $coupon->number_remain; }else{ $res['unused'] += $coupon->number_remain; diff --git a/app/Service/v3/Implementations/OrderListService.php b/app/Service/v3/Implementations/OrderListService.php index 9c99119..5d23bce 100644 --- a/app/Service/v3/Implementations/OrderListService.php +++ b/app/Service/v3/Implementations/OrderListService.php @@ -97,8 +97,8 @@ class OrderListService implements OrderListServiceInterface ->select(''.$childTable.'.*') ->join($mainTable, ''.$childTable.'.order_main_id', '=', ''.$mainTable.'.global_order_id') ->with(['orderMain', 'orderGoods']) - ->where(['store_id' => $storeId, ''.$mainTable.'.type' => OrderType::ONLINE]); - + ->where(['store_id' => $storeId, ''.$mainTable.'.type' => OrderType::ONLINE]) + ->whereNull($mainTable.'.deleted_at'); switch ($tab) { case 'all': break; @@ -163,6 +163,7 @@ class OrderListService implements OrderListServiceInterface ->select(''.$mainTable.'.*', ''.$childTable.'.order_num') ->join($childTable, ''.$childTable.'.order_main_id', '=', ''.$mainTable.'.global_order_id') ->where([''.$childTable.'.store_id' => $storeId, ''.$mainTable.'.type' => OrderType::OFFLINE]) + ->whereNull($mainTable.'.deleted_at') ->with('user'); // if(!empty($start_time) && !empty($end_time)){