Merge branch 'hotfix/market_percentage' of wmtx/platform into master

优化公会统计
master
廖金灵 4 years ago committed by Gogs
commit 831c87c9ee

@ -93,13 +93,13 @@ class MarketPercentageController extends ThinkController
if ($_REQUEST['export']) { if ($_REQUEST['export']) {
$data = $data->where($map) $data = $data->where($map)
->group("promote_id,game_name,pay_time") ->group("promote_id,game_name,pay_time,admin_id")
->order("pay_time DESC") ->order("pay_time DESC")
->select(); ->select();
} else { } else {
$data = $data->page($p, $row) $data = $data->page($p, $row)
->where($map) ->where($map)
->group("promote_id,game_name,pay_time") ->group("promote_id,game_name,pay_time,admin_id")
->order("pay_time DESC") ->order("pay_time DESC")
->select(); ->select();
} }
@ -169,7 +169,7 @@ class MarketPercentageController extends ThinkController
$count = M("settleup_marketorder","tab_") $count = M("settleup_marketorder","tab_")
->where($map) ->where($map)
->group("promote_id,game_name,pay_time") ->group("promote_id,game_name,pay_time,admin_id")
->select(false); ->select(false);
$count = M()->table("({$count}) count")->count(); $count = M()->table("({$count}) count")->count();

@ -914,7 +914,7 @@ class TimingController extends AdminController {
unset($promote_data[$key]['market_percentage']); unset($promote_data[$key]['market_percentage']);
$marker_data = M("settleup_marketorder","tab_") $marker_data = M("settleup_marketorder","tab_")
->where(['pay_time'=>$value['pay_time'],'promote_id'=>$value['promote_id'],'game_name'=>$value['game_name']]) ->where(['pay_time'=>$value['pay_time'],'promote_id'=>$value['promote_id'],'game_name'=>$value['game_name'],'admin_id'=>$value['admin_id']])
->find(); ->find();
echo "日期:{$value['pay_time']},游戏:{$value['game_name']},推广员:{$value['promote_account']}\n"; echo "日期:{$value['pay_time']},游戏:{$value['game_name']},推广员:{$value['promote_account']}\n";
// dump($promote_data[$key]);die(); // dump($promote_data[$key]);die();
@ -923,7 +923,7 @@ class TimingController extends AdminController {
->add($promote_data[$key]); ->add($promote_data[$key]);
} else { } else {
M("settleup_marketorder","tab_") M("settleup_marketorder","tab_")
->where(['pay_time'=>$value['pay_time'],'promote_id'=>$value['promote_id'],'game_name'=>$value['game_name']]) ->where(['pay_time'=>$value['pay_time'],'promote_id'=>$value['promote_id'],'game_name'=>$value['game_name'],'admin_id'=>$value['admin_id']])
->save($promote_data[$key]); ->save($promote_data[$key]);
} }

Loading…
Cancel
Save