Browse Source

Merge branch 'phoenix' of ssh://120.24.33.109:11022/hyzjshwo/lanzu_api_hyperf into phoenix

master
weigang 5 years ago
parent
commit
6c27ce8c71
  1. 2
      app/Service/v3/Implementations/CouponRecService.php
  2. 5
      app/Service/v3/Implementations/OrderListService.php

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

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

Loading…
Cancel
Save