From 860486291f08a989f5ce7d66257bb2605897571c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Thu, 4 Feb 2021 15:23:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E9=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/order/controller/FinanceCheck.php | 35 ++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/app/order/controller/FinanceCheck.php b/app/order/controller/FinanceCheck.php index a24538a..b14950c 100644 --- a/app/order/controller/FinanceCheck.php +++ b/app/order/controller/FinanceCheck.php @@ -99,13 +99,46 @@ class FinanceCheck extends Controller public function buyiList() { + $where = []; + $where2 = ''; $page = 0; if (isset($_GET['page'])) { $page = ($_GET['page'] - 1) * 50; } + $product_ids = [ + '8' => 'xingxing', + '6' => 'xianfeng', + '13' => 'jike', + '1' => 'qiangzi', + '2' => 'xunlian', + '14' => 'tiantian', + '5' => 'laoying', + '4' => 'jinrui', + '7' => 'wujin', + '9' => 'wanmei', + '3' => 'jinqiao', + '10' => 'wuxian', + '16' => 'shihui', + '15' => 'gongxiang', + ]; + + if (!empty($_GET['ProductId'])){ + $where['product'] = $product_ids[$_GET['ProductId']]; + } + if (!empty($_GET['type'])){ + $where['type'] = $_GET['type']; + } + if (!empty($_GET['Btime'])){ + $date1 = date('Y-m-d', strtotime($_GET['Btime'])); + $date2 = date('Y-m-d', strtotime($_GET['Etime'])); + $where2 .= " riqi>='" . $date1 . "' and riqi<='" . $date2 . "' "; + } + + // dump($_GET);die; + $finance_model = new FinanceOperationModel; - $list = $finance_model->getListPage([], '*', 'id desc', "$page,50"); + $list = $finance_model->getListSearch($where, $where2,'*', 'id desc', "$page,50"); $types = ['充值', '退款', '补差价']; $products = [ 'xingxing' => '星星',