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;*/
+ }