Explorar o código

修改拼团订单

dongxiaoqin hai 1 ano
pai
achega
e378b7822d
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      app/api/lists/group_activity/UserOrderLists.php

+ 10 - 0
app/api/lists/group_activity/UserOrderLists.php

@@ -24,6 +24,14 @@ class UserOrderLists extends BaseApiDataLists implements ListsSearchInterface
             '=' => ['a.status'],
         ];
     }
+
+    public function queryWhere(){
+        $where = [];
+        if (empty($this->params['status'])) {
+            $where[] = ['a.status', '<>', 0];
+        }
+        return $where;
+    }
     
     /**
      * @notes 获取列表
@@ -38,6 +46,7 @@ class UserOrderLists extends BaseApiDataLists implements ListsSearchInterface
                 'a.user_id' => $this->userId,
             ])
             ->where($this->searchWhere)
+            ->where($this->queryWhere())
             ->limit($this->limitOffset, $this->limitLength)
             ->order('a.create_time', 'desc')
             ->select()
@@ -56,6 +65,7 @@ class UserOrderLists extends BaseApiDataLists implements ListsSearchInterface
                 'user_id' => $this->userId,
             ])
             ->where($this->searchWhere)
+            ->where($this->queryWhere())
             ->count();
     }