From c75d73c9f7d167105739099d5df178559f6e80ef Mon Sep 17 00:00:00 2001 From: tping Date: Wed, 18 Nov 2020 17:29:28 +0800 Subject: [PATCH] 1126 --- .../Admin/Controller/GameController.class.php | 8 ++ .../Controller/PartnerController.class.php | 8 ++ .../PromoteCompanyController.class.php | 50 +++++++ Application/Admin/View/Partner/add.html | 129 +++++++++++++++-- .../Admin/View/PromoteCompany/add.html | 130 ++++++++++++++++-- .../Admin/View/PromoteCompany/lists.html | 105 +++++++++++++- 6 files changed, 412 insertions(+), 18 deletions(-) diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index 29c19144e..f27ca6064 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -362,6 +362,11 @@ class GameController extends ThinkController } } + /* + * ALTER TABLE `tab_game` +ADD COLUMN `kefu_qq_type` tinyint(2) NULL DEFAULT 0 COMMENT '客服qq类型:0跟随系统 1不显示 2其他' AFTER `select_package_name`, +ADD COLUMN `kefu_qq` varchar(255) NULL DEFAULT '' COMMENT 'kefu_qq_type为2 时有效' AFTER `kefu_qq_type`; + */ public function edit($id = null) { if (IS_POST) { @@ -459,6 +464,9 @@ class GameController extends ThinkController $otherData['unique_code'] = $sibling['unique_code']; $otherData['flooring_page_video'] = $sibling['flooring_page_video']; $otherData['flooring_page_video_cover'] = $sibling['flooring_page_video_cover']; + $otherData['kefu_qq'] = I('post.kefu_qq'); + $otherData['kefu_qq_type'] = I('post.kefu_qq_type'); + M('Game', 'tab_')->data($otherData)->where(array('id' => $another['id']))->save(); //同时修改代充游戏折扣 $set_fidel['status'] = 1; diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index b991aa261..201855aa2 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -433,6 +433,14 @@ class PartnerController extends ThinkController if ($has_check) { $this->error('已存在同名cp,请勿重复添加'); } + + $save['relation']['collaborate_way'] = $save['part_a_type']; + if ($save['part_a_type'] == 1) { + $save['relation']['self_company_id'] = $save['part_b']; + } + if ($save['part_a_type'] == 2) { + $save['relation']['self_company_id'] = $save['part_a']; + } $res =D("PartnerVerify")->add_db($save); if ($res) { diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 25e0b7c3f..7cab4bfa7 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -214,6 +214,9 @@ class PromoteCompanyController extends ThinkController if ($page) { $this->assign('_page', $page); } + + $games = M('game', 'tab_')->field('relation_game_id id,relation_game_name game_name,short')->where(['game_status'=>1,'down_port'=>1])->group("relation_game_id")->select(); + $this->assign('games', $games); //分配其他页面需要参数 $this->assign('promoteList', getPromoteByLevel(1)); $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Partner/lists'])->find()); @@ -224,6 +227,44 @@ class PromoteCompanyController extends ThinkController $this->display(); } + // 批量上下架 + public function displayOnShelves() { + if (IS_AJAX) { + $post = I("post."); + +// var_dump(time()); + $where = []; + if ($post['batch_company_type'] == 1) { + $where['company_belong'] = array('exp', " IN (1,2)"); + } else { + $where['company_belong'] = $post['batch_company_type']; + } + if ($post['batch_type'] == 1) { // 批量增加 + $where['_string'] = "concat(',', game_ids, ',') not like \"%,{$post['batch_game']},%\""; + $exp = "trim(BOTH ',' FROM concat(game_ids, ',', {$post['batch_game']}))"; + } + if ($post['batch_type'] == 2) { // 批量删除 + $where['_string'] = "concat(',', game_ids, ',') like \"%,{$post['batch_game']},%\""; + $exp = "trim(BOTH ',' FROM replace(concat(',', game_ids, ','), \",{$post['batch_game']},\", ','))"; + } + M('promote', 'tab_')->where($where)->save([ + 'game_ids' => ['exp', $exp] + ]); + + M('promote_company', 'tab_')->where($where)->save([ + 'game_ids' => ['exp', $exp] + ]); +// var_dump(M('promote', 'tab_')->_sql(),time());die; + + echo $this->ajaxReturn([ + 'code' => 1, + 'msg' => '成功', + 'data' => [] + ]); + + } + } + public function index() { $page = intval(I('get.p', 0)); @@ -438,6 +479,15 @@ class PromoteCompanyController extends ThinkController } $save['create_time'] = $time; $save['turnover_ratio'] = $this->setTurnoverRatio($save); + + $save['relation']['collaborate_way'] = $save['part_a_type']; + if ($save['part_a_type'] == 1) { + $save['relation']['self_company_id'] = $save['part_b']; + } + if ($save['part_a_type'] == 2) { + $save['relation']['self_company_id'] = $save['part_a']; + } + $result = D("PromoteCompanyVerify")->add_db($save); if ($result) { addOperationLog(['op_type'=>0,'key'=>$save['company_name'],'op_name'=>'新增推广公司','url'=>U('PromoteCompany/lists')]); diff --git a/Application/Admin/View/Partner/add.html b/Application/Admin/View/Partner/add.html index 27965dc66..7d45aaaef 100644 --- a/Application/Admin/View/Partner/add.html +++ b/Application/Admin/View/Partner/add.html @@ -20,8 +20,8 @@
@@ -36,7 +36,7 @@ *合同合作方名称: - + @@ -135,7 +135,8 @@
- + + + + + + + + + + + + + + + + + -
*甲方公司类型: + + + *乙方公司类型: + + +
*甲方公司: + + + *乙方公司: + + +
*结算周期: @@ -190,10 +232,10 @@ 选择否将不能进行线上打款 @@ -212,7 +254,7 @@
结算生效期限: + - 结束时间不选默认永久 @@ -417,15 +459,84 @@