diff --git a/Application/Base/Service/MendService.class.php b/Application/Base/Service/MendService.class.php index 40e65b580..0e4692179 100644 --- a/Application/Base/Service/MendService.class.php +++ b/Application/Base/Service/MendService.class.php @@ -39,6 +39,9 @@ class MendService if ($orderTime == '') { throw new \Exception('没有订单日期'); } + if (strtotime($orderTime) > time()) { + throw new \Exception('订单时间不能大于今天'); + } if ($permPromote) { $levelColumn = 'level'. $permPromote['level'] . '_id'; diff --git a/Application/Base/Service/TestingResourceService.class.php b/Application/Base/Service/TestingResourceService.class.php index f1a5e191c..34a5ffb69 100644 --- a/Application/Base/Service/TestingResourceService.class.php +++ b/Application/Base/Service/TestingResourceService.class.php @@ -120,11 +120,12 @@ class TestingResourceService $orderData['provide_status'] = 2; } else { $orderData['provide_status'] = 1; + $provideAmount += $order['amount']; } } else { $orderData['provide_status'] = 1; + $provideAmount += $order['amount']; } - $provideAmount += $order['amount']; $orderData['provide_time'] = time(); M('testing_resource_order', 'tab_') ->where(['id' => $order['id']]) diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index 8681a24af..a79be52b0 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -203,11 +203,15 @@ class HomeController extends Controller $promoteId = $data['promote_id']; } - $promote = M('promote', 'tab_')->field(['id', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find(); + $promote = M('promote', 'tab_')->field(['id', 'account', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find(); if (!$promote) { $this->error('该链接已失效'); } + if ($promote['account'] == 'yl3xiaojian') { + $this->error('链接无效'); + } + $promoteService = new PromoteService(); if (!$promoteService->checkPromoteLimitRule($promote)) { $this->error('链接已失效'); diff --git a/Application/Home/Controller/PackageController.class.php b/Application/Home/Controller/PackageController.class.php index c0d2407bb..97289e22e 100644 --- a/Application/Home/Controller/PackageController.class.php +++ b/Application/Home/Controller/PackageController.class.php @@ -55,11 +55,15 @@ class PackageController extends Controller $promoteId = $data['promote_id']; } - $promote = M('promote', 'tab_')->field(['id', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find(); + $promote = M('promote', 'tab_')->field(['id', 'account', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find(); if (!$promote) { $this->error('该链接已失效'); } + if ($promote['account'] == 'yl3xiaojian') { + $this->error('链接无效'); + } + $promoteService = new PromoteService(); if (!$promoteService->checkPromoteLimitRule($promote)) { $this->error('链接已失效');