From 62f4ce33628c7046c987c5eccda60506376f579b Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 13 Aug 2020 14:07:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=B8=B8=E8=81=9A=E5=90=88?= =?UTF-8?q?=E6=89=93=E6=AC=BE=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PartnerController.class.php | 17 ++++++- .../PromoteCompanyController.class.php | 35 +++++++++++++-- .../View/CompanyRelation/addRelation.html | 2 +- .../Admin/View/CpJuheCompany/export.html | 8 ++-- .../Admin/View/CpJuheCompany/index.html | 8 ++-- Application/Admin/View/Game/edit.html | 44 +++++++++++++------ Application/Admin/View/Partner/export.html | 9 ++-- Application/Admin/View/Partner/index.html | 6 +-- Application/Admin/View/Partner/lists.html | 6 +-- .../Admin/View/PromoteCompany/export.html | 19 +++++--- .../Base/Tool/AggregateClient.class.php | 1 + 11 files changed, 114 insertions(+), 41 deletions(-) diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index 6540bf3af..c0234f284 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -2,6 +2,7 @@ namespace Admin\Controller; +use Base\Tool\AggregateClient; use User\Api\UserApi as UserApi; use Think\Controller; @@ -13,6 +14,8 @@ class PartnerController extends ThinkController { private $modelName = 'Partner'; public $OpAuthList=[]; + public $aggregatePackageName = []; + public function _initialize() { $this->admininfo = $_SESSION['onethink_admin']['user_auth']; @@ -61,6 +64,7 @@ class PartnerController extends ThinkController $is_export= false; if (isset($_REQUEST['export']) && $_REQUEST['export']==1){ $is_export = true; + $this->getAggregatePackage(); } //获取分页数据 @@ -85,7 +89,7 @@ class PartnerController extends ThinkController $partner_ids = $partner_ids ? $partner_ids : [0]; $game_map['partner_id'] = ["in",$partner_ids]; $games = M("game","tab_")->alias('g') - ->field("g.game_type_name,g.relation_game_name,g.original_package_name,g.partner_id,g.relation_game_id as id") + ->field("g.game_type_name,g.relation_game_name,g.original_package_name,g.partner_id,g.relation_game_id as id,unique_code") ->where($game_map) ->group('relation_game_id') ->select(); @@ -141,6 +145,8 @@ class PartnerController extends ThinkController $val["row"] = 1; } $val['original_package_name'] = $val['original_package_name'] ?: '-'; + $val['aggregate_gamename'] = $this->aggregatePackageName[$val['unique_code']]; + $parseGames[$val['partner_id']][] = $val; } @@ -630,5 +636,14 @@ class PartnerController extends ThinkController return $resarr; } + protected function getAggregatePackage() { + + $client = new AggregateClient(); + + $result = $client->api('aggregate-gamename', []); + + $this->aggregatePackageName = $result['data']; + + } } diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 8f7eac955..58aa68f1b 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -2,6 +2,7 @@ namespace Admin\Controller; +use Base\Tool\AggregateClient; use mysql_xdevapi\Exception; use User\Api\UserApi as UserApi; use OSS\OssClient; @@ -17,6 +18,8 @@ class PromoteCompanyController extends ThinkController { private $modelName = 'PromoteCompany'; public $ratio = []; + public $aggregatePackageName = []; + public function _initialize() { $this->admininfo = $_SESSION['onethink_admin']['user_auth']; @@ -29,6 +32,7 @@ class PromoteCompanyController extends ThinkController $is_export= false; if (isset($_REQUEST['export']) && $_REQUEST['export']==1){ $is_export = true; + $this->getAggregatePackage(); } $map = []; $promotemap=[]; @@ -41,6 +45,7 @@ class PromoteCompanyController extends ThinkController $c_id = throwPromoteIdToCompanyId($pro_id); $map["_string"]="id in ({$c_id})"; } + //市场部权限end if($company_name) $map['tab_promote_company.company_name'] = array('like',"%{$company_name}%"); @@ -112,10 +117,22 @@ class PromoteCompanyController extends ThinkController if(!empty($companyres)){ foreach($companyres as $k=>&$v){ $tmpr = D("CompanyRelation")->getCompanyRelation(2,$v['id']); + $v["settlement_type"] = $tmpr['settlement_type']; $v["collection"] = $tmpr['collection']; $v["invoice_type"] = $tmpr['invoice_type']; $v["invoice_content"] = $tmpr['invoice_content']; + + if ($tmpr['is_payment']==1) { + + $v['bank_address'] = $v['ali_user']; + $v['bank_card'] = $v['ali_account']; + $v['bank_name'] = '--'; + + } + + $v['is_payment'] = ($tmpr['is_payment']==1) ? '是' : '否'; + $v["company_belong"] = getCompanyBlong($v["company_belong"]); $v["develop_type"] = getCompanyRelation($v["develop_type"]); @@ -163,7 +180,7 @@ class PromoteCompanyController extends ThinkController $promotemap['p.company_id']=["in",$companyallids]; $promotemap['p.level']=1; $promotecount = M("Promote","tab_")->alias('p')->where($promotemap)->count(); - // dd($companyres); +// dd($companyres); $this->assign('listData', $companyres); $this->assign('count', $count); $this->assign('promotecount', $promotecount); @@ -1335,10 +1352,12 @@ class PromoteCompanyController extends ThinkController } //获取游戏基础信息 protected function getGameInfo($game_ids){ - $gameinfo = []; - $dbres = M("Game","tab_")->where("relation_game_id in ($game_ids)")->field("relation_game_id,relation_game_name,game_type_name,original_package_name")->group("relation_game_id")->select(); + $dbres = M("Game","tab_")->where("relation_game_id in ($game_ids)")->field("relation_game_id,relation_game_name,game_type_name,original_package_name,unique_code")->group("relation_game_id")->select(); foreach($dbres as $k=>$v){ + + $v['aggregate_gamename'] = $this->aggregatePackageName[$v['unique_code']]; + $gameinfo[$v['relation_game_id']] = $v; } return $gameinfo; @@ -1373,6 +1392,16 @@ class PromoteCompanyController extends ThinkController } } + + protected function getAggregatePackage() { + + $client = new AggregateClient(); + + $result = $client->api('aggregate-gamename', []); + + $this->aggregatePackageName = $result['data']; + + } diff --git a/Application/Admin/View/CompanyRelation/addRelation.html b/Application/Admin/View/CompanyRelation/addRelation.html index 35faef68b..f8ac17cd2 100644 --- a/Application/Admin/View/CompanyRelation/addRelation.html +++ b/Application/Admin/View/CompanyRelation/addRelation.html @@ -202,7 +202,7 @@ - 是否有打款流程: + 是否支付宝打款: