diff --git a/Addons/SiteStat/SiteStatAddon.class.php b/Addons/SiteStat/SiteStatAddon.class.php index 0ba160cd4..0e2da09be 100644 --- a/Addons/SiteStat/SiteStatAddon.class.php +++ b/Addons/SiteStat/SiteStatAddon.class.php @@ -662,6 +662,10 @@ class SiteStatAddon extends Addon $msgc = M('Msg', 'tab_')->where(array('user_id' => UID, 'status' => 2))->count();//站内通知 $daiban['msgc'] = $msgc; + $ver = M('promote','tab_')->where(['ver_status'=>3])->count(); + $editver = M('promote','tab_')->where(['ver_status'=>4])->count(); + $daiban['ver'] = $ver; + $daiban['editver'] = $editver; $this->assign('daiban', $daiban); } diff --git a/Addons/SiteStat/info.html b/Addons/SiteStat/info.html index 5b25cc243..9b92ecb22 100644 --- a/Addons/SiteStat/info.html +++ b/Addons/SiteStat/info.html @@ -61,7 +61,7 @@ $(document).ready(function () { -
+
@@ -70,17 +70,19 @@ $(document).ready(function () { - + - - - + + + + - - - - + + + + + @@ -121,6 +123,16 @@ $(document).ready(function () { + + + + + + + + + +
待办数量
【推广员管理】推广员申请待审核数{$daiban['pcount']}【资质审核】推广员身份认证审核{$daiban['ver']}
【推广员提现】推广员提现待审核数{$daiban['withc']}
【修改资质审核】推广员身份修改认证审核{$daiban['editver']}
【开发者管理】 开发者申请待审核数推广员包待更新数 {$daiban['msgc']}
【推广员管理】推广员申请待审核数{$daiban['pcount']}
【推广员提现】推广员提现待审核数{$daiban['withc']}
diff --git a/Application/Base/Repository/PromoteRepository.class.php b/Application/Base/Repository/PromoteRepository.class.php index 55a3a8b4f..867984aa7 100644 --- a/Application/Base/Repository/PromoteRepository.class.php +++ b/Application/Base/Repository/PromoteRepository.class.php @@ -234,7 +234,6 @@ class PromoteRepository { $resultMap = ['_string' => 'user_id in (' . $inQuery . ')']; $items = M('user_play_info', 'tab_')->field(['count(*) count', 'promote_id'])->where($resultMap)->group('promote_id')->select(); - $records = []; foreach ($items as $item) { $promoteId = $item['promote_id']; @@ -372,21 +371,31 @@ class PromoteRepository { $params['time_column'] = 'pay_time'; $map = $this->getPublicAchievementMap($ids, $params); $items = M('spend', 'tab_')->field(['sum(pay_amount) amount', 'promote_id', 'pay_way'])->where($map)->group('promote_id, pay_way')->select(); + // echo M()->getLastSql();die(); $records = []; foreach ($items as $item) { + $promoteId = $item['promote_id']; + if (isset($params['basicPromotes'][$promoteId])) { + $promoteId = $params['basicPromotes'][$promoteId]; + } if ($item['pay_way'] == -1) { - $records[$item['promote_id']]['ban_coin'] = $item['amount']; + if (isset($records[$promoteId]) && isset($records[$promoteId]['ban_coin'])) { + $records[$promoteId]['ban_coin'] += $item['amount']; + } else { + $records[$promoteId]['ban_coin'] = $item['amount']; + } } elseif ($item['pay_way'] == 0) { - $records[$item['promote_id']]['coin'] = $item['amount']; + if (isset($records[$promoteId]) && isset($records[$promoteId]['coin'])) { + $records[$promoteId]['coin'] += $item['amount']; + } else { + $records[$promoteId]['coin'] = $item['amount']; + } } else { - if (isset($records[$item['promote_id']])) { - $records[$item['promote_id']]['cash'] = isset($records[$item['promote_id']]['cash']) ? - $records[$item['promote_id']]['cash'] + $item['amount'] : - $item['amount']; + if (isset($records[$promoteId]) && isset($records[$promoteId]['cash'])) { + $records[$promoteId]['cash'] += $item['amount']; } else { - $records[$item['promote_id']]['cash'] = $item['amount']; + $records[$promoteId]['cash'] = $item['amount']; } - } } foreach ($ids as $id) { diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 84609cca9..255b4d206 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1906,6 +1906,11 @@ class QueryController extends BaseController public function achievement() { $time = I('time', date('Y-m-d')); + if(!empty($time)) { + $defaultTime = $time ; + }else { + $defaultTime = date('Y-m-d',time()); + } $sdkVersion = I('sdk_version', 0); $gameId = I('game_id', 0); $serverId = I('server_id', 0); @@ -1995,37 +2000,37 @@ class QueryController extends BaseController $rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params); $rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params); $rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params); - + if (I('p', 1) == 1) { $selfParams = $params; $selfParams['isContainSubs'] = false; - $selfCreateRoleCountList = $promoteRepository->getCreateRoleCountByIds([$promote['id']], $selfParams); - $selfCreateRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds([$promote['id']], $selfParams); - $selfNewCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds([$promote['id']], $selfParams); - // $selfNewCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds([$promote['id']], $selfParams); - $selfNewCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds([$promote['id']], $selfParams); - $selfLoginUserCountList = $promoteRepository->getLoginUserCountByIds([$promote['id']], $selfParams); - $selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$promote['id']], $selfParams); - $selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$promote['id']], $selfParams); - $selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$promote['id']], $selfParams); - + $selfCreateRoleCountList = $promoteRepository->getCreateRoleCountByIds([$parent['id']], $selfParams); + $selfCreateRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds([$parent['id']], $selfParams); + $selfNewCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds([$parent['id']], $selfParams); + // $selfNewCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds([$parent['id']], $selfParams); + $selfNewCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds([$parent['id']], $selfParams); + $selfLoginUserCountList = $promoteRepository->getLoginUserCountByIds([$parent['id']], $selfParams); + $selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$parent['id']], $selfParams); + $selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$parent['id']], $selfParams); + $selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$parent['id']], $selfParams); + $records[] = [ 'id' => $parent['id'], 'account' => $parent['account'], 'real_name' => $parent['real_name'], 'level' => $parent['level'], - 'create_role_count' => $selfCreateRoleCountList[$promote['id']], - 'create_role_user_count' => $selfCreateRoleUserCountList[$promote['id']], - 'new_create_role_user_count' => $selfNewCreateRoleUserCountList[$promote['id']], - // 'new_create_role_device_count' => $selfNewCreateRoleDeviceCountList[$promote['id']], - 'new_create_role_ip_count' => $selfNewCreateRoleIpCountList[$promote['id']], - 'login_user_count' => $selfLoginUserCountList[$promote['id']], - 'recharge_count' => $selfRechargeCountList[$promote['id']], - 'recharge_user_count' => $selfRechargeUserCountList[$promote['id']], - 'recharge_amount' => $selfRechargeAmountList[$promote['id']]['ban_coin'] + $rechargeAmountList[$promote['id']]['coin'] + $rechargeAmountList[$promote['id']]['cash'], - 'recharge_by_ban_coin' => $selfRechargeAmountList[$promote['id']]['ban_coin'], - 'recharge_by_coin' => $selfRechargeAmountList[$promote['id']]['coin'], - 'recharge_by_cash' => $selfRechargeAmountList[$promote['id']]['cash'], + 'create_role_count' => $selfCreateRoleCountList[$parent['id']], + 'create_role_user_count' => $selfCreateRoleUserCountList[$parent['id']], + 'new_create_role_user_count' => $selfNewCreateRoleUserCountList[$parent['id']], + // 'new_create_role_device_count' => $selfNewCreateRoleDeviceCountList[$parent['id']], + 'new_create_role_ip_count' => $selfNewCreateRoleIpCountList[$parent['id']], + 'login_user_count' => $selfLoginUserCountList[$parent['id']], + 'recharge_count' => $selfRechargeCountList[$parent['id']], + 'recharge_user_count' => $selfRechargeUserCountList[$parent['id']], + 'recharge_amount' => $selfRechargeAmountList[$parent['id']]['ban_coin'] + $rechargeAmountList[$parent['id']]['coin'] + $rechargeAmountList[$parent['id']]['cash'], + 'recharge_by_ban_coin' => $selfRechargeAmountList[$parent['id']]['ban_coin'], + 'recharge_by_coin' => $selfRechargeAmountList[$parent['id']]['coin'], + 'recharge_by_cash' => $selfRechargeAmountList[$parent['id']]['cash'], 'current_display' => $currentDisplay, ]; } @@ -2065,6 +2070,7 @@ class QueryController extends BaseController $this->assign('parentid', $parentId); $this->assign('count', $count); $this->assign('timeout', $timeout); + $this->assign('time',$defaultTime); $this->display(); } diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index 2b21a142c..f411f529a 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -319,28 +319,8 @@ class SafeController extends BaseController{ $addressArr = explode(',', json_decode($address)[0]); $promoteInfo['addressdata'] = $addressArr; $this->assign('addr',json_decode($address)[1]); - }else { - $this->assign('addr','未填写地址'); } $promoteInfo['address'] = json_decode($address); - if(empty($promoteInfo['bank_card'])) { - $promoteInfo['bank_card'] = " "; - } - if(empty($promoteInfo['email'])) { - $promoteInfo['email'] = " "; - } - if(empty($promoteInfo['real_name'])) { - $promoteInfo['real_name'] = " "; - } - if(empty($promoteInfo['mobile_phone'])) { - $promoteInfo['mobile_phone'] = " "; - } - if(empty($promoteInfo['bank_name'])) { - $promoteInfo['bank_name'] = " "; - } - if(empty($promoteInfo['idcard'])) { - $promoteInfo['idcard'] = " "; - } $this->assign("ver_status",$promoteInfo['ver_status']); $this->assign('promoteinfo', $promoteInfo); @@ -354,12 +334,13 @@ class SafeController extends BaseController{ $id = get_pid(); $rs = M("promote","tab_")->field('anothpic,ver_status,real_name,bank_card,mobile_phone,email,address,idcard')->where(['id'=>$id])->find(); $anothpic = $rs['anothpic']; - if(!empty($anothpic)) { + /* if(!empty($anothpic)) { $idcarpicArr = explode(',', $anothpic); foreach ($idcarpicArr as $key => $value) { $promoteInfo['valuedata'][$key] = $value; } - } + } */ + $promoteInfo = ""; $address = json_decode($rs['address'],false)[1]; $this->assign('addr',$address); $this->assign('ver_status',$rs['ver_status']); @@ -377,6 +358,42 @@ class SafeController extends BaseController{ $account_type = $_REQUEST["account_type"]; $bank = $_REQUEST["bank"]; $agreementpic = $_REQUEST["agreementpic"]; + if(empty($tel)) { + $this->error("手机号码不能为空"); + return false; + } + $pattern = "/^1[3|5|7|8]\\d{9}$/i"; + if(!preg_match($pattern, $tel)) { + $this->error("手机号码格式不合法"); + return false; + } + + if(empty($address1)) { + $this->error("地址不能为空"); + return false; + } + if(empty($email)) { + $this->error("邮箱不能为空"); + return false; + } + $patternemail = "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i"; + if (!preg_match($patternemail, $email)) { + $this->error('邮箱地址错误'); + return false; + } + if(empty($bank)) { + $this->error("卡号不能为空"); + return false; + } + $bank_card_pattern = "/^\d{10,19}$/u"; + if (!preg_match($bank_card_pattern, $bank)) { + $this->error('卡号格式错误'); + return false; + } + if(empty($agreementpic)) { + $this->error("补充协议不能为空"); + return false; + } $Res = M("promote","tab_")->field('address')->where(['id'=>$id])->find(); $address = json_decode($Res['address'],false); $address[1] = $address1; diff --git a/Application/Home/View/default/Query/achievement.html b/Application/Home/View/default/Query/achievement.html index b295ed228..b2c1a9bb4 100644 --- a/Application/Home/View/default/Query/achievement.html +++ b/Application/Home/View/default/Query/achievement.html @@ -61,14 +61,14 @@
- +
0):?>
- 返回上级 + 返回上级
diff --git a/Application/Home/View/default/Safe/editModify.html b/Application/Home/View/default/Safe/editModify.html index e063c954a..96ab1b25d 100644 --- a/Application/Home/View/default/Safe/editModify.html +++ b/Application/Home/View/default/Safe/editModify.html @@ -212,7 +212,7 @@ +' 开户银行:' +'' +' 补充协议:' - +' ' + +' ' +'
点击上传
' +'
' +'
*须补充修改协议(联系平台签署)
' diff --git a/Application/Home/View/default/Safe/modifyBaseInfo.html b/Application/Home/View/default/Safe/modifyBaseInfo.html index 1ace1661e..e645fd7a8 100644 --- a/Application/Home/View/default/Safe/modifyBaseInfo.html +++ b/Application/Home/View/default/Safe/modifyBaseInfo.html @@ -84,23 +84,21 @@ *真实姓名: - - - - - - + + + + + *身份证号码: - - - - - - + + + + + @@ -200,12 +198,11 @@ *电话: - - - - - - + + + + + @@ -218,12 +215,11 @@       - - - - - - + + + + +