/** * 查询推广计划方法(调用处构造查询条件、查询参数、查询方式、是否使用缓存、缓存时间) * @param $p_strCondition * @param $p_arrParams * @param string $p_strExeType * @param bool $p_bolRefreshCache * @return mix */ public function getSpreadPlanInfo($p_strCondition, $p_arrParams, $p_strExeType = 'getList', $p_bolRefreshCache = false) { $cnt = count(explode('?', $p_strCondition)); if (!$p_strCondition || !$p_arrParams || $cnt - 1 != count($p_arrParams) || empty($p_strCondition) || empty($p_arrParams)) { return false; } $objORM = new ORM_ArkORM('ajk_propspread'); //$arrMemKey = array('con'=>$p_strCondition,'p'=>$p_arrParams,'exe'=>$p_strExeType); //$bolSetCache = false; /*if(!$p_bolRefreshCache){ $rstData = parent::getCache('getSpreadPlanInfo',$arrMemKey); }else{ parent::clearCache('getSpreadPlanInfo',$arrMemKey); }*/ switch ($p_strExeType) { case 'getRow': $objORM->ID = $p_arrParams[0]; $rstData = $objORM->getRow($p_bolRefreshCache); break; case 'getCnt': $rstData = $objORM->getCnt($p_strCondition, $p_arrParams, $p_bolRefreshCache); break; /*case 'executeSQL_ONE': $bolSetCache = true; $rstData = $objORM->executeSQL($p_strCondition,$p_arrParams,'ONE'); break; case 'executeSQL_ROW': $bolSetCache = true; $rstData = $objORM->executeSQL($p_strCondition,$p_arrParams,'ROW'); break;*/ /*case 'executeSQL_ONE': $bolSetCache = true; $rstData = $objORM->executeSQL($p_strCondition,$p_arrParams,'ONE'); break; case 'executeSQL_ROW': $bolSetCache = true; $rstData = $objORM->executeSQL($p_strCondition,$p_arrParams,'ROW'); break;*/ case 'executeSQL_ALL': //$bolSetCache = true; $rstData = $objORM->executeSQL($p_strCondition, $p_arrParams, 'ALL'); break; case 'getList': default: $rstData = $objORM->getList($p_strCondition, $p_arrParams, $p_bolRefreshCache); break; } return $rstData; }