From bfc93e062656dd4e39f7b75535f0dff4c85e50d5 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Thu, 9 Jan 2020 20:15:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E4=BC=9A=E5=88=86=E6=88=90=E7=AE=A1?= =?UTF-8?q?=E7=90=86--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PromoteGameRatioController.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/PromoteGameRatioController.class.php b/Application/Admin/Controller/PromoteGameRatioController.class.php index 15b883f5d..ea83a0f00 100644 --- a/Application/Admin/Controller/PromoteGameRatioController.class.php +++ b/Application/Admin/Controller/PromoteGameRatioController.class.php @@ -227,6 +227,8 @@ class PromoteGameRatioController extends ThinkController $this->error('参数异常'); } if ($promoteGameRatio['status'] == -1 || $save['begin_time'] != $promoteGameRatio['begin_time'] || $save['end_time'] != $promoteGameRatio['end_time'] || $save['ratio'] != $promoteGameRatio['ratio'] || $save['remark'] != $promoteGameRatio['remark'] || $save['turnover_ratio'] != $promoteGameRatio['turnover_ratio']) { + $this->isWithdraw($promoteGameRatio['promote_id'], $save['begin_time']); + if ($promoteGameRatio['status'] == 1) { $save['last_turnover_ratio'] = $promoteGameRatio['turnover_ratio']; $save['last_ratio'] = $promoteGameRatio['ratio']; @@ -252,6 +254,8 @@ class PromoteGameRatioController extends ThinkController $this->error('参数异常'); } + $this->isWithdraw($promoteId, $save['begin_time']); + $map['promote_id'] = $promoteId; $map['game_id'] = $gameId; $promoteGameRatio = D(self::MODEL_NAME)->where($map)->find(); @@ -315,11 +319,11 @@ class PromoteGameRatioController extends ThinkController $withdrawMap['promote_id'] = $promoteId; $withdrawMap['status'] = ['neq', -2]; - $withdrawMap['settlement_end_time'] = ['egt', $beginTime]; + $withdrawMap['settlement_begin_time'] = ['egt', $beginTime]; $withdraw = M('withdraw', 'tab_')->where($withdrawMap)->order('create_time desc')->find(); if (!empty($withdraw) && $withdraw['status'] != -2) { - $time = date('Y-m-d', $withdraw['create_time']); - $this->error("{$time}之前的订单已经申请提现, 无法变更分成比例,请重新选择开始时间"); + $time = date('Y-m', $beginTime); + $this->error("{$time}月已有订单申请提现, 无法变更分成比例,请重新选择开始时间"); } }