Browse Source

Merge branch 'dev-xpy' into dev

xupuyuan 3 months ago
parent
commit
4983aea71d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/common/repositories/store/StoreAttrTemplateRepository.php

+ 2 - 1
app/common/repositories/store/StoreAttrTemplateRepository.php

@@ -58,7 +58,8 @@ class StoreAttrTemplateRepository extends BaseRepository
58
     public function getList($merId, array $where, $page, $limit)
58
     public function getList($merId, array $where, $page, $limit)
59
     {
59
     {
60
         $query = $this->dao->search($merId, $where);
60
         $query = $this->dao->search($merId, $where);
61
-        $count = $query->count($this->dao->getPk());
61
+        $CountQuery = clone $query;
62
+        $count = $CountQuery->count($this->dao->getPk());
62
         $list = $query->page($page, $limit)->select();
63
         $list = $query->page($page, $limit)->select();
63
         return compact('count', 'list');
64
         return compact('count', 'list');
64
     }
65
     }