From 629c1c2fd9754c3f3c4f7d07471b930f4d86d8d4 Mon Sep 17 00:00:00 2001 From: tping Date: Fri, 20 Aug 2021 15:02:01 +0800 Subject: [PATCH] =?UTF-8?q?oa=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E6=8A=98?= =?UTF-8?q?=E6=89=A3discoutn=5Famount=20=20=20=E5=B9=B3=E5=8F=B0=E5=B8=81?= =?UTF-8?q?=E6=8A=B5=E6=89=A3=E6=97=B6=E6=8A=98=E6=89=A3=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/Controller/FengHuoApi2Controller.class.php | 2 +- Application/Sdk/Controller/PayH5Controller.class.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Application/Sdk/Controller/FengHuoApi2Controller.class.php b/Application/Sdk/Controller/FengHuoApi2Controller.class.php index cda0862d..bdb264d2 100644 --- a/Application/Sdk/Controller/FengHuoApi2Controller.class.php +++ b/Application/Sdk/Controller/FengHuoApi2Controller.class.php @@ -145,7 +145,7 @@ class FengHuoApi2Controller extends GetInfoBaseController{ $where['is_check'] = 1; $data = M('spend','tab_') - ->field('pay_order_number,promote_account,user_id,game_name,game_player_name,server_name,pay_time,cost,user_account') + ->field('pay_order_number,promote_account,user_id,game_name,game_player_name,server_name,pay_time,cost,user_account,discount_amount') ->where($where) ->order($order) ->page($page, $row) diff --git a/Application/Sdk/Controller/PayH5Controller.class.php b/Application/Sdk/Controller/PayH5Controller.class.php index ce7a0ca3..e0deff91 100644 --- a/Application/Sdk/Controller/PayH5Controller.class.php +++ b/Application/Sdk/Controller/PayH5Controller.class.php @@ -1203,6 +1203,15 @@ class PayH5Controller extends BaseController{ $request['pay_way'] = 0; $request['spend_ip'] = get_client_ip(); $user_entity = get_user_entity($request['user_id']); + $spend = M('spend','tab_')->where(['pay_order_number' => $request['order_id']])->find(); + if ($spend) { + if ($spend['discount_amount'] > 0) { + $discountInfo = discountInfo($request['game_id']); + if (!$discountInfo) { + redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>urlencode('折扣无效,请重试!'), 'user_token' => $this->userToken)));exit; + } + } + } $discount = get_discount($request['game_id'], $request['user_id']); $discount = $discount['discount']; $discountAmount = 0;