public function getConvAction($conv_root_ids, $isshow_relation_static_trend = false) { //取出每个根会话 $sqlwherein = array(); $params = array(); $sqlwherein[] = '?'; $params[] = '###'; for ($i = 0; $i < count($conv_root_ids); $i++) { $sqlwherein[] = '?'; $params[] = (string) $conv_root_ids[$i]; } $sqlwhereinstr = join(',', $sqlwherein); $da = $this->get('we_data_access'); $sql = "select a.conv_id, a.conv_type_id, b.template_controller \nfrom we_conv_template b,we_convers_list a \nwhere a.conv_type_id=b.conv_type_id\n and a.conv_id in ({$sqlwhereinstr})\norder by a.post_date desc"; $ds = $da->GetData("we_convers_list", $sql, $params); $tmpArr = array("we_convers_list" => array("rows" => array())); if ($isshow_relation_static_trend) { $tmp = new \Justsy\BaseBundle\Management\StaticTrendMgr($da, null); $list = $tmp->GetStaticRelationTrend(); for ($i = 0; $i < count($list); $i++) { //$sql += " union select '".$list[$i]["info_id"]."' conv_id, '00' conv_type_id, 'JustsyBaseBundle:CDisplayArea:getTrend' template_controller "; $ds["we_convers_list"]["rows"][] = array("conv_id" => $list[$i]["info_id"], "conv_type_id" => "00", "template_controller" => "JustsyBaseBundle:CDisplayArea:getTrend"); } } $trend = $this->getRequest()->get("trend"); return $this->render('JustsyBaseBundle:CDisplayArea:index.html.twig', array('we_convers_list' => $ds["we_convers_list"]["rows"], 'trend' => $trend)); }