moonsflyer 5 месяцев назад
Родитель
Сommit
d44e075e9a
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      app/shopapi/lists/OrderLists.php

+ 5 - 0
app/shopapi/lists/OrderLists.php

@@ -40,6 +40,10 @@ class OrderLists extends BaseShopDataLists
      */
     public function lists(): array
     {
+        $r_where = [] ;
+        if($this->params['type'] == 'return'){
+            $r_where[] = ['is_after_sale', '=', 1];
+        }
         $lists = Order::withSearch(['order_type', 'user_id'], [
                 'order_type' => $this->params['type'],
                 'user_id' => $this->userId
@@ -49,6 +53,7 @@ class OrderLists extends BaseShopDataLists
                     ->append(['goods_image', 'spec_value_str'])
                     ->hidden(['goods_snap']);
             }])
+            ->where($r_where)
             ->field(['id', 'sn', 'order_type', 'order_status', 'total_num', 'order_amount', 'delivery_type', 'is_team_success', 'pay_way', 'pay_status', 'pay_time', 'express_status','delivery_content', 'delivery_content1', 'delivery_content_type', 'create_time', 'presell_id', 'transaction_id' ,'is_after_sale' ,'after_sale_status' ])
             ->append(['btn'])
             ->order(['id' => 'desc'])