store_id)) { return $this->apiReturnError('门店错误'); } if ($this->user_type != 2) { return $this->apiReturnError('权限错误'); } $orderCount = Order::find()->where(['store_id' => $this->store_id, 'status' => 2, 'is_delete' => 0])->count(); return [ 'code' => 0, 'msg' => 'ok', 'data' => ['num' => $orderCount] ]; } }