Merge branch 'dev_zyx' into dev

master
zhengchanglong 5 years ago
commit bf24f74d00

@ -5765,38 +5765,49 @@ if ($key == 'model'){
$map['count_date'] = $date;
}
$data = M('spend_count','tab_')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(cash_count+balance_coin_count) as all_count')
$data = M('spend_user_count','tab_')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(cash_count+balance_coin_count+inside_cash_count) as all_count')
->where($map)->select();
$map['inside_cash_count'] = ['neq',0];
$insideData = D("spend_count")->getSpendCountData($map,"promote_id,inside_cash_count as count","promote_id,count_date");
unset($map['bind_coin_count']);
//内充流水与绑定流水数据
$insideDataSum = 0;
foreach ($insideData as $key => $value) {
if (isset($insideDataSum)) {
$insideDataSum = $insideDataSum + $value['count'];
} else {
$insideDataSum = $value['count'];
}
}
$map1['parent_id'] = $data[0]['promote_id'];
$map1['count_date'] = $date;
$sunData = M('spend_user_count','tab_')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(cash_count+balance_coin_count+inside_cash_count) as all_count')
->where($map1)->find();
$data[0]['cash_count'] = number_format($data[0]['cash_count']-$sunData['cash_count'],2,'.','');
$data[0]['balance_coin_count'] = number_format($data[0]['balance_coin_count']-$sunData['balance_coin_count'],2,'.','');
$data[0]['inside_cash_count'] = number_format($data[0]['inside_cash_count']-$sunData['inside_cash_count'],2,'.','');
$data[0]['all_count'] = number_format($data[0]['all_count']-$sunData['all_count'],2,'.','');
// $map['inside_cash_count'] = ['neq',0];
// $insideData = D("spend_count")->getSpendCountData($map,"promote_id,inside_cash_count as count","promote_id,count_date");
// unset($map['bind_coin_count']);
// //内充流水与绑定流水数据
// $insideDataSum = 0;
// foreach ($insideData as $key => $value) {
// if (isset($insideDataSum)) {
// $insideDataSum = $insideDataSum + $value['count'];
// } else {
// $insideDataSum = $value['count'];
// }
// }
}
if (!$data[0]['cash_count']&&!$data[0]['balance_coin_count']&&!$data[0]['inside_cash_count']&&!$data[0]['all_count']) {
$promoteData = M('promote','tab_')->field('account as promote_account')->where("id={$root_id}")->find();
$data[0]['promote_id'] = $root_id;
$data[0]['promote_account'] = $promoteData['promote_account'];
$data[0]['cash_count'] = number_format(0.00,2,'.','');
$data[0]['balance_coin_count'] = number_format(0.00,2,'.','');
$data[0]['inside_cash_count'] = number_format(0.00,2,'.','');
$data[0]['all_count'] = number_format(0.00,2,'.','');
}
$data[0]['inside_cash_count'] = number_format($insideDataSum,2,'.','');
$data[0]['all_count'] = number_format($insideDataSum+$data[0]['all_count'],2,'.','');
// if (!$data[0]['cash_count']&&!$data[0]['balance_coin_count']&&!$data[0]['inside_cash_count']&&!$data[0]['all_count']) {
// $promoteData = M('promote','tab_')->field('account as promote_account')->where("id={$root_id}")->find();
//
// $data[0]['promote_id'] = $root_id;
// $data[0]['promote_account'] = $promoteData['promote_account'];
// $data[0]['cash_count'] = number_format(0.00,2,'.','');
// $data[0]['balance_coin_count'] = number_format(0.00,2,'.','');
// $data[0]['inside_cash_count'] = number_format(0.00,2,'.','');
// $data[0]['all_count'] = number_format(0.00,2,'.','');
// }
// $data[0]['inside_cash_count'] = number_format($insideDataSum,2,'.','');
// $data[0]['all_count'] = number_format($insideDataSum+$data[0]['all_count'],2,'.','');
// var_dump($data);die();
return $data;

@ -278,7 +278,7 @@ class FinanceController extends ThinkController
$map['user_account'] = array('like','%'.I("user_account").'%');
}
if (!empty(I('user_nickname'))) {
$map['user_nickname'] = array('like',I("user_nickname").'%');
$map['game_player_name'] = array('like',I("user_nickname").'%');
}
// var_dump($map);die();
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,user_nickname,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way";
@ -543,38 +543,49 @@ class FinanceController extends ThinkController
$map['count_date'] = $date;
}
$data = M('spend_count','tab_')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(cash_count+balance_coin_count) as all_count')
$data = M('spend_user_count','tab_')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(cash_count+balance_coin_count+inside_cash_count) as all_count')
->where($map)->select();
$map['inside_cash_count'] = ['neq',0];
$insideData = D("spend_count")->getSpendCountData($map,"promote_id,inside_cash_count as count","promote_id,count_date");
unset($map['bind_coin_count']);
//内充流水与绑定流水数据
$insideDataSum = 0;
foreach ($insideData as $key => $value) {
if (isset($insideDataSum)) {
$insideDataSum = $insideDataSum + $value['count'];
} else {
$insideDataSum = $value['count'];
}
}
}
$map1['parent_id'] = $data[0]['promote_id'];
$map1['count_date'] = $date;
$sunData = M('spend_user_count','tab_')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(cash_count+balance_coin_count+inside_cash_count) as all_count')
->where($map1)->find();
$data[0]['cash_count'] = number_format($data[0]['cash_count']-$sunData['cash_count'],2,'.','');
$data[0]['balance_coin_count'] = number_format($data[0]['balance_coin_count']-$sunData['balance_coin_count'],2,'.','');
$data[0]['inside_cash_count'] = number_format($data[0]['inside_cash_count']-$sunData['inside_cash_count'],2,'.','');
$data[0]['all_count'] = number_format($data[0]['all_count']-$sunData['all_count'],2,'.','');
if (!$data[0]['cash_count']&&!$data[0]['balance_coin_count']&&!$data[0]['inside_cash_count']&&!$data[0]['all_count']) {
$promoteData = M('promote','tab_')->field('account as promote_account')->where("id={$root_id}")->find();
// $map['inside_cash_count'] = ['neq',0];
// $insideData = D("spend_count")->getSpendCountData($map,"promote_id,inside_cash_count as count","promote_id,count_date");
// unset($map['bind_coin_count']);
// //内充流水与绑定流水数据
// $insideDataSum = 0;
// foreach ($insideData as $key => $value) {
// if (isset($insideDataSum)) {
// $insideDataSum = $insideDataSum + $value['count'];
// } else {
// $insideDataSum = $value['count'];
// }
// }
$data[0]['promote_id'] = $root_id;
$data[0]['promote_account'] = $promoteData['promote_account'];
$data[0]['cash_count'] = number_format(0.00,2,'.','');
$data[0]['balance_coin_count'] = number_format(0.00,2,'.','');
$data[0]['inside_cash_count'] = number_format(0.00,2,'.','');
$data[0]['all_count'] = number_format(0.00,2,'.','');
}
$data[0]['inside_cash_count'] = number_format($insideDataSum,2,'.','');
$data[0]['all_count'] = number_format($insideDataSum+$data[0]['all_count'],2,'.','');
// if (!$data[0]['cash_count']&&!$data[0]['balance_coin_count']&&!$data[0]['inside_cash_count']&&!$data[0]['all_count']) {
// $promoteData = M('promote','tab_')->field('account as promote_account')->where("id={$root_id}")->find();
//
// $data[0]['promote_id'] = $root_id;
// $data[0]['promote_account'] = $promoteData['promote_account'];
// $data[0]['cash_count'] = number_format(0.00,2,'.','');
// $data[0]['balance_coin_count'] = number_format(0.00,2,'.','');
// $data[0]['inside_cash_count'] = number_format(0.00,2,'.','');
// $data[0]['all_count'] = number_format(0.00,2,'.','');
// }
// $data[0]['inside_cash_count'] = number_format($insideDataSum,2,'.','');
// $data[0]['all_count'] = number_format($insideDataSum+$data[0]['all_count'],2,'.','');
// var_dump($data);die();
return $data;

@ -51,7 +51,7 @@ class SpendCountSetController extends \Think\Controller
$countRes = M("spend_count","tab_")->field("count(*) date_count")->where("count_date = '{$this->date}'")->find()['date_count'];
$countUserRes = M("spend_user_count","tab_")->field("count(*) date_count")->where("count_date = '{$this->date}'")->find()['date_count'];
if($countRes > 0 || $countUserRes >0){
die("error:Repeated statistics");
die("error:Repeated statistics,msg:{$this->date}已经聚合过");
}
$this->model->startTrans();
$this->usermodel->startTrans();
@ -81,7 +81,7 @@ class SpendCountSetController extends \Think\Controller
# code...
}
//获取游戏现金流水
public function getCashData()
protected function getCashData()
{
if(!$this->continue){
die("api error");
@ -115,7 +115,7 @@ class SpendCountSetController extends \Think\Controller
# code...
}
//获取平台币聚合
public function getBalanceData()
protected function getBalanceData()
{
if(!$this->continue){
die("api error");
@ -169,7 +169,7 @@ class SpendCountSetController extends \Think\Controller
# code...
}
//获取绑定币充值
public function getInsideData()
protected function getInsideData()
{
if(!$this->continue){
die("api error");
@ -222,7 +222,7 @@ class SpendCountSetController extends \Think\Controller
}
}
public function getRoot()
protected function getRoot()
{
if(!$this->continue){
die("api error");
@ -268,7 +268,7 @@ class SpendCountSetController extends \Think\Controller
}
//获取会长信息
public function getRootUser()
protected function getRootUser()
{
if(!$this->continue) die("api error");
//获取所有数据
@ -310,7 +310,7 @@ class SpendCountSetController extends \Think\Controller
}
//获取组长信息
public function getParentUser()
protected function getParentUser()
{
if(!$this->continue) die("api error");
$month =$this->date;
@ -350,7 +350,7 @@ class SpendCountSetController extends \Think\Controller
}
//获取组员
public function getPromoteUser()
protected function getPromoteUser()
{
if(!$this->continue) die("api error");
$month = $this->date;;
@ -388,7 +388,7 @@ class SpendCountSetController extends \Think\Controller
# code...
}
//渠道角色统计仅计算推广员的平台币发放与收回
public function getUserInsideData()
protected function getUserInsideData()
{
// if(!$this->continue) die("api error");
//获取发送给推广员的数据
@ -545,7 +545,7 @@ class SpendCountSetController extends \Think\Controller
# code...
}
//按角色修正inside_cash_count数据
public function setInsideCount($promote_id,$inside_cash_count)
protected function setInsideCount($promote_id,$inside_cash_count)
{
$tempmap = array(
"promote_id"=>$promote_id,

File diff suppressed because one or more lines are too long

@ -25,6 +25,47 @@
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.tooltip {
position: relative;
display: inline-block;
color: #056dae;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 250%;
background-color: #fff;
color: #fff;
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;
}
.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;
}
</style>
@ -58,6 +99,7 @@
<input type="hidden" name="count_date" value="{$_GET['count_date']}"/>
<input type="hidden" name="parent_id" value="{$_GET['parent_id']}"/>
<input type="hidden" name="root_id" value="{$_GET['root_id']}"/>
<input type="hidden" name="promote_id" value="{$_GET['promote_id']}"/>
<input type="hidden" name="sign" value="{$_GET['sign']}"/>
<input type="hidden" name="from" value="{$_GET['from']}"/>
<div class="input-list">
@ -85,13 +127,13 @@
<th>合作方</th>
<th >游戏现金流水</th>
<th ><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)。</span></span></div></th>
<th >平台币流水</th>
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th >内充消耗</th>
<th ><div class="tooltip">内充消耗<span class="tooltiptext"><span style="margin-left: -10px">绑币消费所产生的流水(游戏订单-游戏充值-绑定币充值)</span></span></div></th>
<th >总流水</th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>
<th >操作</th>
</tr>
@ -120,7 +162,7 @@
<td >
<a href="{:U('Finance/gameFinanceDetail',
array('count_date'=>$_REQUEST['count_date'],'game_id'=>$data['game_id'],
'game_name'=>$_REQUEST['game_id']?$data['game_name']:'','root_id'=>$_REQUEST['root_id'],
'game_name'=>$data['game_name'],'root_id'=>$_REQUEST['root_id'],
'parent_id'=>$_REQUEST['parent_id'],'promote_id'=>$_REQUEST['promote_id'],'sign'=>$_REQUEST['sign'],'from'=>$_REQUEST['from']))}" >查看</a>
</td>
</tr>
@ -134,7 +176,7 @@
<td>
<a href="{:U('Finance/gameFinanceDetail',
array('count_date'=>$_REQUEST['count_date'],'root_id'=>$_GET['root_id'],'partner_id'=>$_REQUEST['partner_id'],
'parent_id'=>$_REQUEST['parent_id'],'promote_id'=>$_REQUEST['promote_id'],'game_id'=>$_REQUEST['game_id'],'game_name'=>'1',
'parent_id'=>$_REQUEST['parent_id'],'promote_id'=>$_REQUEST['promote_id'],'game_id'=>$_REQUEST['game_id'],'game_name'=>'全部游戏',
'sign'=>$_REQUEST['sign'],'from'=>$_REQUEST['from']))}" >查看</a>
</td>
</tr>

@ -50,11 +50,11 @@
<input type="hidden" name="game_name" value="{$_GET['game_name']}"/>
<div class="input-list">
<input type="text" name="user_account" placeholder="请输入玩家账号搜索" class="" value="{:I('user_account')}"/>&nbsp;
<input type="text" name="user_account" placeholder="请输入玩家账号搜索" class="" value="{:I('user_account')}" style="width: 180px"/>&nbsp;
</div>
<div class="input-list">
<input type="text" name="user_nickname" placeholder="请输入玩家昵称搜索" class="" value="{:I('user_nickname')}"/>&nbsp;
<input type="text" name="user_nickname" placeholder="请输入角色名称搜索" class="" value="{:I('user_nickname')}" style="width: 180px"/>&nbsp;
</div>
<div class="input-list">
@ -78,8 +78,6 @@
<th >玩家账号</th>
<th >玩家昵称</th>
<th >游戏名称</th>
<th >所属推广员</th>
@ -115,7 +113,6 @@
<td >{$data.pay_order_number}</td>
<td >{$data.pay_time}</td>
<td >{$data.user_account}</td>
<td >{$data.user_nickname}</td>
<td >{$data.game_name}</td>
<td >{$data.promote_account}</td>
<td >{$data.spend_ip}</td>

@ -49,7 +49,7 @@
<input type="hidden" name="count_date" value="{$_GET['count_date']}"/>
<div class="input-list">
<input type="text" name="root_name" placeholder="请输入组长账号搜索" class="" value="{:I('root_name')}"/>&nbsp;
<input type="text" name="root_name" placeholder="请输入组长账号搜索" class="" value="{:I('root_name')}" style="width: 180px"/>&nbsp;
</div>
<div class="input-list">

@ -25,6 +25,47 @@
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.tooltip {
position: relative;
display: inline-block;
color: #056dae;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 250%;
background-color: #fff;
color: #fff;
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;
}
.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;
}
</style>
@ -50,7 +91,7 @@
<input type="hidden" name="game_name" value="{$_GET['game_name']}"/>
<div class="input-list">
<input type="text" name="root_name" placeholder="请输入会长账号搜索" class="" value="{:I('root_name')}"/>&nbsp;
<input type="text" name="root_name" placeholder="请输入会长账号搜索" class="" value="{:I('root_name')}" style="width: 180px"/>&nbsp;
</div>
<div class="input-list">
@ -70,13 +111,13 @@
<tr>
<th >会长渠道</th>
<th>游戏现金流水</th>
<th><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)。</span></span></div></th>
<th >平台币流水</th>
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th >内充发放</th>
<th ><div class="tooltip">内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会(平台币订单-后台发放(推广员))的平台币</span></span></th>
<th >总流水</th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>
<th >操作</th>

@ -25,6 +25,47 @@
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.tooltip {
position: relative;
display: inline-block;
color: #056dae;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 250%;
background-color: #fff;
color: #fff;
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;
}
.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;
}
</style>
@ -90,13 +131,13 @@
</th> -->
<th >月份</th>
<th >游戏现金流水</th>
<th ><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)</span></span></div></th>
<th >平台币流水</th>
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th >内充流水</th>
<th ><div class="tooltip">内充流水<span class="tooltiptext"><span style="margin-left: -10px">管理后台下发的所有平台币,绑定币流水(平台币订单-后台发放(玩家/推广员),绑币订单-后台发放(玩家),平台币回收与绑币回收需要进行扣除</span></span></div></th>
<th >总流水</th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>
<th >操作</th>
</tr>
@ -168,6 +209,9 @@
</volist>
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Finance/index')}');
$(function(){

Loading…
Cancel
Save