Ejemplo n.º 1
0
 public function get_all($next_id, $count)
 {
     $appointmentTable = new AppointmentTable();
     $appoint_list = $appointmentTable->get_all($next_id, $count);
     $activityTable = new ActivityTable();
     foreach ($appoint_list as $appoint) {
         $activity = $activityTable->get_by_id($appoint->activity->id);
         $appoint->activity = $activity;
     }
     return $appoint_list;
 }
Ejemplo n.º 2
0
 public function get_favors($next_id, $count)
 {
     $table = new FavorTable();
     $favors = $table->get_by_user($this->user->uuid, $next_id, $count);
     $acts = array();
     $act_table = new ActivityTable();
     foreach ($favors as $f) {
         $acts[] = $act_table->get_by_id($f->activity->id);
     }
     return $acts;
 }
Ejemplo n.º 3
0
 /**
  * 通过id查询活动的单条数据
  * @param $id 活动的id
  * return activity对象
  */
 public function get_by_id($id)
 {
     $act_table = new ActivityTable();
     return $act_table->get_by_id($id);
 }