diff --git a/Application/Admin/Controller/FinancialSummaryController.class.php b/Application/Admin/Controller/FinancialSummaryController.class.php index 381f8bc09..bd39dac4f 100644 --- a/Application/Admin/Controller/FinancialSummaryController.class.php +++ b/Application/Admin/Controller/FinancialSummaryController.class.php @@ -4,8 +4,8 @@ class FinancialSummaryController extends AdminController { public $keyname=array( "cash_spend"=>"现金充值收入", - "balance_coin_spend"=>"平台币充值收入", - "balance_coin_income"=>"平台币消耗", + "balance_coin_spend"=>"平台币消耗", + "balance_coin_income"=>"平台币充值收入", "game_supersign_income"=>"超级签购买收入", "test_user_income"=>"测试收入", "reward_count"=>"奖励", diff --git a/Application/Admin/Controller/FinancialSummarySetController.class.php b/Application/Admin/Controller/FinancialSummarySetController.class.php index 6d08cb495..2f49c500a 100644 --- a/Application/Admin/Controller/FinancialSummarySetController.class.php +++ b/Application/Admin/Controller/FinancialSummarySetController.class.php @@ -414,8 +414,8 @@ class FinancialSummarySetController extends \Think\Controller ") ->where($map) ->find(); - $moneyarry['wx'] += $dbres['wx_count']; - $moneyarry['gfzfb'] += $dbres['zfb_count']; + $moneyarry['wx'] += $dbres['wx_count']*100; + $moneyarry['gfzfb'] += $dbres['zfb_count']*100; } //玩家购买平台币 protected function getDepositPayWay(&$moneyarry) @@ -454,8 +454,8 @@ class FinancialSummarySetController extends \Think\Controller ") ->where($map) ->find(); - $moneyarry['wx'] += $dbres['wx_count']; - $moneyarry['gfzfb'] += $dbres['zfb_count']; + $moneyarry['wx'] += $dbres['wx_count']*100; + $moneyarry['gfzfb'] += $dbres['zfb_count']*100; } public function addDb() { diff --git a/Application/Admin/Controller/ToolController.class.php b/Application/Admin/Controller/ToolController.class.php index 37968f32b..6973bfc81 100644 --- a/Application/Admin/Controller/ToolController.class.php +++ b/Application/Admin/Controller/ToolController.class.php @@ -16,6 +16,17 @@ class ToolController extends ThinkController { $config = I('config'); $data = array('config'=>json_encode($config),'template'=>$_POST['template'],'status'=>$_POST['status']); $map['name']=$name; + + $day_pay = $config['day_pay_limit']; + $month_pay = $config['month_pay_limit']; + if(!empty($day_pay) && !empty($month_pay)) { + if($month_pay / date('t') > $day_pay) { + $this->error('月支付限量较日支付限量过大'); + } elseif ($month_pay < $day_pay) { + $this->error('月支付限量不能小于日支付限量'); + } + } + if($_POST['status']==1&&$name=="weixin"){ $map_['name']=array("in",'wei_xin,wei_xin_app,weixin_gf'); M('tool','tab_')->where($map_)->setField('status','0'); diff --git a/Application/Admin/View/StatementMangement/rewardManageSave.html b/Application/Admin/View/StatementMangement/rewardManageSave.html index 7c86ec66b..885bb6c85 100644 --- a/Application/Admin/View/StatementMangement/rewardManageSave.html +++ b/Application/Admin/View/StatementMangement/rewardManageSave.html @@ -25,7 +25,7 @@ @@ -62,22 +62,28 @@ charset="UTF-8">
+ class="form-horizontal form_info_ml" id="form">
奖惩编辑
- -
- -
- - -
- 已添加添加至常用设置 -
- + +
+ +
+ + +
+ 已添加添加至常用设置 +
+ \ No newline at end of file diff --git a/Application/Admin/View/Tool/payset.html b/Application/Admin/View/Tool/payset.html index 803572aa8..352ea0fd4 100644 --- a/Application/Admin/View/Tool/payset.html +++ b/Application/Admin/View/Tool/payset.html @@ -243,6 +243,33 @@ 控制SDK内的支付宝支付方式,默认是APP支付,当选择WAP支付时,在SDK支付页面选择“支付宝”进行付款时,采用支付宝的WAP支付 + + + 日支付限量 + + + + + + 当额度达到限制额度时,隐藏支付方式 + + + + + + + + 月支付限量 + + + + + + 当额度达到限制额度时,隐藏支付方式 + + + + @@ -348,6 +375,36 @@ + + + + 日支付限量 + + + + + + 当额度达到限制额度时,隐藏支付方式 + + + + + + + + 月支付限量 + + + + + + 当额度达到限制额度时,隐藏支付方式 + + + + + + 启用状态 @@ -453,6 +510,8 @@ + + 启用状态 @@ -1363,7 +1422,33 @@ - + + + 日支付限量 + + + + + + 当额度达到限制额度时,隐藏支付方式 + + + + + + + + 月支付限量 + + + + + + 当额度达到限制额度时,隐藏支付方式 + + + + @@ -1467,6 +1552,34 @@ + + + 日支付限量 + + + + + + 当额度达到限制额度时,隐藏支付方式 + + + + + + + + 月支付限量 + + + + + + 当额度达到限制额度时,隐藏支付方式 + + + + + 启用状态 diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index dc8be7cc6..6595b95ab 100644 --- a/Application/Base/Service/PromoteService.class.php +++ b/Application/Base/Service/PromoteService.class.php @@ -1015,7 +1015,7 @@ class PromoteService { if (!$record) { return false; } - if ($record['status'] != 1) { + if (!in_array($record['status'], [1, 2])) { return false; } } diff --git a/Application/Home/Controller/ApplyController.class.php b/Application/Home/Controller/ApplyController.class.php index ed99d068b..c7cf38695 100644 --- a/Application/Home/Controller/ApplyController.class.php +++ b/Application/Home/Controller/ApplyController.class.php @@ -132,6 +132,15 @@ class ApplyController extends BaseController } } break; + case 0: + $applyService = new ApplyService(); + $gameIdList = $applyService->getSociatyGameIds($loginPromote); + if (count($gameIdList) > 0) { + $gameIds = implode(',', $gameIdList); + $map['tab_game.id'] = ['in', $gameIds]; + } else { + $map = '1 = 2'; + } } $page = intval(I('get.p', 0)); @@ -615,8 +624,13 @@ class ApplyController extends BaseController $promoteId = $_REQUEST['promote_id']; } + $applyService = new ApplyService(); + $gameIdList = $applyService->getSociatyGameIds($loginPromote); + $applyMap['promote_id'] = $promoteId; $applyMap['offline_status'] = 0; + $applyMap['game_id'] = ['in', $gameIdList]; + $gameIds = M('Apply', 'tab_')->where($applyMap)->getField('game_id', true); $gameIds = implode(',', $gameIds); @@ -1795,7 +1809,7 @@ class ApplyController extends BaseController $promoteId = $promote['id']; } $apply = M('apply', 'tab_')->where(['promote_id' => $promoteId, 'game_id' => $gameId])->find(); - $game = M('game', 'tab_')->field(['icon'])->where(['id' => $gameId])->find(); + $game = M('game', 'tab_')->field(['id', 'icon', 'apply_auth'])->where(['id' => $gameId])->find(); if ($apply == null) { $this->ajaxReturn([ 'status' => 0, @@ -1805,6 +1819,16 @@ class ApplyController extends BaseController ]); } + $applyService = new ApplyService(); + if (!$applyService->checkSociatyPerm($promote, $game)) { + $this->ajaxReturn([ + 'status' => 0, + 'message' => '该游戏未授权', + 'data' => [ + ] + ]); + } + $promoteService = new PromoteService(); if (!$promoteService->canPresidentApplyGame($promote)) { $this->ajaxReturn([ @@ -1817,7 +1841,6 @@ class ApplyController extends BaseController $icon = Request::getHost() . '/' . get_cover($game['icon'], 'path'); - $applyService = new ApplyService(); $result = $applyService->checkApplyStatus($apply); if (!$result['status']) { $this->ajaxReturn([ @@ -1847,7 +1870,8 @@ class ApplyController extends BaseController } $apply = M('apply', 'tab_')->where(['promote_id' => $promoteId, 'game_id' => $gameId])->find(); - $game = M('game', 'tab_')->field(['icon'])->where(['id' => $gameId])->find(); + $game = M('game', 'tab_')->field(['icon', 'apply_auth', 'id'])->where(['id' => $gameId])->find(); + if ($apply == null) { $this->ajaxReturn([ 'status' => 1, @@ -1857,6 +1881,16 @@ class ApplyController extends BaseController ]); } + $applyService = new ApplyService(); + if (!$applyService->checkSociatyPerm($promote, $game)) { + $this->ajaxReturn([ + 'status' => 0, + 'message' => '该游戏未授权', + 'data' => [ + ] + ]); + } + $promoteService = new PromoteService(); if (!$promoteService->canPresidentApplyGame($promote)) { $this->ajaxReturn([ @@ -1869,7 +1903,6 @@ class ApplyController extends BaseController $icon = Request::getHost() . '/' . get_cover($game['icon'], 'path'); - $applyService = new ApplyService(); $result = $applyService->checkApplyStatus($apply); if (!$result['status']) { $this->ajaxReturn([