财务管理功能完善

master
zyx 5 years ago
parent fe8a60093f
commit 54a01da982

@ -104,11 +104,14 @@ class FinanceController extends ThinkController
$map['count_date']=I('count_date');
}
if(!empty(I('root_id'))) {
if(!empty(I('root_id'))||!I('sign')) {
$root_id = I('root_id');
if ($root_id == 0) {
// $map['_string'] = "promote_id = {$root_id}";
} else {
$map['_string'] = "promote_id = {$root_id} or parent_id = {$root_id} or root_id = {$root_id}";
}
}
if(!empty(I('parent_id'))) {
$parent_id = I('parent_id');
$map['_string'] = "promote_id = {$parent_id} or parent_id = {$parent_id}";
@ -119,6 +122,9 @@ class FinanceController extends ThinkController
$map['_string'] = "promote_id = {$promote_id}";
}
// var_dump($map);die();
$map['bind_coin_count'] = ['neq',0];
$insideData = D("spend_count")->getSpendCountData($map,"game_id,bind_coin_count as count","promote_id,count_date,game_id");
unset($map['bind_coin_count']);
@ -169,7 +175,25 @@ class FinanceController extends ThinkController
function gameFinanceDetail($p = 1) {
// $this->getPromoteList();die();
if (!empty(I("promote_id"))) {
$promote_id = I("promote_id");
}
if (!empty(I("root_id"))) {
$root_id = I("root_id");
$promote_id = $this->getPromoteList($root_id);
array_push($promote_id,$root_id);
} else if (I("root_id")==0) {
$promote_id = 0;
}
if (!empty(I("parent_id"))) {
$parent_id = I("parent_id");
$promote_id = $this->getPromoteList($parent_id);
array_push($promote_id,$parent_id);
}
dump($promote_id);die();
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
@ -393,14 +417,14 @@ class FinanceController extends ThinkController
function getPromoteList($root_id = 0) {
$data = M('promote')
$data = M('promote','tab_')
->field("id")
->where("parent_id={$root_id} and grand_id={$root_id}")
->where("parent_id={$root_id} or grand_id={$root_id}")
->select();
$handleData = [];
foreach ($data as $key => $value) {
array_push($data[$key]['id'],$handleData);
array_push($handleData,$data[$key]['id']);
}
return $handleData;

@ -94,7 +94,8 @@
<td ><if condition="$data.all_cash_count neq ''">{$data.all_cash_count}<else/>0</if></td>
<td >
<a href="{:U('Finance/gameFinanceDetail',
array('count_date'=>$_REQUEST['count_date'],'game_id'=>$data['game_id'],'game_name'=>$data['game_name'],))}" >查看</a>
array('count_date'=>$_REQUEST['count_date'],'game_id'=>$data['game_id'],
'game_name'=>$data['game_name'],'root_id'=>$_REQUEST['root_id'],'parent_id'=>$_REQUEST['parent_id']))}" >查看</a>
</td>
</tr>
</volist>

@ -110,7 +110,7 @@
<td ><span>{$sumData.balance_coin_count}</span></td>
<td ><span>{$sumData.inside_cash_count}</span></td>
<td ><span>{$sumData.all_count}</span></td>
<td ><a href="{:U('Finance/gameFinance')}" >游戏查看</a>
<td ><a href="{:U('Finance/gameFinance',array('sign'=>1,'root_id'=>$_GET['root_id']))}" >游戏查看</a>
<a href="{:U('Finance/getPromoteUser',array('count_date'=>$_GET['count_date'],'root_id'=>$_GET['root_id'],'sign'=>1))}" >渠道查看</a></td>
</tr>
</notemtpy>

@ -111,7 +111,7 @@
<td ><span>{$sumData.balance_coin_count}</span></td>
<td ><span>{$sumData.inside_cash_count}</span></td>
<td ><span>{$sumData.all_count}</span></td>
<td ><a href="{:U('Finance/gameFinance')}" >游戏查看</a>
<td ><a href="{:U('Finance/gameFinance',array('sign'=>1))}" >游戏查看</a>
<a href="{:U('Finance/getParentUser',array('count_date'=>$_GET['count_date'],'root_name'=>$_GET['root_name'],'sign'=>1))}" >渠道查看</a></td>
</tr>
</notemtpy>

Loading…
Cancel
Save