From 773ffb516028cf517d42e077a3fb83b9383347e3 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Sat, 9 Nov 2019 14:55:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0->=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E7=BC=96=E8=BE=91--=E6=9B=B4=E6=96=B0=E6=8E=A8?= =?UTF-8?q?=E5=B9=BF=E5=85=85=E5=80=BCCPS=E6=AF=94=E4=BE=8B=E6=97=B6?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=9C=AA=E6=8F=90=E7=8E=B0=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E5=88=86=E6=88=90=E6=AF=94=E4=BE=8B=20=E6=8E=A8?= =?UTF-8?q?=E5=B9=BF=E5=B9=B3=E5=8F=B0->=E6=95=B0=E6=8D=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86->=E6=AF=8F=E6=97=A5=E6=A6=82=E5=86=B5|=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=B1=87=E6=80=BB--=E6=A3=80=E7=B4=A2=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E9=97=B4=E9=9A=94=E8=B0=83=E6=95=B4=E4=B8=BA31?= =?UTF-8?q?=E5=A4=A9=20=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->=E8=B4=A2?= =?UTF-8?q?=E5=8A=A1=E7=AE=A1=E7=90=86->=E7=BB=93=E7=AE=97=E4=B8=AD?= =?UTF-8?q?=E5=BF=83->=E6=8F=90=E7=8E=B0--=E6=9D=83=E9=99=90=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/GameController.class.php | 27 +++++++++++++------ .../Controller/FinanceController.class.php | 6 +++++ .../Home/Controller/QueryController.class.php | 4 +-- .../Home/View/default/Query/dailySummary.html | 4 +-- .../Home/View/default/Query/summary.html | 4 +-- 5 files changed, 31 insertions(+), 14 deletions(-) diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index bc58973ab..ea5822322 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -184,14 +184,14 @@ class GameController extends ThinkController } else { $_POST['display_site'] = ''; } - + $content = $_POST['content']; - if(!empty($content)) { + if (!empty($content)) { $_POST['detail_content'] = $content; } else { $_POST['detail_content'] = ''; } - + $pinyin = new \Think\Pinyin(); $num = mb_strlen($_POST['game_name'], 'UTF8'); @@ -301,6 +301,7 @@ class GameController extends ThinkController $_POST['display_site'] = ''; } $content = $_POST['content']; + $gameRatio = M('Game', 'tab_')->where(array('id' => I('post.id', 0)))->getField('ratio');//游戏推广分成比例 $game = D(self::model_name);//M('$this->$model_name','tab_'); $_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount']; $_POST['detail_content'] = $content; @@ -348,7 +349,17 @@ class GameController extends ThinkController $this->error($game->getError()); } else { \Think\Log::actionLog('Game/edit', 'Game', 1); - $this->success($res['id'] ? '更新成功' : '新增成功', U('lists', array('type' => I('post.type'), 'p' => I('request.p')))); + $thisGameRatio = I('post.ratio', 0); + if ($gameRatio != $thisGameRatio) { + $spendRes = M('Spend', 'tab_')->where(array('game_id' => $id, 'pay_status' => 1, 'selle_status' => 0))->save(array('selle_ratio' => $thisGameRatio)); + if ($spendRes === false) { + $this->error('更新成功,推广充值分成比例同步失败'); + } else { + $this->success($res['id'] ? '更新成功' : '新增成功', U('lists', array('type' => I('post.type'), 'p' => I('request.p')))); + } + } else { + $this->success($res['id'] ? '更新成功' : '新增成功', U('lists', array('type' => I('post.type'), 'p' => I('request.p')))); + } } } else { @@ -369,15 +380,15 @@ class GameController extends ThinkController } if (!empty($data['screenshot'])) { $data['screenshot_data'] = explode(',', $data['screenshot']); - + } if (!empty($data['cover'])) { $data['cover_data'] = explode(',', $data['cover']); - + } - if (!empty($data['icon'])) { + if (!empty($data['icon'])) { $data['icon_data'] = explode(',', $data['icon']); - + } $data['introduction'] = str_replace("~~", "\r\n", $data['introduction']); diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index d1b1d7bf0..1fd08d16f 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -257,6 +257,12 @@ class FinanceController extends BaseController $this->ajaxReturn($data); } + if ($this->loginPromote['ver_status'] != 1) { + $data['status'] = 0; + $data['msg'] = '未通过资质认证审核,暂时无法提现'; + $this->ajaxReturn($data); + } + $spendModel = M('spend', 'tab_'); $thisDay = strtotime(date('Y-m-d')); diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index d30ee8a4f..c73166fe7 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1088,7 +1088,7 @@ class QueryController extends BaseController $params['dayList'] = $dayList; $records = []; - if (intval($endTime - $begTime) / (24 * 3600) <= 30) { + if (intval($endTime - $begTime) / (24 * 3600) <= 31) { $userRepository = new UserRepository(); $spendRepository = new SpendRepository(); $roleNumList = $userRepository->getCreateRoleCountByDay($params);//创角数 @@ -1282,7 +1282,7 @@ class QueryController extends BaseController $allData['spend_discount'] = 0; $allData['spend_voucher'] = 0; if (!empty($data)) { - if (intval($endTime - $begTime) / (24 * 3600) <= 30) { + if (intval($endTime - $begTime) / (24 * 3600) <= 31) { $gameIds = []; foreach ($data as $list) { $gameIds[] = $list['game_id']; diff --git a/Application/Home/View/default/Query/dailySummary.html b/Application/Home/View/default/Query/dailySummary.html index be57f8819..27376ab40 100644 --- a/Application/Home/View/default/Query/dailySummary.html +++ b/Application/Home/View/default/Query/dailySummary.html @@ -539,8 +539,8 @@ return false; } - if ((edate - sdate) > 2505600) { - layer.msg('时间间隔不能超过30天,请重新选择日期'); + if ((edate - sdate) > 2592000) { + layer.msg('时间间隔不能超过31天,请重新选择日期'); return false; } diff --git a/Application/Home/View/default/Query/summary.html b/Application/Home/View/default/Query/summary.html index 5ac05367a..a59e9145a 100644 --- a/Application/Home/View/default/Query/summary.html +++ b/Application/Home/View/default/Query/summary.html @@ -312,8 +312,8 @@ layer.msg('开始时间必须小于等于结束时间'); return false; } - if ((edate - sdate) > 2505600) { - layer.msg('时间间隔不能超过30天,请重新选择日期'); + if ((edate - sdate) > 2592000) { + layer.msg('时间间隔不能超过31天,请重新选择日期'); return false; }