PlanModel.class.php
777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?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);
}
}