diff --git a/Application/Admin/Controller/CompanyRelationController.class.php b/Application/Admin/Controller/CompanyRelationController.class.php index ae08d1d68..5e445006c 100644 --- a/Application/Admin/Controller/CompanyRelationController.class.php +++ b/Application/Admin/Controller/CompanyRelationController.class.php @@ -4,6 +4,16 @@ namespace Admin\Controller; class CompanyRelationController extends AdminController { + /** + * @var 默认甲方公司类型 + */ + const COMPANY_TYPE_DEFAULT_A = '0'; + + /** + * @var 默认甲方公司类型 + */ + const COMPANY_TYPE_DEFAULT_B = '2'; + public $admininfo; public $DBModel; public $DBlogModel; @@ -26,6 +36,7 @@ class CompanyRelationController extends AdminController "2"=>"月结" ]; public $InvoiceType=[ + "0"=>"无", "1"=>"专票", "2"=>"普票" ]; @@ -379,7 +390,9 @@ class CompanyRelationController extends AdminController $this->ajaxReturn(["msg"=>"添加成功","code"=>1,"url"=>U("lists")]); } else { - $this->assign('companyType',$this->CompanyType); + $this->assign('defaultCompanyTypeA', self::COMPANY_TYPE_DEFAULT_A); + $this->assign('defaultCompanyTypeB', self::COMPANY_TYPE_DEFAULT_B); + $this->assign('companyType', $this->CompanyType); $this->display(); } } diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 67e945a4d..0743c12af 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -383,9 +383,11 @@ class CompanyStatementController extends ThinkController $data['receive_company'] = $data['first_party_info']; $data['pay_company'] = $data['second_party_info']; } - if($data['receive_company']['invoice_type'] == 1){ + if($data['receive_company']['invoice_type'] == 0){ + $data['receive_company']['invoice_type']="无"; + } elseif($data['receive_company']['invoice_type'] == 1){ $data['receive_company']['invoice_type']="专票"; - }else{ + } else{ $data['receive_company']['invoice_type']="普票"; } if ($data['company_belong'] == 9) {//上游 diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 929355e79..2f9d589e1 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -157,8 +157,8 @@ class ExportController extends Controller $adminList = getMarketAdminsByPromoteIds(array_column($xlsData, 'promote_id')); foreach($xlsData as $value) { - $value['market_admin_username'] = isset($adminList[$value['promote_id']]) && $adminList[$value['promote_id']]['admin'] ? $adminList[$value['promote_id']]['admin']['username'] : '无'; ($value['promote_account']=='官方渠道'||$value['promote_account']=='自然注册')?($value['promote_account']=C('OFFICIEL_CHANNEL')):''; + $value['market_admin_username'] = isset($adminList[$value['promote_id']]) && $adminList[$value['promote_id']]['admin'] ? $adminList[$value['promote_id']]['admin']['username'] : '无'; $value['create_time'] = date("Y-m-d H:i:s",$value['create_time']); $value['play_time'] = date("Y-m-d H:i:s",$value['play_time']); mb_convert_variables('GBK', 'UTF-8', $value); @@ -3582,14 +3582,10 @@ class ExportController extends Controller } private function promote_statistics_export($p=0){ - $page = intval($p); - $page = $page ? $page : 1; //默认显示第一页数据 - $arraypage=$page; - $row = 10; - $user=M('User','tab_'); - if(isset($_REQUEST['timestart'])&&isset($_REQUEST['timeend'])){ - $map['register_time'] =array('BETWEEN',array(strtotime($_REQUEST['timestart']),strtotime($_REQUEST['timeend'])+24*60*60-1)); - unset($_REQUEST['timestart']);unset($_REQUEST['timeend']); + if (!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) { + $map['register_time'] = ['between', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399)]; + unset($_REQUEST['timestart']); + unset($_REQUEST['timeend']); } elseif (!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) { $map['register_time'] = ['between', array(strtotime($_REQUEST['timestart']), time())]; unset($_REQUEST['timestart']); @@ -3597,104 +3593,157 @@ class ExportController extends Controller $map['register_time'] = ['elt', strtotime($_REQUEST['timeend']) + 86399]; unset($_REQUEST['timeend']); } - -// if(isset($_REQUEST['start'])&&isset($_REQUEST['end'])){ -// $map['register_time'] =array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1)); -// unset($_REQUEST['start']);unset($_REQUEST['end']); -// } - $play_info_map = ''; - + //TODO:应需求,取消玩家表,只要user表的fgame有就算注册无需在play表存在 + $play_map = false; if (isset($_REQUEST['game_name'])) { $map['fgame_name'] = $_REQUEST['game_name']; - $play_info_map .= " and upi.game_name = '{$_REQUEST['game_name']}' "; - unset($_REQUEST['game_name']); + // $play_map = " and up.game_name = '{$_REQUEST['game_name']}' "; } + $play_info_map = false; if (isset($_REQUEST['server_id'])) { - $play_info_map .= " and upi.server_name = '{$_REQUEST['server_id']}' "; + $play_map = false; //有区服就不检索玩家表,有区服一定已经选择游戏了 + $play_info_map = " and upi.server_id = '{$_REQUEST['server_id']}' and upi.game_name = '{$_REQUEST['game_name']}'"; } - $today=total(1); - $week=total(2); - $mounth=total(3); + + $today = total(1); + $week = total(2); + $mounth = total(3); + if (isset($_REQUEST['promote_id'])) { - $map['tp1.id'] = $_REQUEST['promote_id']; - } else { - $map['tp1.chain'] = '/'; + $promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select(); + if ($promoter_ids) { + $map['u.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))]; + } } + + if (!empty($_REQUEST['admin_id'])) { + $map['promote.admin_id'] = $_REQUEST['admin_id']; + } + //为数据权限添加 setPowerPromoteIds($map, 'u.promote_id'); - $data = M('promote', 'tab_')->alias('tp1')->field('tp1.account as promote_account,tp1.id, date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(u.id) as count, - count(IF(register_time ' . $today . ',1,null)) as today, - count(IF(register_time ' . $week . ',1,null)) as week, - count(IF(register_time ' . $mounth . ',1,null)) as mounth') - ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left') - ->join("tab_user as u on tp2.id = u.promote_id", 'left') - ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) - ->where($map) - ->group('tp1.id') - ->order('count desc, register_time') - ->select(); - unset($map['tp1.id']); - unset($map['tp1.chain']); - $map['promote_id'] = 0; - //如果有官方渠道权限 - $user_auth_promote_ids = session('user_auth_promote_ids'); - if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) { - //官方渠道数据添加 - $authorityData = M('user', 'tab_')->alias('u') - ->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, - count(id) as count, - count(IF(register_time ' . $today . ',1,null)) as today, - count(IF(register_time ' . $week . ',1,null)) as week, - count(IF(register_time ' . $mounth . ',1,null)) as mounth') + + // 如果是市场专员那么只能看自己的 + $isMarketAdmin = isMarketAdmin(); + if ($isMarketAdmin) { + $map['promote.admin_id'] = is_login(); + } + + $data = M("User u","tab_") + ->field("count(u.id) as count,IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id") + ->join("tab_promote promote ON u.promote_id = promote.id","left") + ->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false) + ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) + ->join('tab_game on u.fgame_id = tab_game.id') ->where($map) - ->find(); + ->group('id') + ->order('count desc, register_time') + ->select(); + //今日/本周/本月不变 + $tmap = $map; + if(isset($tmap['register_time'])){ + //获取最大最小 + $tweek = total(2,false); + $tmonth = total(3,false); + //获取最小 + $tmin = 0; + if($tweek[1][0] < $tmonth[1][0]){ + $tmin = $tweek[1][0]; + }else{ + $tmin = $tmonth[1][0]; + } + $tmap['register_time'] = ['between', array($tmin,$tmonth[1][1])]; + } + + $tdata = M("User u","tab_") + ->field("count(IF(register_time {$today},1,null)) as today, + count(IF(register_time {$week},1,null)) as week, + count(IF(register_time {$mounth},1,null)) as mounth, + IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id") + ->join("tab_promote promote ON u.promote_id = promote.id","left") + ->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false) + ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) + ->where($tmap) + ->group('id') + ->order('register_time') + ->select(); + $tmdata = []; + foreach($data as $k=>$v){ + $v['today'] = 0; + $v['week'] = 0; + $v['mounth'] = 0; + $tmdata[$v['id']] = $v; + } + if(!empty($tdata)){ + foreach ($tdata as $k => $v) { + $tmdata[$v['id']]['today'] = $v['today']; + $tmdata[$v['id']]['week'] = $v['week']; + $tmdata[$v['id']]['mounth'] = $v['mounth']; + $tmdata[$v['id']]['id'] = $v['id']; + } } - $authorityData['promote_account'] = C('OFFICIEL_CHANNEL'); - $authorityData['id'] = "1"; - if (isset($_REQUEST['promote_id'])||$authorityData['count']==0) { - $authorityData = []; - } else { - array_push($data, $authorityData); + if(count($tmdata) >0){ + //获取推广员 + $idstr = implode(",",array_keys($tmdata)); + $promoteRes = M("Promote","tab_")->field("id,account promote_account")->where("id in ({$idstr})")->select(); + foreach($promoteRes as $k=>$v){ + $tmdata[$v['id']]['promote_account'] = $v['promote_account']; + } } - -//数据排序 + $data = []; + foreach($tmdata as $k => $v){ + if($v['id'] == 0){ + $v['promote_account'] = C('OFFICIEL_CHANNEL'); + } + $data[] = $v; + } + unset($map['tp1.id']); + unset($map['tp1.chain']); + unset($tmap['tp1.id']); + unset($tmap['tp1.chain']); + $map['u.promote_id'] = 0; + $tmap['u.promote_id'] = 0; + $authorityData['count'] = 0; + //数据排序 $last_names = array_column($data,'count'); array_multisort($last_names,SORT_DESC,$data); -// var_dump($data);die(); - $count=count($data); + $count = count($data); foreach ($data as $key => $value) { - static $i=0; - $i++; - $data[$key]['rand']=$i; + static $i = 0; + $i++; + $data[$key]['rand'] = $i; } -// foreach ($data as $key => $value) { -// if($data[$key]['promote_id']==0){ -// unset($data[$key]); -// } -// } - $total=A('Platform')->data_total($data); - if($_REQUEST['data_order']!=''){ - $data_order=reset(explode(',',$_REQUEST['data_order'])); - $data_order_type=end(explode(',',$_REQUEST['data_order'])); - $this->assign('userarpu_order',$data_order); - $this->assign('userarpu_order_type',$data_order_type); - } - if($count > $row){ - $page = new \Think\Page($count, $row); - $page->setConfig('theme','%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%'); - $this->assign('_page', $page->show()); + $total = $this->data_total($data); + if ($_REQUEST['data_order'] != '') { + $data_order = reset(explode(',', $_REQUEST['data_order'])); + $data_order_type = end(explode(',', $_REQUEST['data_order'])); + $this->assign('userarpu_order', $data_order); + $this->assign('userarpu_order_type', $data_order_type); } - $data=my_sort($data,$data_order_type,(int)$data_order); - $size=$row;//每页显示的记录数 - $pnum = ceil(count($data) / $size); //总页数,ceil()函数用于求大于数字的最小整数 + + $data = my_sort($data, $data_order_type, (int)$data_order); //用array_slice(array,offset,length) 函数在数组中根据条件取出一段值;array(数组),offset(元素的开始位置),length(组的长度) -// $data = array_slice($data, ($arraypage-1)*$size, $size); + + $companys = !empty($data) ? M('promote', 'tab_') + ->field('tab_promote.id, company_name, sys_member.nickname as admin_username') + ->join("tab_promote_company on tab_promote.company_id = tab_promote_company.id", 'left') + ->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left') + ->where("tab_promote.id in (".implode(',', array_column($data, 'id')).")")->select() : []; + $companys = $companys ? array_column($companys, null, 'id') : []; + foreach ($data as &$item) { + $item['company_name'] = $companys[$item['id']]['company_name'] ?? '无'; + $item['admin_username'] = $companys[$item['id']]['admin_username'] ?? '无'; + } + $xlsName = $_REQUEST['xlsname']?$_REQUEST['xlsname']:'推广员注册统计'; $xlsCell = array( - array('promote_account', "推广员账号"), + array('company_name' , "公司"), + array('promote_account', "会长账号"), + array('admin_username' , "市场专员"), + //array('relation_game_name' , "游戏"), array('count' , "累计注册"), array('rand' , "排行榜"), array('today' , "今日注册"), diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 40fceb495..eb174a578 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -253,7 +253,7 @@ class FinancePromoteController extends AdminController } $adminId = 0; - $havingPids = []; + // $havingPids = []; $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { $userAuth = session('user_auth'); @@ -263,10 +263,10 @@ class FinancePromoteController extends AdminController $adminId = I('admin_id'); } } - if ($adminId > 0) { + /* if ($adminId > 0) { $havingPids = M('promote', 'tab_')->where(['admin_id' => $adminId])->getField('id', true); $havingPids = count($havingPids) > 0 ? $havingPids : [0]; - } + } */ if($type == "spend"){ if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) { @@ -275,6 +275,9 @@ class FinancePromoteController extends AdminController if($istimeselect){ $map['s.payed_time']=$istimeselect; } + if ($adminId > 0) { + $map['s.market_admin_id'] = $adminId; + } $map['s.pay_status']=1; $field= "SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count, SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count, @@ -288,16 +291,16 @@ class FinancePromoteController extends AdminController ->join("tab_promote promote ON s.promote_id = promote.id","left") ->join("tab_promote_company company ON promote.company_id = company.id","left") ->group('p_id'); - if (count($havingPids) > 0) { + /* if (count($havingPids) > 0) { $query->having('p_id in (' . implode(',', $havingPids) . ')'); - } + } */ return $query->select(); }else{ if($istimeselect){ $map['s.create_time']=$istimeselect; } $adminId = 0; - $havingPids = []; + // $havingPids = []; $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { $userAuth = session('user_auth'); @@ -308,8 +311,9 @@ class FinancePromoteController extends AdminController } } if ($adminId > 0) { - $havingPids = M('promote', 'tab_')->where(['admin_id' => $adminId])->getField('id', true); - $havingPids = count($havingPids) > 0 ? $havingPids : [0]; + $map['promote.admin_id'] = $adminId; + // $havingPids = M('promote', 'tab_')->where(['admin_id' => $adminId])->getField('id', true); + // $havingPids = count($havingPids) > 0 ? $havingPids : [0]; } $map['s.status']=1; $map['s.source_id']=0; @@ -322,9 +326,9 @@ class FinancePromoteController extends AdminController ->join("tab_promote promote ON s.promote_id = promote.id","left") ->join("tab_promote_company company ON promote.company_id = company.id","left") ->group('p_id'); - if (count($havingPids) > 0) { + /* if (count($havingPids) > 0) { $query->having('p_id in (' . implode(',', $havingPids) . ')'); - } + } */ return $query->select(); } @@ -517,13 +521,6 @@ class FinancePromoteController extends AdminController ->join("tab_promote_company company ON promote.company_id = company.id", "left") ->group('promote_id'); - $havingPids = []; - if ($adminId > 0) { - $topIds = M('promote', 'tab_')->where(['admin_id' => $adminId])->getField('id', true); - $havingPids = getPromoteIdsByTopIds($topIds); - $havingPids = count($havingPids) > 0 ? $havingPids : [0]; - $query->having('promote_id in (' . implode(',', $havingPids) . ')'); - } return $query->select(); }else{ if($istimeselect){ @@ -544,9 +541,12 @@ class FinancePromoteController extends AdminController } $isMarketLeader = isMarketLeader(); - if ($isMarketLeader) { + if ($adminId > 0) { + $map['promote.admin_id'] = $adminId; + } elseif ($isMarketLeader) { $map['promote.admin_id'] = ['gt', 0]; } + $field= "SUM(CASE WHEN s.type = 1 THEN num ELSE 0 END) as pay_amount,SUM(CASE WHEN s.type = 2 THEN num ELSE 0 END) as back_amount, IFNULL(company_id,0) company_id,company_name,promote_id,promote.account promote_account,IFNULL(promote.company_belong,0) company_belong"; $query = M("promote_coin s","tab_") @@ -556,13 +556,13 @@ class FinancePromoteController extends AdminController ->join("tab_promote_company company ON promote.company_id = company.id", "left") ->group('promote_id'); - $havingPids = []; + /* $havingPids = []; if ($adminId > 0) { $topIds = M('promote', 'tab_')->where(['admin_id' => $adminId])->getField('id', true); $havingPids = getPromoteIdsByTopIds($topIds); $havingPids = count($havingPids) > 0 ? $havingPids : [0]; $query->having('promote_id in (' . implode(',', $havingPids) . ')'); - } + } */ return $query->select(); } } @@ -857,6 +857,21 @@ class FinancePromoteController extends AdminController private function gameStatisticsData($map, $row = 0, $page = 1) { + $adminId = 0; + $isMarketAdmin = isMarketAdmin(); + if ($isMarketAdmin) { + $userAuth = session('user_auth'); + $adminId = $userAuth['uid']; + } else { + if (!empty(I('admin_id'))) { + $adminId = I('admin_id'); + } + } + + if ($adminId > 0) { + $map['s.market_admin_id'] = $adminId; + } + $map['s.pay_status']=1; $query = M("spend","tab_")->alias("s") ->field("s.game_id,s.game_name,s.sdk_version,p.partner as partner_name, @@ -875,6 +890,17 @@ class FinancePromoteController extends AdminController if ($row != 0) { $query = $query->page($page,$row); } + $data = $query->select(false); + $data = M() + ->table("(".$data.") a") + ->field("a.*,IFNULL(promote.account,'官方渠道') account") + ->join("tab_promote promote ON a.p_id = promote.id","left") + ->select(); + + return $data; + } + private function totalGameStatisticsData($map, $join = true) + { $adminId = 0; $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { @@ -885,23 +911,11 @@ class FinancePromoteController extends AdminController $adminId = I('admin_id'); } } - $havingPids = []; + if ($adminId > 0) { - $havingPids = M('promote', 'tab_')->where(['admin_id' => $adminId])->getField('id', true); - $havingPids = count($havingPids) > 0 ? $havingPids : [0]; - $query->having('p_id in (' . implode(',', $havingPids) . ')'); + $map['s.market_admin_id'] = $adminId; } - $data = $query->select(false); - $data = M() - ->table("(".$data.") a") - ->field("a.*,IFNULL(promote.account,'官方渠道') account") - ->join("tab_promote promote ON a.p_id = promote.id","left") - ->select(); - - return $data; - } - private function totalGameStatisticsData($map, $join = true) - { + $query = M("spend","tab_")->alias("s") ->field("SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count, SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count, diff --git a/Application/Admin/Controller/GiftbagController.class.php b/Application/Admin/Controller/GiftbagController.class.php index c3e08ba35..c3e771dd8 100644 --- a/Application/Admin/Controller/GiftbagController.class.php +++ b/Application/Admin/Controller/GiftbagController.class.php @@ -135,6 +135,13 @@ class GiftbagController extends ThinkController { // var_dump($data);die(); if($data){ $data['novice'] = str_replace(array("\r\n", "\r", "\n"), ",", $_POST['novice']); + + $noviceList = explode(',', $data['novice']); + $noviceList = array_filter($noviceList, function ($value) { + return $value != ''; + }); + $data['novice'] = implode(',', $noviceList); + $data['server_name']=get_server_name($data['server_id']); $data['novice_num'] = count(explode(',',$data['novice'])); $Model->add($data); @@ -194,6 +201,13 @@ class GiftbagController extends ThinkController { if($data){ $data['novice'] = str_replace(array("\r\n", "\r", "\n"), ",", $_POST['novice']); + + $noviceList = explode(',', $data['novice']); + $noviceList = array_filter($noviceList, function ($value) { + return $value != ''; + }); + $data['novice'] = implode(',', $noviceList); + $data['novice_num'] = count(explode(',',$data['novice'])); $Model->save($data); addOperationLog(array( diff --git a/Application/Admin/Controller/MendController.class.php b/Application/Admin/Controller/MendController.class.php index 7802e7eb4..6b4bf9ca6 100644 --- a/Application/Admin/Controller/MendController.class.php +++ b/Application/Admin/Controller/MendController.class.php @@ -118,7 +118,6 @@ class MendController extends ThinkController { public function edit($id = null) { - if (IS_POST) { $promoteService = new PromoteService(); if ($_POST['prmoote_id_to'] == -1){ @@ -137,8 +136,12 @@ class MendController extends ThinkController { // if(self::checkSettlement(strtotime($_POST['order_time']),$_POST['promote_id'])){ // $this->error('在订单日期内含有已经结算的订单,无法补链'); // } - if(self::checkSpend(strtotime($_POST['order_time']),$_POST['account'])){ - $this->error("在订单日期内含有已经结算的订单,无法补链。如订单:{$this->tempid}"); + + // if(self::checkSpend(strtotime($_POST['order_time']),$_POST['account'])){ + // $this->error("在订单日期内含有已经结算的订单,无法补链。"); + // } + if(self::checkOrderTime(strtotime($_POST['order_time']))){ + $this->error('仅能补链本周数据,请重新选择补链时间'); } if(self::checkPromote(strtotime($_POST['order_time']),$_POST['account'])){ $this->error('在订单日期内含有多个推广员,无法补链'); @@ -178,20 +181,35 @@ class MendController extends ThinkController { $this->error($res['msg']); } } else { - $user = A('User', 'Event'); - $user_data = $user->user_entity($id); - $user_data || $this->error("用户数据异常"); + // echo 1;die(); + $map['id'] = $id; + $data = M("user","tab_")->where($map)->find(); + + // $user = A('User', 'Event'); + // $user_data = $user->user_entity($id); + // $user_data || $this->error("用户数据异常"); // var_dump($user_data);die; - $this->assign("data", $user_data); + $this->assign("data", $data); $this->meta_title = '编辑推广补链'; - $this->m_title = '推广补链'; - $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Mend/lists','status'=>1])->find()); + $this->m_title = '推广补链'; + $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Mend/lists','status'=>1])->find()); $this->display(); } } + private function checkOrderTime($order_time){ + $sdefaultDate = date("Y-m-d"); + $first=1;//周一开始 + $w=date('w',strtotime($sdefaultDate)); + $checktime=strtotime("$sdefaultDate -".($w ? $w - $first : 6).' days'); //本周开始时间 + if($order_time >= $checktime){ + //在本周允许换绑 + return false; + } + return true; + } /** * 2020.1.3 之后判断订单是否已经结算 */ @@ -200,42 +218,51 @@ class MendController extends ThinkController { $map = array( "pay_status"=>1, "user_account"=>$account, - "pay_time"=>array("EGT",$order_time) + "payed_time"=>array("EGT",$order_time) ); $spendlist = M("Spend","tab_")->field("id,selle_status,pay_order_number")->where($map)->select(); if(count($spendlist) < 1){ + //无流水可换绑 return false; } - //获取所有未审核 - $withmap = array( - "status"=>0, - "settlement_begin_time"=>array("EGT",$order_time), - "settlement_end_time"=>array("ELT",$order_time) - ); - $withspendlist = M("withdraw","tab_")->field("spend_ids")->select(); + //获取结算方式 + $c_id = M("User","tab_") + ->alias('a') + ->field("IFNULL(p.company_id,0) company_id") + ->join('tab_promote p ON a.promote_id= p.id') + ->where("a.account = '{$account}'") + ->find(); - $dsh_list = false; - if(!empty($withspendlist)){ - //获取所有涉及订单 - foreach ($withspendlist as $value) { - $dsh_list .= (','.$value['spend_ids']); - } + if(empty($c_id) || $c_id['company_id'] == 0){ + //官方渠道不结算,可换绑 + return false; } - if($dsh_list){ - $dsh_list = array_flip(explode(",",$dsh_list)); + $c_id = $c_id['company_id']; + $r = M("CompanyRelation","tab_")->where("(first_company_type = 2 AND first_company_id = '{$c_id}') OR (second_company_type = 2 AND second_company_id = '{$c_id}')")->find(); + if(empty($r) || $r['settlement_type'] == 0){ + //不结算的公司允许换绑 + return false; } - foreach($spendlist as $k=>$v){ - - if($v['selle_status'] == 1){ - $this->tempid = $v['pay_order_number']; - return true; //有已结算 - } - if($dsh_list && $dsh_list[$v['id']]){ - $this->tempid = $v['pay_order_number']; - return true; //有待审核的 - } + $checktime = 0; + if($r['settlement_type'] == 1){ + //周结 + $sdefaultDate = date("Y-m-d"); + $first=1; + $w=date('w',strtotime($sdefaultDate)); + $checktime=strtotime("$sdefaultDate -".($w ? $w - $first : 6).' days'); //本周开始时间 + }else{ + //月结 + $y = date("Y", time()); //年 + $m = date("m", time()); //月 + $checktime = mktime(0, 0, 0, $m, 1, $y); // 本月开始时间 } - return false; + if($order_time >= $checktime){ + //未在结算期内,允许换绑 + return false; + } + //其他情况不允许换绑 + return true; + } /** diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index a63e42791..1236ffafd 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -446,6 +446,10 @@ class PlatformController extends ThinkController $play_info_map = " and upi.server_id = '{$_REQUEST['server_id']}' and upi.game_name = '{$_REQUEST['game_name']}'"; } + if (!empty($_REQUEST['admin_id'])) { + $map['promote.admin_id'] = $_REQUEST['admin_id']; + } + $today = total(1); $week = total(2); $mounth = total(3); @@ -456,13 +460,23 @@ class PlatformController extends ThinkController $map['u.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))]; } } + + + // 如果是市场专员那么只能看自己的会长信息 + $isMarketAdmin = isMarketAdmin(); + if ($isMarketAdmin) { + $map['promote.admin_id'] = is_login(); + } + //为数据权限添加 setPowerPromoteIds($map, 'u.promote_id'); + $data = M("User u","tab_") ->field("count(u.id) as count,IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id") ->join("tab_promote promote ON u.promote_id = promote.id","left") ->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false) ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) + ->join('tab_game on u.fgame_id = tab_game.id') ->where($map) ->group('id') ->order('count desc, register_time') @@ -491,6 +505,7 @@ class PlatformController extends ThinkController ->join("tab_promote promote ON u.promote_id = promote.id","left") ->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false) ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) + ->join('tab_game on u.fgame_id = tab_game.id') ->where($tmap) ->group('id') ->order('register_time') @@ -539,7 +554,7 @@ class PlatformController extends ThinkController $count = count($data); foreach ($data as $key => $value) { static $i = 0; - $i++; + $i++; $data[$key]['rand'] = $i; } @@ -563,9 +578,21 @@ class PlatformController extends ThinkController $pnum = ceil(count($data) / $size); //总页数,ceil()函数用于求大于数字的最小整数 //用array_slice(array,offset,length) 函数在数组中根据条件取出一段值;array(数组),offset(元素的开始位置),length(组的长度) $data = array_slice($data, ($arraypage - 1) * $size, $size); + + $companys = !empty($data) ? M('promote', 'tab_') + ->field('tab_promote.id, company_name, sys_member.nickname as admin_username') + ->join("tab_promote_company on tab_promote.company_id = tab_promote_company.id", 'left') + ->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left') + ->where("tab_promote.id in (".implode(',', array_column($data, 'id')).")")->select() : []; + $companys = $companys ? array_column($companys, null, 'id') : []; + foreach ($data as &$item) { + $item['company_name'] = $companys[$item['id']]['company_name'] ?? '无'; + $item['admin_username'] = $companys[$item['id']]['admin_username'] ?? '无'; + } $this->meta_title = '渠道注册统计列表'; $this->assign("is_admin",is_administrator()); $this->assign('list_data', $data); + $this->assign('admin_users', M('member')->field('uid,nickname')->select()); $this->assign('total', $total); $this->display(); } @@ -601,7 +628,7 @@ class PlatformController extends ThinkController $map['pay_time'] = ['between', array(0, time())]; // $pay_time = " between 0 and " . time(); } - $map1['pay_status'] = $map['pay_status'] = 1; + $map1['s.pay_status'] = $map['s.pay_status'] = 1; $today = total(1); $week = total(2); $mounth = total(3); @@ -616,17 +643,18 @@ class PlatformController extends ThinkController }else{ $tmin = $tmonth[1][0]; } - - //为数据权限添加 - setPowerPromoteIds($map, 'tp1.id'); if (isset($_REQUEST['promote_id'])) { - $map['tp1.id'] = $_REQUEST['promote_id']; + //$map['tp1.id'] = $_REQUEST['promote_id']; + $promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select(); + if ($promoter_ids) { + $map['tp1.id'] = $_REQUEST['promote_id']; + $map['tp2.id'] = ['in', implode(',', array_column($promoter_ids, 'id'))]; + } } else { $map['tp1.chain'] = '/'; } - if (isset($_REQUEST['game_name'])) { $map['s.game_name'] = $_REQUEST['game_name']; if (isset($_REQUEST['server_id'])) { @@ -635,20 +663,47 @@ class PlatformController extends ThinkController } } - if (isset($_REQUEST['game_name'])||isset($_REQUEST['promote_id'])) { - $data = M('promote', 'tab_')->alias('tp1') - ->field('tp1.account as promote_account,tp1.id, - floor(sum(pay_amount)*100) as count') - ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left') - ->join("tab_spend as s use INDEX(search) on tp2.id = s.promote_id", 'left') - ->where($map) - ->group('tp1.id') - ->order('count desc') - ->select(); + if (isMarketAdmin()) { + $map['s.market_admin_id'] = is_login(); + } else if (!empty($_REQUEST['admin_id'])) { + $map['s.market_admin_id'] = $_REQUEST['admin_id']; } else { - $statisticsMap['time'] =$map['pay_time']; - $data = M('promote_statistics', 'tab_')->field("promote_account,promote_id as id,sum(count) count")->where($statisticsMap)->group("promote_id")->select(); - } + //为数据权限添加 + setPowerPromoteIds($map, 'tp1.id'); + } + + $data = M('promote', 'tab_')->alias('tp1') + ->field('tp1.account as promote_account,tp1.id, + floor(sum(pay_amount)*100) as count') + ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left') + ->join("tab_spend as s use INDEX(search) on tp2.id = s.promote_id", 'left') + ->join("tab_game as g on g.id = s.game_id", 'left') + ->where($map) + ->group('tp1.id') + ->order('count desc') + ->select(); + + // if (isset($_REQUEST['server_id'])||isset($_REQUEST['game_name'])||isset($_REQUEST['promote_id'])||isset($_REQUEST['admin_id'])||isset($_REQUEST['admin_user_id'])) { + // $data = M('promote', 'tab_')->alias('tp1') + // ->field('tp1.account as promote_account,tp1.id, + // floor(sum(pay_amount)*100) as count') + // ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left') + // ->join("tab_spend as s use INDEX(search) on tp2.id = s.promote_id", 'left') + // ->join("tab_game as g on g.id = s.game_id", 'left') + // ->where($map) + // ->group('tp1.id') + // ->order('count desc') + // ->select(); + // } else { + // $statisticsMap['time'] =$map['pay_time']; + // setPowerPromoteIds($statisticsMap, 'tab_promote.id'); + // $data = M('promote_statistics', 'tab_') + // ->field("promote_account,promote_id as id,sum(count) count") + // ->join('tab_promote on tab_promote.id = tab_promote_statistics.promote_id', 'left') + // ->where($statisticsMap) + // ->group("promote_id") + // ->select(); + // } // var_dump($data);die(); @@ -664,6 +719,7 @@ class PlatformController extends ThinkController floor(sum(IF(s.pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left') ->join("tab_spend as s on tp2.id = s.promote_id", 'left') + ->join("tab_game as g on g.id = s.game_id", 'left') ->where($tmap) ->group('tp1.id') ->select(); @@ -674,6 +730,7 @@ class PlatformController extends ThinkController $v['mounth'] = 0; $tmdata[$v['id']] = $v; } + //dd($data); foreach ($tdata as $k => $v) { $tmdata[$v['id']]['today'] = $v['today']; @@ -683,16 +740,18 @@ class PlatformController extends ThinkController $tmdata[$v['id']]['promote_account'] = $v['promote_account']; $tmdata[$v['id']]['count'] = 0; } + + $tmdata[$v['id']]['id'] = $v['id']; } $data = []; foreach($tmdata as $k => $v){ $data[] = $v; } - // dd($data); - unset($map['tp1.id']); + //dd($data); + unset($map['tp1.id'], $map['tp2.id'], $map['tp2.admin_id']); unset($map['tp1.chain']); unset($tmap['tp1.id']); - unset($tmap['tp1.chain']); + unset($tmap['tp1.chain'], $tmap['tp2.id']); $map['s.promote_id'] = 0; $tmap['s.promote_id'] = 0; $authorityData['count'] = 0; @@ -760,7 +819,17 @@ class PlatformController extends ThinkController $data = my_sort($data, $data_order_type, (int)$data_order); $size = $row;//每页显示的记录数 - $pnum = ceil(count($data) / $size); //总页数,ceil()函数用于求大于数字的最小整数 + $companys = !empty($data) ? M('promote', 'tab_') + ->field('tab_promote.id, company_name, sys_member.nickname as admin_username') + ->join("tab_promote_company on tab_promote.company_id = tab_promote_company.id", 'left') + ->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left') + ->where("tab_promote.id in (".implode(',', array_column($data, 'id')).")")->select() : []; + $companys = $companys ? array_column($companys, null, 'id') : []; + foreach ($data as &$item) { + $item['company_name'] = $companys[$item['id']]['company_name'] ?? '无'; + $item['admin_username'] = $companys[$item['id']]['admin_username'] ?? '无'; + } + if(isset($_REQUEST['export'])){ $GetData = $_GET; @@ -769,7 +838,9 @@ class PlatformController extends ThinkController addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出推广员充值统计','url'=>U('Platform/promotepay_statistics',$GetData),'menu'=>'统计-统计-推广员统计-推广员充值统计']); data2csv($data,'推广员充值统计',array( - "promote_account"=>"推广员账号", + 'company_name' => '公司', + "promote_account"=>"会长账号", + 'admin_username' => '当前市场专员', "count"=>"累计充值", "rand"=>"排行榜", "today"=>"今日充值", @@ -783,6 +854,7 @@ class PlatformController extends ThinkController $data = array_slice($data, ($arraypage - 1) * $size, $size); $this->meta_title = '渠道充值统计列表'; $this->assign('list_data', $data); + $this->assign('admin_users', M('member')->field('uid,nickname')->select()); $this->assign("is_admin",is_administrator()); $this->display(); diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php index cc1c4a612..fc537e30a 100644 --- a/Application/Admin/Controller/SpendController.class.php +++ b/Application/Admin/Controller/SpendController.class.php @@ -72,26 +72,19 @@ class SpendController extends ThinkController unset($_REQUEST['pay_game_status']); } - $marketAdminId = I('market_admin_id', 0); - if ($marketAdminId) { - $map['market_admin_id'] = $marketAdminId; - } - + $marketAdminId = 0; $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { $userAuth = session('user_auth'); - $map['market_admin_id'] = $userAuth['uid']; + $marketAdminId = $userAuth['uid']; + } else { + $marketAdminId = I('market_admin_id', 0); + } + if ($marketAdminId > 0) { + $map['market_admin_id'] = $marketAdminId; + } else { + setPowerPromoteIds($map,'promote_id'); } - -// $promoteRoot = getPowerPromoteIds(); -// $data_empower_type = session('user_auth')['data_empower_type']; -// -// if ($promoteRoot) { -// $map['promote_id'] =array('in',$promoteRoot); -// } else if(!$promoteRoot&&$data_empower_type!=1){ -// $map['id'] = array('lt',1); -// } - setPowerPromoteIds($map,'promote_id'); if (isset($_REQUEST['promote_id'])) { $promoteId = intval($_REQUEST['promote_id']); diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index 93bc74b1a..98eb44392 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -288,7 +288,7 @@ class UserController extends AdminController $User = new UserApi; $uid = $User->register($username, $password, $email, $second_pwd); if (0 < $uid) { //注册成功 - $user = array('uid' => $uid,'realname'=>$real_name, 'nickname' => $username, 'status' => 1,"birthday"=>date('Y-m-d',time())); + $user = array('uid' => $uid,'real_name'=>$real_name, 'nickname' => $username, 'status' => 1,"birthday"=>date('Y-m-d',time())); $data['uid'] = $uid; $data['group_id'] = I('auth'); M('auth_group_access')->data($data)->add(); diff --git a/Application/Admin/Controller/VerifyBillController.class.php b/Application/Admin/Controller/VerifyBillController.class.php index 62d4a925d..5d77a29af 100644 --- a/Application/Admin/Controller/VerifyBillController.class.php +++ b/Application/Admin/Controller/VerifyBillController.class.php @@ -157,9 +157,11 @@ class VerifyBillController extends Controller { $data['receive_company'] = $data['first_party_info']; $data['pay_company'] = $data['second_party_info']; } - if($data['receive_company']['invoice_type'] == 1){ + if($data['receive_company']['invoice_type'] == 0){ + $data['receive_company']['invoice_type']="无"; + } elseif ($data['receive_company']['invoice_type'] == 1) { $data['receive_company']['invoice_type']="专票"; - }else{ + } else { $data['receive_company']['invoice_type']="普票"; } if ($data['company_belong'] == 9) {//上游 diff --git a/Application/Admin/Model/PromoteModel.class.php b/Application/Admin/Model/PromoteModel.class.php index 3370b1e4f..718ed6887 100644 --- a/Application/Admin/Model/PromoteModel.class.php +++ b/Application/Admin/Model/PromoteModel.class.php @@ -406,7 +406,7 @@ class PromoteModel extends Model{ $where['level'] = $level; $userAuth = session('user_auth'); - setPowerPromoteIds($where,'id'); + // setPowerPromoteIds($where,'id'); $offcialData = [0=>['id'=>0,'nickname'=>C('OFFICIEL_CHANNEL')]]; diff --git a/Application/Admin/View/CompanyRelation/addRelation.html b/Application/Admin/View/CompanyRelation/addRelation.html index a7ffd7ce6..d4263aaf8 100644 --- a/Application/Admin/View/CompanyRelation/addRelation.html +++ b/Application/Admin/View/CompanyRelation/addRelation.html @@ -107,7 +107,7 @@ @@ -142,7 +142,7 @@ @@ -175,8 +175,8 @@ *结算周期: @@ -186,7 +186,8 @@ *开票类型: @@ -333,10 +334,15 @@ $(function(){ first_company = data.info; var companystr = ''; for (var i in first_company) { - companystr += "" + var selected = '' + if (first_company[i].company_name == '福建金菠菜网络科技有限公司') { + selected = 'selected' + } + companystr += "" } $("#first_company_id").html(companystr); $("#first_company_id").select2(); + $("#first_company_id").change(); }) }) $("#first_company_id").on("change",function(){ @@ -349,6 +355,7 @@ $(function(){ $("#first_company_name").val(companyinfo.company_name); $("#first_company_info").html(setCompanyInfo(companyinfo)); }); + $("#first_company_type").change(); $("#second_company_type").on("change",function(){ //置空 @@ -369,6 +376,7 @@ $(function(){ $("#second_company_id").select2(); }) }) + $("#second_company_type").change(); $("#second_company_id").on("change",function(){ var id = $(this).find("option:selected").val(); //获取基础信息 diff --git a/Application/Admin/View/CompanyRelation/editRelation.html b/Application/Admin/View/CompanyRelation/editRelation.html index 0c310e144..b19c13115 100644 --- a/Application/Admin/View/CompanyRelation/editRelation.html +++ b/Application/Admin/View/CompanyRelation/editRelation.html @@ -163,6 +163,7 @@ *开票类型: diff --git a/Application/Admin/View/CompanyStatement/editCpStatement.html b/Application/Admin/View/CompanyStatement/editCpStatement.html index 6755de89a..23efb5ce8 100644 --- a/Application/Admin/View/CompanyStatement/editCpStatement.html +++ b/Application/Admin/View/CompanyStatement/editCpStatement.html @@ -274,6 +274,7 @@
diff --git a/Application/Admin/View/CompanyStatement/editPcStatement.html b/Application/Admin/View/CompanyStatement/editPcStatement.html index cc1fad06e..ea332726c 100644 --- a/Application/Admin/View/CompanyStatement/editPcStatement.html +++ b/Application/Admin/View/CompanyStatement/editPcStatement.html @@ -269,6 +269,7 @@
@@ -351,10 +352,18 @@
+ diff --git a/Application/Admin/View/CompanyStatementPool/editCpStatement.html b/Application/Admin/View/CompanyStatementPool/editCpStatement.html index 6755de89a..23efb5ce8 100644 --- a/Application/Admin/View/CompanyStatementPool/editCpStatement.html +++ b/Application/Admin/View/CompanyStatementPool/editCpStatement.html @@ -274,6 +274,7 @@
diff --git a/Application/Admin/View/CompanyStatementPool/editPcStatement.html b/Application/Admin/View/CompanyStatementPool/editPcStatement.html index 9d2f3547f..d030fc6b8 100644 --- a/Application/Admin/View/CompanyStatementPool/editPcStatement.html +++ b/Application/Admin/View/CompanyStatementPool/editPcStatement.html @@ -269,6 +269,7 @@
@@ -351,10 +352,18 @@
+ diff --git a/Application/Admin/View/FinancePromote/gameStatistics.html b/Application/Admin/View/FinancePromote/gameStatistics.html index f46117538..b1f47860f 100644 --- a/Application/Admin/View/FinancePromote/gameStatistics.html +++ b/Application/Admin/View/FinancePromote/gameStatistics.html @@ -194,7 +194,7 @@ 推广公司 会长账号 - 所属市场专员 + 当前所属市场专员 团体类型 开发类型 游戏 diff --git a/Application/Admin/View/FinancePromote/index.html b/Application/Admin/View/FinancePromote/index.html index b7bdae4c9..545faf957 100644 --- a/Application/Admin/View/FinancePromote/index.html +++ b/Application/Admin/View/FinancePromote/index.html @@ -183,7 +183,7 @@ 推广公司 会长渠道 - 所属市场专员 + 当前所属市场专员 内外团 开发类型 diff --git a/Application/Admin/View/FinancePromote/promoteUser.html b/Application/Admin/View/FinancePromote/promoteUser.html index 21dc5d37a..efac2aafa 100644 --- a/Application/Admin/View/FinancePromote/promoteUser.html +++ b/Application/Admin/View/FinancePromote/promoteUser.html @@ -174,7 +174,7 @@ 推广公司 推广员账号 - 所属市场专员 + 当前所属市场专员 团体类型 开发类型 diff --git a/Application/Admin/View/Mend/edit.html b/Application/Admin/View/Mend/edit.html index dccb49a24..022c92554 100644 --- a/Application/Admin/View/Mend/edit.html +++ b/Application/Admin/View/Mend/edit.html @@ -87,7 +87,7 @@ 订单日期: - + diff --git a/Application/Admin/View/Platform/promote_statistics.html b/Application/Admin/View/Platform/promote_statistics.html index 1c3959f93..c8942ea10 100644 --- a/Application/Admin/View/Platform/promote_statistics.html +++ b/Application/Admin/View/Platform/promote_statistics.html @@ -53,14 +53,23 @@
- +
+
+ + +
- +
+
+ + +
'; + + if($row == 999999){ + $aside .= ''; + }else{ + $aside .= ''; + } + if($row == 10){ + $aside .= ''; + }else{ + $aside .= ''; + } + if($row == 50){ + $aside .= ''; + }else{ + $aside .= ''; + } + if($row == 100){ + $aside .= ''; + }else{ + $aside .= ''; + } + + $count=$count?$count:0; + $row=$row?$row:10; + if ($count > $row) { + $page = new \Think\Page($count, $row,$request); + $page->setConfig('theme', '%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%'); + + $html = $page->show(); + + return str_replace('
','
' .$aside,$html); + } else { + return '
' .$aside. '共 '.$count.' 条记录
'; + } +} + + function get_source_from_game($id=0) { if (!is_numeric($id) || $id<1) {return '全部';} diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index d09b4ae87..3ff0f0ce2 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -2111,7 +2111,7 @@ class QueryController extends BaseController $timeout = 0; $records = []; - if (intval($endTime - $beginTime) / (24 * 3600) <= 7) { + if (intval($endTime - $beginTime) / (24 * 3600) <= 31) { $promoteRepository = new PromoteRepository(); $createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params); $createRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds($ids, $params); diff --git a/Application/Home/View/default/Query/achievement.html b/Application/Home/View/default/Query/achievement.html index 7359bbf11..460cd03c0 100644 --- a/Application/Home/View/default/Query/achievement.html +++ b/Application/Home/View/default/Query/achievement.html @@ -162,7 +162,7 @@ + + + + + + \ No newline at end of file diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html new file mode 100644 index 000000000..f9457192e --- /dev/null +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + + + + +
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
合作公司公司类型创建时间批次号结算金额结算流水打款状态支付时间预打款备注操作
aOh! 暂时还没有内容!
{$data.company_name}{$data.company_type}{$data.create_time}{$data.batch_num}{$data.statement_money}{$data.platform_amount}{$data.pay_status_str}{$data.pay_status_str}{$data.pay_time}{$data.remark} + 查看 + 导出 + + 打款详情 + +
合计 + 打款成功金额: {$money.success_money}  /  待打款金额: {$money.statement_money}  /  打款失败金额: {$money.error_money} +
+
+ +
+
+ + + + {$_page|default=''} +
+ + + + + if(C('COLOR_STYLE')=='blue_color') echo ' + + '; + + + + + + + + + + diff --git a/Application/Payment/View/ExcelPayment/paymentInfo.html b/Application/Payment/View/ExcelPayment/paymentInfo.html new file mode 100644 index 000000000..26307c007 --- /dev/null +++ b/Application/Payment/View/ExcelPayment/paymentInfo.html @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + + + + + + diff --git a/Application/Payment/View/ExcelPayment/showPayment.html b/Application/Payment/View/ExcelPayment/showPayment.html new file mode 100644 index 000000000..752a89314 --- /dev/null +++ b/Application/Payment/View/ExcelPayment/showPayment.html @@ -0,0 +1,315 @@ + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
序号合作公司支付宝真实名称支付宝账号批次号金额(元)备注打款备注
{$key-0+1}{$vo.company_name}{$vo.company_info.ali_user}{$vo.company_info.ali_account}{$vo.batch_num}{$vo.statement_money}{$vo.remark}
合计:打款总金额: {$count['statement_money']} style="color: red;">    账户金额: {$money}
+
+
+ +
+ +
获取验证码
+
接收验证码手机:{$mobile}
+
+ +
+ +
+ + + +
+ + + \ No newline at end of file diff --git a/Application/Payment/View/ExcelPayment/viewPuPool.html b/Application/Payment/View/ExcelPayment/viewPuPool.html new file mode 100644 index 000000000..044807b9b --- /dev/null +++ b/Application/Payment/View/ExcelPayment/viewPuPool.html @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
序号下游名称会长账号下游类型市场员下游性质产品产品类型结算时间推广流水分成比例补点奖励罚款结算金额支付宝真实姓名支付宝账号制单人复核人员打款状态打款时间备注
{$key-0+1}{$com.company_name}{$com['statement_info'][0]['account']}-{$com.company_info.company_relation_str}{$com.company_info.nickname}{$com.company_info.company_type_str}{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['game_list'][0]['game_type_name']}{$com['statement_info'][0]['game_list'][0]['statement_time']}{$com['statement_info'][0]['game_list'][0]['pay_amount']}{$com['statement_info'][0]['game_list'][0]['ratio']|default=0}%{$com['statement_info'][0]['game_list'][0]['increment_ratio']|default=0}%{$com['statement_info'][0]['game_list'][0]['reward']}{$com['statement_info'][0]['game_list'][0]['fine']}{$com['statement_info'][0]['game_list'][0]['sum_money']}---------{$com.company_info.ali_user}{$com.company_info.ali_account}{$com.document_maker}{$com.payment_user}{$com.pay_status_str}{$com.pay_time}{$com.remark}
{$game['game_name']}{$game['game_type_name']}{$game['statement_time']}{$game['pay_amount']}{$game['ratio']|default=0}%{$game['increment_ratio']|default=0}%{$game['reward']}{$game['fine']}{$game['sum_money']}
{$account['account']}{$account['game_list'][0]['game_name']}{$account['game_list'][0]['game_type_name']}{$account['game_list'][0]['statement_time']}{$account['game_list'][0]['pay_amount']}{$account['game_list'][0]['ratio']|default=0}%{$account['game_list'][0]['increment_ratio']|default=0}%{$account['game_list'][0]['reward']}{$account['game_list'][0]['fine']}{$account['game_list'][0]['sum_money']}---------
{$game['game_name']}{$game['game_type_name']}{$game['statement_time']}{$game['pay_amount']}{$game['ratio']|default=0}%{$game['increment_ratio']|default=0}%{$game['reward']}{$game['fine']}{$game['sum_money']}
合计:{$count.platform_amount}{$count.sum_money}
+
+
+ + + diff --git a/Application/Payment/View/Payment/lists.html b/Application/Payment/View/Payment/lists.html index a15281e7e..02176e57c 100644 --- a/Application/Payment/View/Payment/lists.html +++ b/Application/Payment/View/Payment/lists.html @@ -96,7 +96,7 @@ @@ -169,7 +169,9 @@ diff --git a/Application/Payment/View/Payment/showPayment.html b/Application/Payment/View/Payment/showPayment.html index 1ec0caf14..21b480be7 100644 --- a/Application/Payment/View/Payment/showPayment.html +++ b/Application/Payment/View/Payment/showPayment.html @@ -278,6 +278,7 @@ if($.trim(verify) == ''){ MSG.hidemsg(); alert('验证码不能为空'); + return false; }; DATA.data=[]; DATA.now=1; diff --git a/Application/Payment/View/Payment/transfer_set.html b/Application/Payment/View/Payment/transfer_set.html index 26c167d77..ca4492d0f 100644 --- a/Application/Payment/View/Payment/transfer_set.html +++ b/Application/Payment/View/Payment/transfer_set.html @@ -16,7 +16,7 @@ - 打款验证手机号 + 复核账号 @@ -74,7 +74,7 @@ $.ajax({ type:'post', dataType:'json', - data:'phone='+mobile, + data:'phone='+ym, url:'{:U("Public/telsafecode")}', success:function(data) { if (data.status ==1) { diff --git a/Application/Payment/View/Public/base.html b/Application/Payment/View/Public/base.html index 71563cc03..edf351e1f 100644 --- a/Application/Payment/View/Public/base.html +++ b/Application/Payment/View/Public/base.html @@ -71,7 +71,7 @@
  • 退出
  • - {:session('payment_user.mobile')} + {:session('payment_user.real_name')}
    @@ -203,13 +203,24 @@ $(function(){
    功能菜单
    --> @@ -279,7 +290,7 @@ $(function(){ location.reload(); }, error:function(){ - updateAlert("服务器故障!",'tip_error'); + updateAlert('退出成功','tip_right'); setTimeout(function(){ $('#tip').find('.tipclose').click(); },1500); diff --git a/Application/Payment/View/User/add.html b/Application/Payment/View/User/add.html new file mode 100644 index 000000000..ab9fc7180 --- /dev/null +++ b/Application/Payment/View/User/add.html @@ -0,0 +1,50 @@ + + + +
    +
    + + + + + + + + + + + + + + + +
    *姓名: + + 制单人姓名 +
    *手机号码: + + 制单人登陆用的手机 +
    + +
    + + + 返回 + +
    + +
    +
    +
    + + + + diff --git a/Application/Payment/View/User/index.html b/Application/Payment/View/User/index.html new file mode 100644 index 000000000..4b93c1ab7 --- /dev/null +++ b/Application/Payment/View/User/index.html @@ -0,0 +1,84 @@ + + + + + + + + +
    +
    + 新增 +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    姓名手机号码操作
    {$vo.real_name}{$vo.mobile} + 删除 +
    aOh! 暂时还没有内容!
    +
    +
    + + {$_page} +
    + + +
    + + + + + + diff --git a/Data/update.sql b/Data/update.sql index 5ed891243..aa6d436fe 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2075,6 +2075,36 @@ ADD COLUMN `fax_ratio` varchar(20) NULL COMMENT '开票税率' AFTER `ali_accou ALTER TABLE `sys_shift_task` ADD COLUMN `change_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '推广员充值换榜执行状态 0 未处理 1 已处理' AFTER `status`; + + + +CREATE TABLE `tab_excel_statement_info` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键', + `batch_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '批次号', + `company_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '公司性质: 1-下游公司 2-下游个人 3上游公司', + `company_name` varchar(60) NOT NULL DEFAULT '' COMMENT '对账公司名称', + `company_info` text NOT NULL COMMENT '公司其他信息json', + `statement_money` decimal(10,2) DEFAULT '0.00' COMMENT '对账金额', + `platform_amount` decimal(10,2) DEFAULT '0.00' COMMENT '平台流水金额', + `fine` decimal(10,2) DEFAULT '0.00' COMMENT '罚款', + `reward` decimal(10,2) DEFAULT '0.00' COMMENT '奖励', + `statement_begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间', + `statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间', + `statement_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算单号', + `statement_info` text NOT NULL COMMENT '订单相关信息json', + `pay_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '打款状态 -1:打款失败 0:未打款 1:打款成功', + `pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付完成时间', + `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '生成时间', + `pay_info` text COMMENT '打款信息', + `document_maker` varchar(255) DEFAULT '' COMMENT '制单信息', + `payment_user` varchar(255) DEFAULT '' COMMENT '打款基础信息', + `remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注', + PRIMARY KEY (`id`), + KEY `batch_num` (`batch_num`) USING BTREE, + KEY `statement_begin_time` (`statement_begin_time`) USING BTREE, + KEY `statement_end_time` (`statement_end_time`) USING BTREE, + KEY `pay_status` (`pay_status`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='exce汇总单'; --市场专员提成结算 zyx 20200629 ALTER TABLE `sys_member` ADD COLUMN `real_name` varchar(255) NULL DEFAULT '' COMMENT '真实姓名' AFTER `status`; @@ -2117,4 +2147,22 @@ CREATE TABLE `tab_market_altogether` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -INSERT INTO `tab_tool`(`id`, `name`, `title`, `config`, `type`, `status`) VALUES (59, 'tax_radio', '公司税费', '{"tax_radio":1.5,"time":1589361782}', 1, 1) \ No newline at end of file +INSERT INTO `tab_tool`(`id`, `name`, `title`, `config`, `type`, `status`) VALUES (59, 'tax_radio', '公司税费', '{"tax_radio":1.5,"time":1589361782}', 1, 1) + + + + +--20200709 chenzhi +CREATE TABLE `tab_payment_member` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID', + `real_name` varchar(255) DEFAULT '' COMMENT '真实姓名', + `mobile` char(11) NOT NULL COMMENT '手机号码', + `last_login_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后登录时间', + PRIMARY KEY (`id`), + KEY `mobile` (`mobile`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='打款登陆账号'; + + +INSERT INTO `tab_payment_member` (`id`, `real_name`, `mobile`, `last_login_time`) VALUES ('1', '胡歌', '18959188422', '0') + + diff --git a/ThinkPHP/Library/Vendor/Alipay2020/Fund.php b/ThinkPHP/Library/Vendor/Alipay2020/Fund.php index 53a2d5f14..ea76337a1 100644 --- a/ThinkPHP/Library/Vendor/Alipay2020/Fund.php +++ b/ThinkPHP/Library/Vendor/Alipay2020/Fund.php @@ -6,13 +6,13 @@ require_once "aop/request/AlipayFundTransOrderQueryRequest.php"; require_once "aop/request/AlipayFundAccountQueryRequest.php"; class Fund { - private $appCertPath = __DIR__ . "/cert/appCertPublicKey_2021001165628090.crt"; + private $appCertPath = __DIR__ . "/cert/appCertPublicKey_2021001150621489.crt"; private $alipayCertPath = __DIR__ . "/cert/alipayCertPublicKey_RSA2.crt"; private $rootCertPath = __DIR__ . "/cert/alipayRootCert.crt"; private $gatewayUrl = "https://openapi.alipay.com/gateway.do"; - private $appId = "2021001165628090"; - private $alipayUserId = '2088331082835421'; // pid - private $rsaPrivateKey = 'MIIEowIBAAKCAQEAmDggf4zno5KmKKEv0gbKctXyceEylTbWgZhannFGDXBkVkUqKC1btcKOFRWteVcQDFFCAgMobiTxH4rpIopyoC3x66mAynTVQnEWYFCyc628ZMAJ6aXQMvYNmzJgDczX8YI9taXbOf2YtV3uLdSs6t3Qm/rCBfrn/wj30QNsUm1f8yqCiHVwZ3jTM3ygKCr4SU3XjTKa1IqlYvGgIHrNHmTwATxvNRXa9pDTvSFz/zdvFxveWBn9PDhiNVebgEDFq0Xtv//z78UzRC3T8vV7HfCvcuR/gH0bVhvTzK55VlXlANM8o06tGsOj1jpJUGjUeMe2yiH9bDO810zNuri9LwIDAQABAoIBADoZQh4s88S1FoJvc0cgnGjUTCM3Jw1YzurL8dqDtY8vlLxwzbRkC5sGVSCrE3k6x79LzHvkJKxVoUq+xFkQqsuEfc/K9INRsIwZicbdRh9s8nkp6x6o0RyCWZMg2RSrWMivQ0pvsYsixgSDg4Mup4lFfHfsb93EdIQdMikuu0uCKFcXLO8UTma7mBRLdOis11vaZv7ROVftEUww9MZHCh/AJl7S73RvwZwZHQ9H5Y7fJ8EFqARJmTDEwDaOUQUGVTVho85KIlvpQ9gYbwy9R+xbftBSra+/THTiYjcMPR06wbf0dQwSunsz/NK4guVIpjKD23hQI1XcTcvxl6qRvjECgYEA12oro1NV9U4wVdwbbGzonW3hyNIE8pNbs3AE4q8pJF8aTVVnQuicunrgfK1W88urrngMMx+byg4ZnxUmahcyU+fId+z6FZbfypij+lMRpF85oQ0bhcXn04dcJimMlNrV4i62GeVcKtaAvoVXNYOXeS7SHtZ2nI0f7ArHbdgpbgMCgYEAtOXtfm3+CmNrlbhyPXPjUbNY3q3Uo09X6R01zYSvIobl3hoVVsw+7zJIAAaCTLcRxiVhvK5QVdRi/ohUphu2YugJx8fzNw6zl0iR/B9dWpDplMFDn3VOuS5UBeIHDn1C/A8RO7VKmYpCSAyHZxaxg0sAsAqjn9pk0ClvFpshcmUCgYEAwxXL32Yher8M1zU3QMKBB9HzoMNS57y8V40jX4fyYpYeY9rsYZP4HIobs83n6XKSULc3lTUTCbIrUf79gybu1T4cNz/OXK7+jaQfHR0N5Sa4MjqEqmnIwbDcq1MFlel5uhVDpcAp8EHC5sgrarN6Aq18baEcWjsUpdg9NCWHn7ECgYAVcyodErfLzYwlPbC2Hra2qliAVwZesvrOlnsZuoD1zB8Xneon16IixMiK0DrFE/QUlbwoHldCRiPS4KGA7MpMogz+1nO9dI3RA3bj+WgdZA9+Zwg4sTU7egXWiL2jdzDpKHQ3q0CEQkOnvWyUybkUw2D6fth2DPRlRnR4rr5hjQKBgHxl/E/sWi8iTN1thUbWzs2Q/8Qt+CHiXnWEU1rraV/0OlE4wbYVyFxURuZHCNdpTyuj0LS28WanbjJsmceL//+hy5qcjSBFJ8UO4Mw8pwDM8SEfWbo/MHNV48ElovOXxLrKTuvQUR6duWkv73qZYOpPYr+Rl0ylHGvNsqsLY7LZ'; + private $appId = "2021001150621489"; + private $alipayUserId = '2088731986604211'; // pid + private $rsaPrivateKey = 'MIIEogIBAAKCAQEAokaztliXge4pDoNWVVdYNSq6N+Be7xNU2LBKAN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LVn8nOMuQ6SS3gocF9slF4gs+wTydWXqYlP4adKIVD536IySyifYbcC5qxNxiNuu8k9TPRD7OX5dMOjEe9yV+3yZlFuyCCH9zpOuqIgQKBgHu8/rJoHfHKb0SXfm3ebFvoL0M0k2SnfnOFogkBZXh3rDDIvFkh6cccVj9rKtyRSW8EHyx9cZsqUoZTH9EcT1zRXITfGeR7y6/31V60eDk1m1auQOF4VDqvI4fBTY9QeUx8wvh9kzxN640lzmkXZRppHZSWRmduOAgmj58NJqBRAoGAY0qXaL0nDAehVpoxVUDmFdPuallq9oEz5z5Q29A0IXm/dHkbbHEtEdE/MU9WPn3yOIwwGkF21q3cormt4oyi2ro4OlFSKmpQzMtg/I5Tj5XbOz13FYA60IhjYwqZ2pW/l8oEg6ZAIo2vNSjqJudQS/16Q8xu8Gxzl9E9e3LZBeE='; public function transfer($aliAccount, $realName, $orderId, $amount, $title='') { diff --git a/ThinkPHP/Library/Vendor/Alipay2020/cert/alipayCertPublicKey_RSA2.crt b/ThinkPHP/Library/Vendor/Alipay2020/cert/alipayCertPublicKey_RSA2.crt index 8fc7dd8be..de52fd899 100644 --- a/ThinkPHP/Library/Vendor/Alipay2020/cert/alipayCertPublicKey_RSA2.crt +++ b/ThinkPHP/Library/Vendor/Alipay2020/cert/alipayCertPublicKey_RSA2.crt @@ -1,19 +1,19 @@ -----BEGIN CERTIFICATE----- -MIIDtTCCAp2gAwIBAgIQICAGGS5p70QviSuHRfPPBjANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UE +MIIDtTCCAp2gAwIBAgIQICAHED3e6K/ggqeAVyIHETANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UE BhMCQ04xFjAUBgNVBAoMDUFudCBGaW5hbmNpYWwxIDAeBgNVBAsMF0NlcnRpZmljYXRpb24gQXV0 aG9yaXR5MTkwNwYDVQQDDDBBbnQgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IENs -YXNzIDIgUjEwHhcNMjAwNjE5MDc1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ms1LzfrlnjN7ZX6c4M3qQGDlktyaHwYk= +rOWPuC0yMDg4NzMxOTg2NjA0MjExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1mzN +HVTVj+5LOxqUA/J5MVtRBMnd8IkZqKfqjTtq0+OJEIMqm+8AY4evq5/intUT7yjar8sNF/F0HzAj +GErjVq2QIhZ/ttxMkEzaiq2mnd8jpS9Cmd3JtluIGdl079nZlfr7lC/0IF+/AbxoTxksKOg+5vrl +QNQUZiTz2uVs2bP3bJTvnKjkAT1yPUMvb3ywcmbAhles8zE9NeHtgO5/sHK3nhXYJ8+IxLW6CUaI +0wIA0uS7SDzJ7uckCuvLoVRf0qercSy7xaO5Iw3nxgJbCUaj3AAagO9R1FBxCO7W53XxxThMcJ+J +B76yrUTGVgWf2DlpNG/mS0MEi0Qn9dgB6QIDAQABoxIwEDAOBgNVHQ8BAf8EBAMCA/gwDQYJKoZI +hvcNAQELBQADggEBAG6x4fRx3bfTIrwk3VYH1dE4kVPpLum0nEYcLRi2Q/C/DTmyLY3kp/kBZWF2 +J9zYWk9tGnTxD9DIW+2B0D+nU5YK/5z2o3jB9D6TA1OwKex5DS0NoGu2khHHAOqIb0NWvj0s00tH +osdXXlfQ+5KYHz36iS53er/ZlpPJcuF1NlhqRSDmKKDLkhqqM2rQG+eVqmi4uMEbOMBC7ELN+KLl +DbTfDSwltpSkI6ZVrdEE7PuR/YX6TAj/8N1Wb8DxHCTRmXxlgq60GQgYhW1DqUsg4HmFxUKZMaDW +nlUasi9YwAH2gj0CCmNSi0Q7xPyEL/c9FMQFkeoWDo4IGA1YFZvM5gw= -----END CERTIFICATE----- diff --git a/ThinkPHP/Library/Vendor/Alipay2020/cert/alipayCertPublicKey_RSA2bak.crt b/ThinkPHP/Library/Vendor/Alipay2020/cert/alipayCertPublicKey_RSA2bak.crt new file mode 100644 index 000000000..8fc7dd8be --- /dev/null +++ b/ThinkPHP/Library/Vendor/Alipay2020/cert/alipayCertPublicKey_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jW/ewrqfJBtducXeeTdoBlZLNLfAR/6ap4HtsUH33ftjzK +WA9JyiqKiAwqfNDJo/RjxPLCAwMFXmfoZdwgF7pib/I6Y4HkrU8RFcFEg+I/5DHbR6giaFflZ6n/ +lhbFo+t8luMO+4J3eKdE1Qp/KuohbWxXpc+4AtWYMxUuhWulFP87c1SUKSWinnTrtLpamvFkYyIH +zPuF6lENjKScnzFUZTjkGs5Ms1LzfrlnjN7ZX6c4M3qQGDlktyaHwYk= +-----END CERTIFICATE----- diff --git a/ThinkPHP/Library/Vendor/Alipay2020/cert/alipayRootCertbak.crt b/ThinkPHP/Library/Vendor/Alipay2020/cert/alipayRootCertbak.crt new file mode 100644 index 000000000..76417c538 --- /dev/null +++ b/ThinkPHP/Library/Vendor/Alipay2020/cert/alipayRootCertbak.crt @@ -0,0 +1,88 @@ +-----BEGIN CERTIFICATE----- +MIIBszCCAVegAwIBAgIIaeL+wBcKxnswDAYIKoEcz1UBg3UFADAuMQswCQYDVQQG +EwJDTjEOMAwGA1UECgwFTlJDQUMxDzANBgNVBAMMBlJPT1RDQTAeFw0xMjA3MTQw +MzExNTlaFw00MjA3MDcwMzExNTlaMC4xCzAJBgNVBAYTAkNOMQ4wDAYDVQQKDAVO +UkNBQzEPMA0GA1UEAwwGUk9PVENBMFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAE +MPCca6pmgcchsTf2UnBeL9rtp4nw+itk1Kzrmbnqo05lUwkwlWK+4OIrtFdAqnRT +V7Q9v1htkv42TsIutzd126NdMFswHwYDVR0jBBgwFoAUTDKxl9kzG8SmBcHG5Yti +W/CXdlgwDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAQYwHQYDVR0OBBYEFEwysZfZ +MxvEpgXBxuWLYlvwl3ZYMAwGCCqBHM9VAYN1BQADSAAwRQIgG1bSLeOXp3oB8H7b +53W+CKOPl2PknmWEq/lMhtn25HkCIQDaHDgWxWFtnCrBjH16/W3Ezn7/U/Vjo5xI +pDoiVhsLw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YzK1XhJb+r4hK5ncf/w8qGtYlmyJpxk3hr1TfUJX +Yf4Zr0fJsGuv +-----END CERTIFICATE----- \ No newline at end of file diff --git a/ThinkPHP/Library/Vendor/Alipay2020/cert/appCertPublicKey_2021001150621489.crt b/ThinkPHP/Library/Vendor/Alipay2020/cert/appCertPublicKey_2021001150621489.crt new file mode 100644 index 000000000..044817754 --- /dev/null +++ b/ThinkPHP/Library/Vendor/Alipay2020/cert/appCertPublicKey_2021001150621489.crt @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEtDCCA5ygAwIBAgIQICAHEM2RAO/JML4UhVYc5TANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UE +BhMCQ04xFjAUBgNVBAoMDUFudCBGaW5hbmNpYWwxIDAeBgNVBAsMF0NlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MTkwNwYDVQQDDDBBbnQgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IENs +YXNzIDEgUjEwHhcNMjAwNzEwMDgwMzI0WhcNMjIwNzEwMDgwMzI0WjB8MQswCQYDVQQGEwJDTjEw +MC4GA1UECgwn56aP5bu66YeR6I+g6I+c572R57uc56eR5oqA5pyJ6ZmQ5YWs5Y+4MQ8wDQYDVQQL +DAZBbGlwYXkxKjAoBgNVBAMMITIwODg3MzE5ODY2MDQyMTEtMjAyMTAwMTE1MDYyMTQ4OTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKJGs7ZYl4HuKQ6DVlVXWDUqujfgXu8TVNiwSgDY +YXT30p8tVXQgYJ+227klwN/Lm5FWfMWf6BXDx2tCzGeSovYUZ7VPkcu7yTeZCsKj9Ql/KwlVo9ic +diLk1DXRQNU8wki1dVDDbyCJBUxZ5CVEfvmFqENhAQ2LkLHHEm73meFOWx3+MaKTYUONmt5cFcri +WgQt6v5uKS1ZASMbqT+x0oHNzP2T9BAR0aKuucB60bFu9ANyT2ApimsPvVtKnjNn5kl44VNFO00t +UMsli8GmIJBWckhbHBmFYBui9Xc3VZEm0MZXKf95BAUF58E4HTgwQnaDawwWciLXjDpc32djCv0C +AwEAAaOCASkwggElMB8GA1UdIwQYMBaAFHEH4gRhFuTl8mXrMQ/J4PQ8mtWRMB0GA1UdDgQWBBQ3 +VuZDLA1/hKP5jOXefOfhsU6oETBABgNVHSAEOTA3MDUGB2CBHAFuAQEwKjAoBggrBgEFBQcCARYc +aHR0cDovL2NhLmFsaXBheS5jb20vY3BzLnBkZjAOBgNVHQ8BAf8EBAMCBsAwLwYDVR0fBCgwJjAk +oCKgIIYeaHR0cDovL2NhLmFsaXBheS5jb20vY3JsNDMuY3JsMGAGCCsGAQUFBwEBBFQwUjAoBggr +BgEFBQcwAoYcaHR0cDovL2NhLmFsaXBheS5jb20vY2E2LmNlcjAmBggrBgEFBQcwAYYaaHR0cDov +L2NhLmFsaXBheS5jb206ODM0MC8wDQYJKoZIhvcNAQELBQADggEBAFluCa29FOM18vO2AXd4BQMR +2sgeObShsGcmg18dR7qlwznEbcpur+RwsBB29r8efeQlx2c6yb1ed3gDsYj/eWQzlB7o5Zk/xgnp +5ns5bxjkVOOX2+dwm8tBYgMZdl7N7B4rcvluok40XRhf55lSmHROpVC95HkteAWi1E3fx4noLOkZ +PSNy/0jYbEx2AsnMcgYb6/5wakCWyr8wJs9c/iCtacp65MTU5pi+/3ww7UZIPrvWMBD2Exx3dOaJ +HBbTS7msy0juJQIeu1K/+kA4TAYrP5gXB+ui3I3Gb71nJw24/J5cM8W3PVndb4xYlOIMgj6HRffx +4K1cC2iofo9ENUY= +-----END CERTIFICATE----- \ No newline at end of file