diff --git a/Application/Admin/Conf/config.php b/Application/Admin/Conf/config.php index 62f5a797c..6c0807fa0 100644 --- a/Application/Admin/Conf/config.php +++ b/Application/Admin/Conf/config.php @@ -19,6 +19,11 @@ return array( 'GET_INFO_KEY' => 'wmkjtx_kj213', + 'OA' => array( + 'testUrl' => 'http://oa.76ba.com', + 'formalUrl' => 'http://oa.76ba.com', + ), + /* 文件上传相关配置 */ 'DOWNLOAD_UPLOAD' => array( 'mimes' => '', //允许上传的文件MiMe类型 diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php index 21da2b965..a3a75f42a 100644 --- a/Application/Admin/Controller/AutoController.class.php +++ b/Application/Admin/Controller/AutoController.class.php @@ -891,9 +891,13 @@ public function auto_rrdae(){ } //根据时间统计玩家充值 - public function userPlayDataCount() + public function userPlayDataCount($time = '') { - $time = strtotime(date('Y-m-d 00:00:00', time() - (3600 * 24))); + if ($time == '') { + $time = strtotime(date('Y-m-d 00:00:00', time() - (3600 * 24))); + } else { + $time = strtotime(date('Y-m-d 00:00:00', strtotime($time))); + } $res = M('user_play_data_count', 'tab_')->where(array('create_time' => $time))->find(); if (empty($res)) { $map['pay_time'] = ['between', [$time, strtotime(date('Y-m-d 23:59:59', $time))]]; diff --git a/Application/Admin/Controller/ConsoleController.class.php b/Application/Admin/Controller/ConsoleController.class.php index 4001dfba5..602063e05 100644 --- a/Application/Admin/Controller/ConsoleController.class.php +++ b/Application/Admin/Controller/ConsoleController.class.php @@ -140,7 +140,7 @@ class ConsoleController extends Think { public function deleteRepeatUserPlayInfo() { - $gameIds = [157, 155, 153, 150, 151, 148, 175, 142, 143, 172, 173, 155, 154]; + $gameIds = [157, 155, 153, 150, 151, 148, 175, 142, 143, 172, 173, 155, 154, 180]; foreach($gameIds as $gameId) { $this->doDeleteRepeatUserPlayInfo($gameId); } @@ -194,7 +194,7 @@ class ConsoleController extends Think { public function deleteRepeatUserPlayInfo2() { - $gameIds = [157, 148, 150, 151, 158, 175, 142, 143, 172, 173, 154, 155, 176, 165, 164, 179, 156, 153]; + $gameIds = [157, 148, 150, 151, 158, 175, 142, 143, 172, 173, 154, 155, 176, 165, 164, 179, 156, 153, 180]; foreach ($gameIds as $gameId) { $this->doDeleteRepeatUserPlayInfo2($gameId); } @@ -245,4 +245,22 @@ class ConsoleController extends Think { } } } + + public function resetIndexChart() + { + for ($i=1; $i<100; $i++) { + $item = M('index_chart', 'tab_')->where(['id' => $i])->find(); + if ($item) { + $item['new_user_hours'] = json_encode(unserialize($item['new_user_hours'])); + $item['active_user_hours'] = json_encode(unserialize($item['active_user_hours'])); + $item['active_user_list'] = json_encode(unserialize($item['active_user_list'])); + $item['pay_user_hours'] = json_encode(unserialize($item['pay_user_hours'])); + $item['pay_user_list'] = json_encode(unserialize($item['pay_user_list'])); + $item['pay_money_hours'] = json_encode(unserialize($item['pay_money_hours'])); + $item['promote_new_hours'] = json_encode(unserialize($item['promote_new_hours'])); + $item['all_count'] = json_encode(unserialize($item['all_count'])); + M("index_chart_1", "tab_")->add($item); + } + } + } } diff --git a/Application/Admin/Controller/DeductBindRecordController.class.php b/Application/Admin/Controller/DeductBindRecordController.class.php index f0534ea09..02236b4e2 100644 --- a/Application/Admin/Controller/DeductBindRecordController.class.php +++ b/Application/Admin/Controller/DeductBindRecordController.class.php @@ -41,6 +41,8 @@ class DeductBindRecordController extends ThinkController { public function deductBindBalance(){ if(IS_POST){ + $_REQUEST['user_id'] = (M('user','tab_')->field('id')->where(['account'=>$_REQUEST['user_id']])->find())['id']; + if(!isset($_REQUEST['user_id']) || $_REQUEST['user_id']<1){ $this->error("请选择账号"); } diff --git a/Application/Admin/Controller/IndexController.class.php b/Application/Admin/Controller/IndexController.class.php index f779e3c5f..8a47b995f 100644 --- a/Application/Admin/Controller/IndexController.class.php +++ b/Application/Admin/Controller/IndexController.class.php @@ -260,14 +260,24 @@ class IndexController extends AdminController { $count1 = array(); $active_user_list = []; $pay_user_list = []; - $dbdata = M("IndexChart","tab_")->field("new_user_count,active_user_count,active_user_list,pay_user_count,pay_user_list,pay_money_count,promote_new_count") - ->where($map)->select(); + $dbdata = M("IndexChart","tab_")->field("FROM_UNIXTIME(`date`, '%Y-%m-%d') as time,new_user_count,active_user_count,active_user_list,pay_user_count,pay_user_list,pay_money_count,promote_new_count") + ->where($map) + ->group("time") + ->select(); + //替换数据 + $temparr = array(); + for ($i=0; $i < count($datelist); $i++) { + $temparr[$datelist[$i]]['news'] = 0; + $temparr[$datelist[$i]]['active'] = 0; + $temparr[$datelist[$i]]['player'] = 0; + $temparr[$datelist[$i]]['money'] = 0; + } foreach($dbdata as $k => $v) { - $data['news'][$k] = $v['new_user_count']; - $data['active'][$k] = $v['active_user_count']; - $data['player'][$k] = $v['pay_user_count']; - $data['money'][$k] = $v['pay_money_count']; + $temparr[$v['time']]['news'] =$v['new_user_count']; + $temparr[$v['time']]['active'] =$v['active_user_count']; + $temparr[$v['time']]['player'] =$v['pay_user_count']; + $temparr[$v['time']]['money'] =$v['pay_money_count']; $active_user_list += json_decode($v['active_user_list'],true); unset($v['active_user_list']); unset($dbdata[$k]['active_user_list']); @@ -278,6 +288,14 @@ class IndexController extends AdminController { $count1['pay_money_count'] += $v['pay_money_count']; $count1['promote_new_count'] += $v['promote_new_count']; } + foreach ($temparr as $key => $value) { + # code... + $data['news'][] = $value['news']; + $data['active'][] = $value['active']; + $data['player'][] = $value['player']; + $data['money'][] = $value['money']; + } + unset($dbdata); $count1['active_user_count'] = count(array_flip(array_flip($active_user_list))); unset($active_user_list); diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index fd7a178c4..afde5599c 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -837,8 +837,8 @@ class MemberController extends ThinkController */ public function lock_status($id="", $lock_status, $accounts = "") { - if ($accounts) $map['account'] = ['in', array_unique(explode(',', $accounts))]; - if ($id) $map['id'] = ['in', array_unique(explode(',', $id))]; + if ($accounts) $map['account'] = ['in', array_unique(explode("\n", $accounts))]; + if ($id) $map['id'] = ['in', array_unique(explode("\n", $id))]; $users = M('user', 'tab_')->where($map)->field('id')->select(); $res = M('user', 'tab_')->where($map)->setField(['lock_status' => $lock_status]); if ($res) { diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index c77b8df1f..27234fe1a 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -110,9 +110,9 @@ class PromoteController extends ThinkController $arr['pageSize'] = 1000; ksort($arr); reset($arr); - $sign = md5(http_build_query($arr) . 'wmkjtx_kj213'); + $sign = md5(http_build_query($arr) . C('GET_INFO_KEY')); $arr['sign'] = $sign; - $re_data = curl_post('http://test.oa.76ba.com/api/wanmeng/platformAccount', $arr); + $re_data = curl_post(C('OA.formalUrl') . '/api/wanmeng/platformAccount', $arr); $re_data = json_decode($re_data, true); if ($re_data['code'] == 1) { $oa = $re_data['data']; @@ -151,7 +151,7 @@ class PromoteController extends ThinkController reset($arr); $sign = md5(http_build_query($arr) . 'wmkjtx_kj213'); $arr['sign'] = $sign; - $re_data = curl_post('http://test.oa.76ba.com/api/wanmeng/verifyBind', $arr); + $re_data = curl_post(C('OA.formalUrl') . '/api/wanmeng/verifyBind', $arr); $re_data = json_decode($re_data, true)['data']; foreach ($list_data as $k => $v) { $oa_val = $re_data[trim($v['account'])]; diff --git a/Application/Admin/View/DeductBindRecord/deductBindBalance.html b/Application/Admin/View/DeductBindRecord/deductBindBalance.html index c6a001e74..01a6956bb 100644 --- a/Application/Admin/View/DeductBindRecord/deductBindBalance.html +++ b/Application/Admin/View/DeductBindRecord/deductBindBalance.html @@ -69,7 +69,7 @@ 账户余额: - 0.00平台币 + 0.00绑定币 diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html index 1dfdca0d9..62cb6dc49 100644 --- a/Application/Admin/View/Member/user_info.html +++ b/Application/Admin/View/Member/user_info.html @@ -501,7 +501,7 @@ $(function(){ function shenhe(status){ var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { return $(elem).val(); - }).get().join(','); + }).get().join("\n"); var desc = ''; if (status == 0) { desc = '锁定'; @@ -511,8 +511,8 @@ $(function(){ layer.prompt({ formType: 2, value: text, - placeholder : '玩家账号(英文逗号隔开)', - title: '请输入要'+desc+'的玩家账号(英文逗号隔开)', + placeholder : '玩家账号(一个账号一行)', + title: '请输入要'+desc+'的玩家账号(一个账号一行)', area: ['800px', '350px'] //自定义文本域宽高 }, function(value, index, elem){ if(value=='') { diff --git a/Application/Base/Tool/PlistParser.class.php b/Application/Base/Tool/PlistParser.class.php index 96b19fe7b..9f9bf8a3f 100644 --- a/Application/Base/Tool/PlistParser.class.php +++ b/Application/Base/Tool/PlistParser.class.php @@ -37,7 +37,7 @@ class PlistParser $this->xml = $xml; } else { $plist = new CFPropertyList(); - $plist->parseBinary($content); + $plist->parse($content); $this->plist = $plist; } return true; diff --git a/Application/Callback/Controller/Notify2Controller.class.php b/Application/Callback/Controller/Notify2Controller.class.php index 67e764913..4e196c26c 100644 --- a/Application/Callback/Controller/Notify2Controller.class.php +++ b/Application/Callback/Controller/Notify2Controller.class.php @@ -16,6 +16,7 @@ class Notify2Controller extends BaseController */ public function notify() { + C(api('Config/lists')); $apitype = I('get.apitype');#获取支付api类型 if (IS_POST && !empty($_POST)) { diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 66598be29..12e57fead 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -481,17 +481,7 @@ class DownloadController extends BaseController { $map1['chain'] = ['like','%'.'/'.PID.'/'.'%']; $rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select(); $childPromoteIds = ''; - if(empty($rs)) { - $map['tab_test_resource.promote_id'] = PID; - }else { - foreach ($rs as $rsKey => $rsValue) { - $id = $rsValue['id']; - $childPromoteIds .= $id.','; - } - $childPromoteIds = rtrim($childPromoteIds, ','); - $childPromoteIds .= ',' . PID; - $map['tab_test_resource.promote_id'] = ['in', $childPromoteIds]; - } + $map['tab_test_resource.promote_id'] = PID; if(!empty(I('role_name'))){ $map['role_name']=['like','%'.I('role_name').'%']; @@ -547,17 +537,7 @@ class DownloadController extends BaseController { $map1['chain'] = ['like','%'.'/'.PID.'/'.'%']; $rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select(); $childPromoteIds = ''; - if(empty($rs)) { - $map['tab_test_resource.promote_id'] = PID; - }else { - foreach ($rs as $rsKey => $rsValue) { - $id = $rsValue['id']; - $childPromoteIds .= $id.','; - } - $childPromoteIds = rtrim($childPromoteIds, ','); - $childPromoteIds .= ',' . PID; - $map['tab_test_resource.promote_id'] = ['in', $childPromoteIds]; - } + $map['tab_test_resource.promote_id'] = PID; if(!empty(I('type'))||I('type')==='0'){ $map['apply_status']=I('type'); @@ -617,33 +597,23 @@ class DownloadController extends BaseController { $map1['chain'] = ['like','%'.'/'.PID.'/'.'%']; $rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select(); $childPromoteIds = ''; - if(empty($rs)) { - $map['tab_test_resource.promote_id'] = PID; - }else { - foreach ($rs as $rsKey => $rsValue) { - $id = $rsValue['id']; - $childPromoteIds .= $id.','; - } - $childPromoteIds = rtrim($childPromoteIds, ','); - $childPromoteIds .= ',' . PID; - $map['tab_test_resource.promote_id'] = ['in', $childPromoteIds]; - } + $map['tab_test_resource.promote_id'] = PID; - if(!empty(I('server_name'))){ - $map['tab_test_resource.server_name']=I('server_name'); - } - if(!empty(I('game_name'))){ - $map['tab_test_resource.game_name']=I('game_name'); - } - if(!empty(I('role_name'))){ - $map['tab_test_resource.role_name']=['like','%'.I('role_name').'%']; - } - if(!empty(I('user_account'))){ - $map['tab_test_resource.user_account']=['like','%'.I('user_account').'%']; - } - if(!empty(I('promote_id'))){ - $map['tab_test_resource.promote_id']=I('promote_id'); - } + if(!empty(I('server_name'))){ + $map['tab_test_resource.server_name']=I('server_name'); + } + if(!empty(I('game_name'))){ + $map['tab_test_resource.game_name']=I('game_name'); + } + if(!empty(I('role_name'))){ + $map['tab_test_resource.role_name']=['like','%'.I('role_name').'%']; + } + if(!empty(I('user_account'))){ + $map['tab_test_resource.user_account']=['like','%'.I('user_account').'%']; + } + if(!empty(I('promote_id'))){ + $map['tab_test_resource.promote_id']=I('promote_id'); + } $conditions = json_encode($map,TRUE); $addtime = time(); @@ -831,6 +801,9 @@ class DownloadController extends BaseController { * @author sunke */ public function regist_data_export() { + if (empty(I('begtime')) || empty(I('endtime'))) { + $this->error('请选择起止时间'); + } $beginTime = strtotime(I('begtime') . ' 00:00:00'); $endtime = strtotime(I('endtime') . ' 23:59:59'); if (($endtime - $beginTime) > 31 * 24 * 3600) { @@ -852,7 +825,7 @@ class DownloadController extends BaseController { } $levelPromote = $this->getLevelPromote(); $queryPromote = $this->getQueryPromote($levelPromote); - + $map2[] = [ '_logic' => 'or', 'id' => $queryPromote['id'], diff --git a/Application/Home/View/default/Apply/my_game.html b/Application/Home/View/default/Apply/my_game.html index 0f3e90578..33dff8572 100644 --- a/Application/Home/View/default/Apply/my_game.html +++ b/Application/Home/View/default/Apply/my_game.html @@ -663,7 +663,7 @@ $('.add-game').on('click', function () { var thisElement = $(this); var gameId = thisElement.attr('game-id'); - var promoteType = thisElement.attr('promote-type'); + var promoteType = parseInt(thisElement.attr('promote-type')); $.ajax({ type: "post", @@ -690,8 +690,16 @@ }); } - if (promoteType == 3) { - $('#add_promote_title').text('添加推广员:'); + switch (promoteType) { + case 2: + $('#add_promote_title').text('添加部长:'); + break; + case 3: + $('#add_promote_title').text('添加组长:'); + break; + case 4: + $('#add_promote_title').text('添加推广员:'); + break; } $.myMethod("#add_promote_data",tagData,"add_promote_ids"); diff --git a/Application/Media/View/default/Index/hezuo.html b/Application/Media/View/default/Index/hezuo.html index 54afc010c..c357556ae 100644 --- a/Application/Media/View/default/Index/hezuo.html +++ b/Application/Media/View/default/Index/hezuo.html @@ -76,8 +76,7 @@ - - + diff --git a/Application/Mobile/Controller/SsgController.class.php b/Application/Mobile/Controller/SsgController.class.php index 83074ed64..86cec8911 100644 --- a/Application/Mobile/Controller/SsgController.class.php +++ b/Application/Mobile/Controller/SsgController.class.php @@ -3,6 +3,7 @@ namespace Mobile\Controller; use Org\Ipa365SDK\Ipa365; use Org\WeixinSDK\Weixin; use User\Api\MemberApi; +use Think\Log; class SsgController extends BaseController { const USER_NOT_ILLEGAL = -1; //用户名不合法 @@ -19,7 +20,7 @@ class SsgController extends BaseController { const CODE_ERROR = -97; //验证码错误 const RETURN_SUCCESS = 1; const RETURN_FALSE = 2; - const signprice = 0.1; //充值金额 + const signprice = 10; //充值金额 public function login() @@ -591,7 +592,6 @@ class SsgController extends BaseController { $param['callback'] = "https://".$_SERVER['HTTP_HOST']."/mobile.php/Ssg/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}"; //$param['notifyurl'] = "https://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay"; } - $ali_pay = $this->alipay($param); redirect($ali_pay['url']); }else{ diff --git a/ThinkPHP/Library/Think/Pay.class.php b/ThinkPHP/Library/Think/Pay.class.php index af718417e..972efffd6 100644 --- a/ThinkPHP/Library/Think/Pay.class.php +++ b/ThinkPHP/Library/Think/Pay.class.php @@ -8,6 +8,7 @@ namespace Think; use Org\UcenterSDK\Ucservice; +use Think\Log; class Pay { @@ -167,8 +168,9 @@ class Pay break; } $notifyurl = $vo->getNotifyUrl(); - if (!$notifyurl) - $notifyurl = 'http://' . $_SERVER ['HTTP_HOST'] . '/callback.php/Notify2/notify/apitype/alipay/methodtype/notify'; + if (!$notifyurl){ + $notifyurl = 'https://' . $_SERVER ['HTTP_HOST'] . '/callback.php/Notify2/notify/apitype/alipay/methodtype/notify'; + } $request->setNotifyUrl($notifyurl); switch ($type) {