From 76a427d38c8655dcbdc72ebb7e009f7756c78dc0 Mon Sep 17 00:00:00 2001 From: lyt Date: Mon, 23 Sep 2019 17:23:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20PayPal=E5=AF=BC=E5=87=BA=E6=94=B6?= =?UTF-8?q?=E6=AC=BE=E8=AE=B0=E5=BD=95:=20=E5=85=88=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E5=B8=81=E7=A7=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/paypal/controllers/index.php | 7 +++ .../third_party/paypal/models/note_model.php | 5 +- webht/third_party/paypal/views/note_list.php | 63 +++++++++++++------ 3 files changed, 55 insertions(+), 20 deletions(-) diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 1e7dd6d6..343f558a 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -1321,6 +1321,13 @@ class Index extends CI_Controller { echo json_encode('没找到数据!'); } + public function get_export_record_currency($currency) + { + // $currency = $this->input->get_post('currency'); + $records = $this->Note_model->list_export_record(0, $currency); + return $this->output->set_content_type('application/json')->set_output(json_encode($records)); + } + public function export_list() { $from_date = $this->input->post("from_date"); diff --git a/webht/third_party/paypal/models/note_model.php b/webht/third_party/paypal/models/note_model.php index 109bad65..c601f348 100644 --- a/webht/third_party/paypal/models/note_model.php +++ b/webht/third_party/paypal/models/note_model.php @@ -185,10 +185,11 @@ class Note_model extends CI_Model { $this->info->insert('Transaction_Export_Log', $db); } - public function list_export_record($sn=0) + public function list_export_record($sn=0, $currency=null) { $this->info = $this->load->database('INFO', TRUE); - $search_sql = $sn===0 ? "" : " and TEL_SN=$sn "; + $search_sql = $sn===0 ? "" : " AND TEL_SN=$sn "; + $search_sql .= $currency===null ? "" : " AND TEL_transactionCurrency='" . $currency . "'"; $sql = "SELECT TOP 10 * FROM [InfoManager].[dbo].[Transaction_Export_Log] WHERE 1=1 diff --git a/webht/third_party/paypal/views/note_list.php b/webht/third_party/paypal/views/note_list.php index c40e675e..f599f74a 100644 --- a/webht/third_party/paypal/views/note_list.php +++ b/webht/third_party/paypal/views/note_list.php @@ -65,6 +65,23 @@