导出数据权限

master
liuweiwen 5 years ago
parent 62f5098df7
commit 96bf040f98

@ -947,6 +947,9 @@ class ExportController extends Controller
break;
case 5:
$map['promote_id'] = array("neq", 0);
if (isset($_REQUEST['promote_id'])) {
$map['_string'] = 'promote_id=' . $_REQUEST['promote_id'];
}
if (isset($_REQUEST['user_account'])) {
$map['user_account'] = array('like', '%' . $_REQUEST['user_account'] . '%');
unset($_REQUEST['user_account']);
@ -987,6 +990,7 @@ class ExportController extends Controller
}
//为数据权限添加
setPowerPromoteIds($map);
$map1 = $map;
$map1['pay_status'] = 1;
$total = M('Agent', 'tab_')->where($map1)->sum('amount');

@ -668,8 +668,10 @@ class PromoteController extends ThinkController
$map['promote_id']=array($map['promote_id'],array('in',implode(',', $all_promote_id)),'and');
}
//为数据权限添加
setPowerPromoteIds($map);
// dd($map);
$model = array(
'm_name' => 'Spend',
'map' => $map,

@ -86,12 +86,15 @@ class QueryController extends ThinkController
$smap['pay_time'] = array('BETWEEN', array(strtotime($start), strtotime($end) + 24 * 60 * 60 - 1));
$smap['is_check'] = 1;
$smap['settle_check'] = 0;
//为数据权限添加
setPowerPromoteIds($umap, 'tab_user.promote_id');
setPowerPromoteIds($smap, 'tab_spend.promote_id');
$map['umap'] = $umap;
$map['smap'] = $smap;
$user = A('Settlement', 'Event');
//为数据权限添加
setPowerPromoteIds($map);
$user->settlement($model, $p, $map);
} else {
$this->display();
@ -150,8 +153,9 @@ class QueryController extends ThinkController
'template_list' => 'settlement',
);
//为数据权限添加
setPowerPromoteIds($map1);
setPowerPromoteIds($map);
$map1 = $map;
$ztotal = null_to_0(D('settlement')->where($map1)->sum('sum_money*10000') / 10000);
$this->assign('ztotal', $ztotal);
$ttotal = null_to_0(D('settlement')->where('create_time' . total(1))->sum('sum_money*10000') / 10000);
@ -159,6 +163,7 @@ class QueryController extends ThinkController
$ytotal = null_to_0(D('settlement')->where('create_time' . total(5))->sum('sum_money*10000') / 10000);
$this->assign('ytotal', $ytotal);
$user = A('Bill', 'Event');
$user->money_list($model, $p, $map);
}

@ -39,7 +39,9 @@ class SettlementEvent extends ThinkEvent {
$spend = M('Spend','tab_');
$ssql=$spend
->field('tab_spend.pay_order_number,tab_spend.game_id,tab_spend.game_name,t.pid as pid,pay_amount,if(isnull(tab_apply.promote_ratio),tab_game.ratio,tab_apply.promote_ratio) as ratio,if(isnull(tab_apply.promote_money),tab_game.money,tab_apply.promote_money) as money')
->field('tab_spend.pay_order_number,tab_spend.game_id,tab_spend.game_name,t.pid as pid,pay_amount,
if(isnull(tab_apply.promote_ratio),tab_game.ratio,tab_apply.promote_ratio) as ratio,
if(isnull(tab_apply.promote_money),tab_game.money,tab_apply.promote_money) as money')
->join("INNER JOIN (
SELECT
tp2.*, tp1.id AS pid,

@ -82,7 +82,7 @@
<!-- 列表 -->
<tbody id="tablebox">
<empty name ="list_data">
<td colspan="7" class="text-center">aOh! 暂时还没有内容!</td>
<td colspan="9" class="text-center">aOh! 暂时还没有内容!</td>
<else />
<volist name="list_data" id="data">
<tr>

Loading…
Cancel
Save