request->isPost()) { $repo = BillRepository::getInstance(); $keyword = $this->request->param('keyword/s', ''); $page = $this->request->param('page/d', 1); $size = $this->request->param('size/d', 30); $orders = ['id' => 'desc']; $list = $repo->billList($page, $size, $keyword, $startTime, $endTime, $orders); $list['agency_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::agency_money, $startTime, $endTime); $list['admin_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::admin_money, $startTime, $endTime); $list['consumer_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::consumer_money, $startTime, $endTime); return $this->json(0, 'success', $list); } $this->data["agency_money_sum"] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::agency_money); $this->data["admin_money_sum"] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::admin_money); $this->data["consumer_money_sum"] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::consumer_money); $this->data["startTime"] = $startTime; $this->data["endTime"] = $endTime; return $this->view(); } }