Parcourir la source

商家后台-商品中规格模板-修复排序错误

xupuyuan il y a 6 mois
Parent
commit
4d21a7eb54
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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
     }