作者 何书鹏
1 个管道 的构建 通过 耗费 6 秒

合并分支 'heshupeng' 到 'master'

Heshupeng



查看合并请求 !415
@@ -17,8 +17,8 @@ class Litestoreorder extends Backend @@ -17,8 +17,8 @@ class Litestoreorder extends Backend
17 * @var \app\admin\model\Litestoreorder 17 * @var \app\admin\model\Litestoreorder
18 */ 18 */
19 protected $model = null; 19 protected $model = null;
20 - protected $dataLimit = true;  
21 - protected $dataLimitField = 'store_id'; 20 +// protected $dataLimit = true;
  21 +// protected $dataLimitField = 'store_id';
22 22
23 public function _initialize() 23 public function _initialize()
24 { 24 {
@@ -54,13 +54,19 @@ class Litestoreorder extends Backend @@ -54,13 +54,19 @@ class Litestoreorder extends Backend
54 return $this->selectpage(); 54 return $this->selectpage();
55 } 55 }
56 list($where, $sort, $order, $offset, $limit) = $this->buildparams(); 56 list($where, $sort, $order, $offset, $limit) = $this->buildparams();
  57 +
  58 + $store = \app\admin\model\store\Store::where('admin_id',$this->auth->id)->field('id')->find();
  59 + $store_id = $store ? $store['id'] : 0;
  60 +
57 $total = $this->model 61 $total = $this->model
58 ->where($where) 62 ->where($where)
  63 + ->where('store_id',$store_id)
59 ->order($sort, $order) 64 ->order($sort, $order)
60 ->count(); 65 ->count();
61 66
62 $list = $this->model 67 $list = $this->model
63 ->where($where) 68 ->where($where)
  69 + ->where('store_id',$store_id)
64 ->order($sort, $order) 70 ->order($sort, $order)
65 ->limit($offset, $limit) 71 ->limit($offset, $limit)
66 ->select(); 72 ->select();