public function view_ebayAccountExport() { $start = isset($_GET['start']) ? post_check($_GET['start']) : ''; $end = isset($_GET['end']) ? post_check($_GET['end']) : ''; $account = isset($_GET['account']) ? post_check($_GET['account']) : ''; if (!empty($start) && !empty($end)) { $wheretime = " and CommentTime>'{$start}' and CommentTime>'{$end}' "; } else { $wheretime = ''; } if (!empty($account)) { $whereacc = "and account='{$account}' "; } else { $whereacc = ""; } $feedback = new EbayFeedbackAct(); $resAccount = $feedback->act_accountCount($whereacc, $wheretime); $exporter = new ExportDataExcel("browser", "ebayAccountData_" . date('Y-m-d') . ".xls"); $exporter->initialize(); $exporter->addRow(array('eBay帐号', '好评数', '中评数', '差评数', '差评修改数', '中评修改数', '总评数', '好评率')); foreach ($resAccount as $key => $value) { $countRes = array($key, $value['PositiveRes'], $value['NeutralRes'], $value['NegativeRes'], $value['upNeutralRes'], $value['upNegetiveRes'], $value['total'], $value['per_positive']); $exporter->addRow($countRes); } $exporter->finalize(); exit; }
public function view_ebayFeedbackCount() { $start = isset($_GET['start']) ? post_check($_GET['start']) : ''; $end = isset($_GET['end']) ? post_check($_GET['end']) : ''; $account = isset($_GET['account']) ? post_check($_GET['account']) : ''; $accAct = new AccountAct(); $feedback = new EbayFeedbackAct(); if (!empty($start) && !empty($end)) { $wheretime = " and CommentTime>'{$start}' and CommentTime>'{$end}' "; } else { $wheretime = ''; } if (!empty($account)) { $whereacc = "and account='{$account}' "; } else { $whereacc = ""; } $accountList = $accAct->act_getAccountList('id,account', "where platformId = 1 and token!='' and is_delete = 0"); //$searchAccount = $accAct->act_getAccountList('id,account','where platformId = 1 and is_delete = 0'); $resAccount = $feedback->act_accountCount($whereacc, $wheretime); $this->smarty->assign('secnev', '1'); $this->smarty->assign('accountList', $accountList); $this->smarty->assign("resAccount", $resAccount); //var_dump($resAccount); $this->smarty->display('ebayFeedbackCount.htm'); }