* @package program * @link http://www.zentao.net */ class programTao extends programModel { /** * 通过项目集ID列表批量获取项目集基本数据。 * Get program base data with program ID array. * * @param array $programIdList * @access protected * @return array */ protected function getBaseDataList(array $programIdList): array { return $this->dao->select('id,name,PM,path,parent,type') ->from(TABLE_PROGRAM) ->where('id')->in($programIdList) ->andWhere('deleted')->eq('0') ->andWhere('type')->eq('program') ->fetchAll('id'); } /** *获取所有根项目集基本数据。 * Get base data of all root programs. * * @access protected * @return array */ protected function getRootProgramList(): array { return $this->dao->select('id,name,PM,path,parent,type') ->from(TABLE_PROGRAM) ->where('parent')->eq('0') ->andWhere('deleted')->eq('0') ->andWhere('type')->eq('program') ->orderBy('order_asc') ->fetchAll(); } }