yingzi 2 years ago
parent
commit
dec191daa0
2 changed files with 5 additions and 2 deletions
  1. 1 1
      Controller/Shop/ApiShopCard.Class.php
  2. 4 1
      Model/Shop/MShopCardOrder.Class.php

+ 1 - 1
Controller/Shop/ApiShopCard.Class.php

@@ -116,7 +116,7 @@ class ApiShopCard extends BaseController
         $selectParams['paid'] = 1;
 
         $list = $this->objCardOrder->list($selectParams)->getData();
-
+        
         $pageData = [
             'pageIndex' => $params['page'],
             'pageSize' => $params['pageSize'],

+ 4 - 1
Model/Shop/MShopCardOrder.Class.php

@@ -87,7 +87,10 @@ class MShopCardOrder extends MBaseModel
             $wherein[]  = ['a.createTime', '>=', strtotime($where['time'][0])];
             $wherein[]  = ['a.createTime', '<=', strtotime($where['time'][1])];
         }
-
+        
+        if(isset($where["customer_id"])){
+            $wherein[] = ['customer_id' , '=', $where["customer_id"]];
+        }
 
 
         $dbResult = $this->obj->select($wherein, 'a.*,b.name as user_name,c.name as card_name,c.image', 'id DESC', $limit, $offset, array(), true, false,$join);