From d31f5c8691be8ac160ca8e156caabe7e677859a1 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 24 Mar 2020 15:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=8D=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/ToolController.class.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/ToolController.class.php b/Application/Admin/Controller/ToolController.class.php index 7b9c19780..a567dc2c4 100644 --- a/Application/Admin/Controller/ToolController.class.php +++ b/Application/Admin/Controller/ToolController.class.php @@ -921,7 +921,7 @@ class ToolController extends ThinkController { $parameter['pay_type'] = $payType; } - if (!empty($limit_type)) { + if (!empty($limit_type)) { $map['limit_type'] = $limit_type; $parameter['limit_type'] = $limit_type; } @@ -981,7 +981,7 @@ class ToolController extends ThinkController { } } if ($data['limit_type'] == 'force') { - $datas[$key]['limit_type'] = '强制模式'; + $datas[$key]['limit_type'] = '强制限制'; } if ($data['limit_type'] == 'obstacles') { $datas[$key]['limit_type'] = '支付体验障碍'; @@ -1064,7 +1064,10 @@ class ToolController extends ThinkController { return $this->error('限额不能为空'); } if (!is_numeric($total_limit) || !is_numeric($user_total_limit) || !is_numeric($user_one_limit) || $total_limit < 0 ||$user_total_limit < 0 ||$user_one_limit < 0 ) { - return $this->error('限额金额出错'); + return $this->error('限制金额出错'); + } + if (intval($total_limit) > 1000000000000.00 || intval($user_total_limit) > 1000000000000.00 ||intval($user_one_limit) > 1000000000000.00) { + return $this->error('限制金额超出范围'); } if (empty($limit_type)) { return $this->error('限制方式不能为空'); @@ -1204,6 +1207,9 @@ class ToolController extends ThinkController { if (empty($id)) { return $this->error('编辑信息出错'); } + if (intval($total_limit) > 1000000000000.00 || intval($user_total_limit) > 1000000000000.00 ||intval($user_one_limit) > 1000000000000.00) { + return $this->error('限制金额超出范围'); + } $confInfo = M('pay_limit_conf', 'tab_')->where(['id'=>$id])->find(); $confInfo['pay_type'] = $pay_type;