/**
  *主要用来改变订单的状态
  *{"act":[markAllRead],"content":"" }
  **/
 protected function update()
 {
     $input = $this->put;
     $ret = $input && $input['act'];
     if ($ret) {
         switch ($ret['act']) {
             case 'markAllRead':
                 $ret = BookingLgModel::markAllRead($this->hid);
                 break;
             default:
                 $ret = false;
                 break;
         }
     }
     if ($ret !== false) {
         $this->success("操作成功!");
     } else {
         $this->error('error in update');
         Log::record('error' . print_r($input) . '\\n');
     }
 }
 /**
  *计算未读预定的订单数
  **/
 protected function countUnBook()
 {
     $ret = $this->check_action('Booking-order', $this->bid);
     if ($ret) {
         $ret = BookingLgModel::countUnreads($this->bid);
     } else {
         return array('code' => 3, 'count' => 0);
         //2 无权限读
     }
     if ($ret > 0) {
         BookingLgModel::markAllRead($this->bid);
     }
     return array('code' => 0, 'count' => $ret);
 }