From 9670bf86b6d444dd5d96eb2fe9aabaa9be09127a Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 28 Jul 2020 10:27:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E6=88=B7bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 24 +++++++++++++++++++ .../PayMerchantController.class.php | 12 +++++++--- .../Controller/SpendController.class.php | 5 ++++ .../Controller/TestOrderController.class.php | 8 +++++++ Application/Admin/View/Spend/lists.html | 11 +++++++++ .../Admin/View/TestOrder/addOrder.html | 11 +++++++++ 6 files changed, 68 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 9a50e64d0..a0971e61d 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2878,3 +2878,27 @@ function getCpCompanySelect($type = 1){ return $data; } + +/** + * 回去商户列表 + * @return mixed + */ +function getMerchantList($type = 1){ + + $data = M("payment_merchant","tab_")->field("id,name")->select(); + + return $data; +} + + +/** + * 回去商户列表 + * @param $type 1 渠道 2 包名获取 + * @return mixed + */ +function getMerchantName($id = 1){ + + $data = M("payment_merchant","tab_")->field("name")->where(['id'=>$id])->find(); + + return $data['name']?$data['name']:'无'; +} \ No newline at end of file diff --git a/Application/Admin/Controller/PayMerchantController.class.php b/Application/Admin/Controller/PayMerchantController.class.php index 885c6ad46..912c76ddb 100644 --- a/Application/Admin/Controller/PayMerchantController.class.php +++ b/Application/Admin/Controller/PayMerchantController.class.php @@ -157,9 +157,6 @@ class PayMerchantController extends ThinkController ->select(); } -// var_dump($data);die(); - - $count = M()->table("({$sql})a") ->field("merchant_id") ->page($p, $row) @@ -183,6 +180,15 @@ class PayMerchantController extends ThinkController // ->where($map) ->find(); + $sum['cash_amount'] = round ($sum['cash_amount'],2); + $sum['test_amount'] = round ($sum['test_amount'],2); + $sum['coin_amount'] = round ($sum['coin_amount'],2); + $sum['offcial_amount'] = round ($sum['offcial_amount'],2); + $sum['spread_amount'] = round ($sum['spread_amount'],2); + $sum['offcial_amount'] = round ($sum['supersign_amount'],2); + $sum['spread_amount'] = round ($sum['test_order_amount'],2); + + $sum['sum'] = $sum['cash_amount']+$sum['test_amount']+$sum['coin_amount']+$sum['offcial_amount'] +$sum['spread_amount']+$sum['supersign_amount']+$sum['test_order_amount']; diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php index fc537e30a..46ca35e49 100644 --- a/Application/Admin/Controller/SpendController.class.php +++ b/Application/Admin/Controller/SpendController.class.php @@ -72,6 +72,11 @@ class SpendController extends ThinkController unset($_REQUEST['pay_game_status']); } + if (isset($_REQUEST['merchant_id'])) { + $map['merchant_id'] = $_REQUEST['merchant_id']; + unset($_REQUEST['merchant_id']); + } + $marketAdminId = 0; $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { diff --git a/Application/Admin/Controller/TestOrderController.class.php b/Application/Admin/Controller/TestOrderController.class.php index 0141a6507..f8fc41845 100644 --- a/Application/Admin/Controller/TestOrderController.class.php +++ b/Application/Admin/Controller/TestOrderController.class.php @@ -91,6 +91,14 @@ class TestOrderController extends ThinkController $this->ajaxReturn(['status'=>0,'msg'=>'订单重复录入']); } + if ($data['pay_way'] == 1) { + $data['merchant_way'] = 1; + } else if($data['pay_way'] == 2||$data['pay_way'] == 3) { + $data['merchant_way'] = 2; + } else { + $data['merchant_way'] = 4; + } + $isSuccess = M('test_order','tab_')->add($data); if ($isSuccess) { diff --git a/Application/Admin/View/Spend/lists.html b/Application/Admin/View/Spend/lists.html index d2a73e5be..9eb4df397 100644 --- a/Application/Admin/View/Spend/lists.html +++ b/Application/Admin/View/Spend/lists.html @@ -131,7 +131,16 @@ + +
+ +
@@ -162,6 +171,7 @@ 游戏名称 所属推广员 所属市场专员 + 所属商户 充值ip 区服ID 游戏区服 @@ -227,6 +237,7 @@ {$data.market_admin_username} + {:getMerchantName($data['merchant_id'])} {$data.spend_ip} — — diff --git a/Application/Admin/View/TestOrder/addOrder.html b/Application/Admin/View/TestOrder/addOrder.html index 0f523d22e..5d717716f 100644 --- a/Application/Admin/View/TestOrder/addOrder.html +++ b/Application/Admin/View/TestOrder/addOrder.html @@ -151,6 +151,17 @@ + + 充值方式: + + + + + 充值时间: