public function showTodayOrder()
 {
     $connection = \Yii::$app->db;
     //搜索今天所有的订单号
     $datetime = date('ymd');
     $datesearch = $datetime . '%';
     $ordertables = Ordertables::getinstance();
     $sql = 'SELECT * FROM ordertables WHERE order_id LIKE \'' . $datesearch . '\'';
     $command = $connection->createCommand($sql)->queryAll();
     return $command;
 }
 /**
  * Finds the Ordertables model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $order_id
  * @param string $item_id
  * @return Ordertables the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($order_id, $item_id)
 {
     if (($model = Ordertables::findOne(['order_id' => $order_id, 'item_id' => $item_id])) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }