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; }