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)){