From 71f2d75b8e4d53824eb6e3107d028c2bccc4475c Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Sat, 11 Jan 2020 14:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E7=BB=93=E7=AE=97=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=80=BB=E6=B5=81=E6=B0=B4=E7=82=B9=E5=87=BB=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=90=84=E4=B8=AA=E6=B8=A0=E9=81=93=E7=9A=84=E6=B5=81?= =?UTF-8?q?=E6=B0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/QueryController.class.php | 57 ++++++++++++++++ Application/Admin/View/Query/marketList.html | 65 ++++++++++++++++++- 2 files changed, 121 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index 1779e918b..0b2d942e1 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -1118,4 +1118,61 @@ class QueryController extends ThinkController $this->display(); } + public function getChannelStream() { + + $map = []; +// setPowerPromoteIds($map,'root_id'); + + if ($_REQUEST['promote_id']||$_REQUEST['promote_id']=='0') { + if ($_REQUEST['promote_id']=='0') { + unset($map['root_id']); + $map['promote_account'] = '官方渠道'; + } else { + $map['root_id'] = $_REQUEST['promote_id']; + } + } + + if ($_REQUEST['game_name']) { + $map['game_names'] = $_REQUEST['game_name']; + } + + if ($_REQUEST['count_date']) { + $map['my_time'] = $_REQUEST['count_date']; + } + + if ($_REQUEST['device']) { + $map['game_name'] = ['like','%'.$_REQUEST['device'].'%']; + } + //获取spend表中的数据,同时根据会长id进行group分类 + $data = M('Spend','tab_') + ->field("FROM_UNIXTIME(pay_time,'%Y-%m') as my_time,sum(pay_amount) as pay_amount,game_id,game_name,SUBSTRING_INDEX(`game_name`,\"(\",1) as game_names,promote_id,promote_account,company_relation,company_belong,CASE WHEN SUBSTRING_INDEX(SUBSTRING_INDEX(`chain`,\"/\",2),\"/\",-1)='' THEN promote_id ELSE SUBSTRING_INDEX(SUBSTRING_INDEX(`chain`,\"/\",2),\"/\",-1) END as root_id,pay_way ") + ->join("left join tab_promote on promote_id = tab_promote.id") + ->where(['pay_status'=>1]) + ->group("my_time,game_names,root_id,pay_way") + ->order("my_time Desc") + ->select(false); + + //关联表获取会长账号名 + $data = M()->table('('.$data.') as a') + ->field("pay_amount,a.pay_way") + ->join("left join tab_promote on root_id = tab_promote.id") + ->join("left join tab_promote_game_ratio as tab_ratio on tab_ratio.game_id = a.game_id and tab_ratio.promote_id=root_id") + ->where($map) + ->group("my_time,game_names,root_id,pay_way") + ->order("my_time Desc") + ->select(); + + $returnData = ''; + + foreach($data as $key => $value) { + + $returnData .=get_pay_way($value['pay_way']).':'.$value['pay_amount']."
"; + + + } +// echo $returnData;die(); + $this->ajaxReturn($returnData); + + } + } diff --git a/Application/Admin/View/Query/marketList.html b/Application/Admin/View/Query/marketList.html index 8372d688c..8cfddb092 100644 --- a/Application/Admin/View/Query/marketList.html +++ b/Application/Admin/View/Query/marketList.html @@ -29,6 +29,46 @@ } .select2-results__option[aria-selected] {font-size:12px;} .layui-layer-dialog .layui-layer-content{color:red} + .tooltip { + position: relative; + display: inline-block; + color: #056dae; + } + + .tooltip .tooltiptext { + /*visibility: hidden;*/ + width: 250%; + background-color: #fff; + color: #000; + text-align: center; + border-radius: 6px; + padding: 5px 0; + position: absolute; + z-index: 1; + bottom: 80%; + left: 0; + margin-left: -70%; + border: #000 solid 1px; + /*color: #000;*/ + } + + .tooltip .tooltiptext::after { + content: ""; + position: absolute; + top: 100%; + left: 50%; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: black transparent transparent transparent; + } + + .tooltip:hover .tooltiptext { + + color: #000; + /*visibility: visible;*/ + /*line-height: 20px;*/ + }