Преглед изворни кода

会员详情-收益记录-翻页有问题

sunxbiao пре 1 година
родитељ
комит
3e9419b872
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      app/common/repositories/user/UserBillRepository.php

+ 4 - 4
app/common/repositories/user/UserBillRepository.php

@@ -49,12 +49,12 @@ class UserBillRepository extends BaseRepository
49 49
     public function userList($where, $uid, $page, $limit)
50 50
     {
51 51
         $where['uid'] = $uid;
52
-        $query = $this->dao->search($where)->order('create_time DESC');
53
-        $count = $query->count();
54
-        $list = $query
52
+        $query = $this->dao->search($where)->order('create_time DESC')
55 53
             ->when(isset($where['status']) && $where['status'] !== '', function ($query) use ($where) {
56 54
                 $query->whereLike('status', $where['status']);
57
-            })->setOption('field', [])->field('bill_id,pm,title,number,balance,mark,create_time,status,order_sn,mer_id')->page($page, $limit)->select();
55
+            });
56
+        $count = $query->count();
57
+        $list = $query->setOption('field', [])->field('bill_id,pm,title,number,balance,mark,create_time,status,order_sn,mer_id')->page($page, $limit)->select();
58 58
         return compact('count', 'list');
59 59
     }
60 60