src/Biz/OpenCourse/Dao/Impl/OpenCourseLessonDaoImpl.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

namespace Biz\OpenCourse\Dao\Impl;

use Biz\OpenCourse\Dao\OpenCourseLessonDao;
use Codeages\Biz\Framework\Dao\GeneralDaoImpl;

class OpenCourseLessonDaoImpl extends GeneralDaoImpl implements OpenCourseLessonDao
{
    protected $table = 'open_course_lesson';

    public function declares()
    {
        return array(
            'timestamps' => array(),
            'serializes' => array(),
            'orderbys' => array('createdTime', 'startTime', 'recommendedSeq', 'studentNum', 'hitNum', 'seq'),
            'conditions' => array(
                'id = :lessonId',
                'id NOT IN (:lessonIdNotIn)',
                'courseId = :courseId',
                'updatedTime >= :updatedTime_GE',
                'status = :status',
                'type = :type',
                'free = :free',
                'userId = :userId',
                'mediaId = :mediaId',
                'number = :number',
                'startTime >= :startTimeGreaterThan',
                'endTime < :endTimeLessThan',
                'startTime <= :startTimeLessThan',
                'endTime > :endTimeGreaterThan',
                'title LIKE :titleLike',
                'createdTime >= :startTime',
                'createdTime <= :endTime',
                'copyId = :copyId',
                'courseId IN ( :courseIds )',
            ),
        );
    }

    public function findByIds(array $ids)
    {
        return $this->findInField('id', $ids);
    }

    public function findByCourseId($courseId)
    {
        $sql = "SELECT * FROM {$this->table()} WHERE courseId = ? ORDER BY seq ASC";

        return $this->db()->fetchAll($sql, array($courseId));
    }

    public function deleteByCourseId($id)
    {
        return $this->db()->delete($this->table, array('courseId' => $id));
    }

    public function findTimeSlotOccupiedLessonsByCourseId($courseId, $startTime, $endTime, $excludeLessonId = 0)
    {

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。