PlanModel.class.php 777 Bytes
<?php
/**
 * 培训计划表Model
 * Created by PhpStorm.
 */

namespace Common\Model;


class PlanModel extends AbstractModel
{
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * 获取被使用的应用id集合
     *
     * @param int $plan_type 应用类型
     *
     * @return array 被使用的id集合
     */
    public function get_obj_ids($plan_type)
    {

        // 类型
        if ($plan_type) {

            $where[] = 'plan_type=?';
            $params[] = $plan_type;
        }

        // 企业标识
        $where[] = 'domain=?';
        $params[] = QY_DOMAIN;

        $sql = 'SELECT plan_obj_id FROM __TABLE__ WHERE ' . implode(' AND ', $where);

        return $this->_m->fetch_array($sql, $params);
    }
}