Просмотр исходного кода

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

xupuyuan месяцев назад: 3
Родитель
Сommit
4d21a7eb54
1 измененных файлов с 2 добавлено и 1 удалено
  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 58
     public function getList($merId, array $where, $page, $limit)
59 59
     {
60 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 63
         $list = $query->page($page, $limit)->select();
63 64
         return compact('count', 'list');
64 65
     }