Merge branch 'feature/market_percentage' of wmtx/platform into release

市场专员业绩计bug修正
master
廖金灵 4 years ago committed by Gogs
commit d4d22e5eff

@ -143,7 +143,7 @@ class CompanyGameRatioController extends AdminController
->join("JOIN tab_promote_company p ON ( m.company_id = p.id".$pwhere.")")
->where($where)->find()['count'];
$this->assign('data', $dbres);
$page = set_pagination($count, $row);
$page = set_pagination($count, $row,$params);
if($page) {
$this->assign('_page', $page);
}
@ -317,7 +317,7 @@ class CompanyGameRatioController extends AdminController
->join("JOIN tab_promote_company p ON ( m.company_id = p.id".$pwhere.")")
->where($where)->find()['count'];
$this->assign('data', $dbres);
$page = set_pagination($count, $row);
$page = set_pagination($count, $row,$params);
if($page) {
$this->assign('_page', $page);
}

@ -107,7 +107,7 @@ class CompanyRelationController extends AdminController
$count = $this->DBModel->field("count(id) count")->where($where)->find()['count'];
$this->assign('data', $dbres);
$page = set_pagination($count, $row);
$page = set_pagination($count, $row,$params);
if($page) {
$this->assign('_page', $page);
}
@ -223,7 +223,7 @@ class CompanyRelationController extends AdminController
$count = $this->DBlogModel->field("count(id) count")->where($where)->find()['count'];
$this->assign('data', $dbres);
$page = set_pagination($count, $row);
$page = set_pagination($count, $row,$params);
if($page) {
$this->assign('_page', $page);
}

@ -178,9 +178,9 @@ class CompanyStatementController extends ThinkController
}
$count = M("company_statement","tab_")->field("count(id) count,IFNULL(SUM(CASE WHEN withdraw_type < 2 THEN platform_amount ELSE 0 END),0) as platform_amount,SUM(statement_money) as statement_money")->where($map)->find();
// dd($count);
$parameter['p'] = $page;
$parameter['row'] = $row;
$page = set_pagination($count['count'], $row, $parameter);
$params['p'] = $page;
$params['row'] = $row;
$page = set_pagination($count['count'], $row, $params);
if ($page) {
$this->assign('_page', $page);
}

@ -83,9 +83,9 @@ class CompanyStatementLackController extends ThinkController
$count = $this->DBModel->field("count(id) count,sum(statement_money) statement_money")->where($map)->find();
// dd($count);
$parameter['p'] = $page;
$parameter['row'] = $row;
$page = set_pagination($count['count'], $row, $parameter);
$params['p'] = $page;
$params['row'] = $row;
$page = set_pagination($count['count'], $row, $params);
if ($page) {
$this->assign('_page', $page);
}

@ -165,9 +165,9 @@ class CompanyStatementPoolController extends ThinkController
}
$count = $this->DBModel->field("count(id) count,SUM(statement_money) as statement_money")->where($map)->find();
// dd($count);
$parameter['p'] = $page;
$parameter['row'] = $row;
$page = set_pagination($count['count'], $row, $parameter);
$params['p'] = $page;
$params['row'] = $row;
$page = set_pagination($count['count'], $row, $params);
if ($page) {
$this->assign('_page', $page);
}

@ -252,7 +252,7 @@ class CompanyStatementSetController extends Controller {
$game['pay_amount'] =$va['pay_money'];
$game['game_name'] =$ke;
//获取游戏id及比例
$game_id = $GameDb->where("game_name='{$ke}' OR relation_game_name='{$ke}'")->field("id,relation_game_id")->find();
$game_id = $GameDb->where("game_name='{$ke}' OR original_package_name='{$ke}'")->field("id,relation_game_id")->find();
if(empty($game_id)){
$game['relation_game_id']=0;
// $game['sum_money']=0;

@ -81,7 +81,7 @@ class GameRatioMouldController extends AdminController
$count = $this->DBModel->alias('m')->field("count(id) count")->join("INNER JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")->where($where)->find()['count'];
$this->assign('data', $dbres);
$page = set_pagination($count, $row);
$page = set_pagination($count, $row,$params);
if($page) {
$this->assign('_page', $page);
}

@ -735,7 +735,6 @@ class MarketPercentageController extends ThinkController
$data[$key]['extend_commission'] +=$wait_amount[$value['admin_id'] . date("Y-m",strtotime("last month",strtotime($value['pay_time'])))];
}
$insert['pay_time'] = $data[$key]['pay_time'];
$insert['admin_id'] = $data[$key]['admin_id'];
$insert['real_name'] = $data[$key]['real_name'];
@ -787,15 +786,14 @@ class MarketPercentageController extends ThinkController
->join("left join sys_member member on access.uid=member.uid")
->where(['pay_time'=>$_REQUEST['pay_time'],'admin_id'=>$_REQUEST['admin_id']])
->select();
// dump($map['pay_time']);die();
// dump($data);die();
foreach($data as $key => $value) {
$sign = 0;
if (!$data[$key]['extend_commission']) {
if ($value['extend_commission']=='0.00') {
$sign = 1;
}
$market_percentage = json_decode($value['market_percentage'],true);
// $month = date("m",strtotime($value['pay_time']));
if ($market_percentage['time'] == 1) {
if ($month == '07') {
@ -829,6 +827,7 @@ class MarketPercentageController extends ThinkController
}
$update['extend_commission'] = $data[$key]['extend_commission'];
// var_dump($sign);
if ($sign) {
M("market_altogether","tab_")
->where(['pay_time'=>$data[$key]['pay_time'],'admin_id'=>$data[$key]['admin_id']])

@ -449,11 +449,15 @@ class PayChannelController extends ThinkController
->group('pay_way')
->select(false);
$superMap = $map;
if ($map['payed_time']){
$superMap['pay_time'] = $map['payed_time'];
unset($superMap['payed_time']);
}
//超级签数据
$superSignDataPay = M('game_supersign','tab_')
->field("sum(pay_price) as pay_amount,pay_way")
->where($map)
->where($superMap)
->group('pay_way')
->select(false);
@ -462,8 +466,8 @@ class PayChannelController extends ThinkController
//推广后台充值数据
$spreadMap['order_status'] = array('egt',1);
$spreadMap['pay_way'] = array('egt',1);
if($map['pay_time']) {
$spreadMap['create_time'] = $map['pay_time'];
if($map['payed_time']) {
$spreadMap['pay_time'] = $map['payed_time'];
}
// $spreadMap['promote_id'] = $map['promote_id'];
//推广后台
@ -472,9 +476,9 @@ class PayChannelController extends ThinkController
->where($spreadMap)
->select(false);
if ($map['pay_time']) {
$map['create_time'] = $map['pay_time'];
$testMap['pay_time'] = $map['pay_time'];
if ($map['payed_time']) {
// $map['payed_time'] = $map['payed_time'];
$testMap['pay_time'] = $map['payed_time'];
unset($map['pay_time']);
}
//充值平台币数据
@ -488,10 +492,10 @@ class PayChannelController extends ThinkController
$map['tab_deposit.pay_way'] = $map['pay_way'];
unset($map['pay_way']);
}
if ($map['create_time']) {
$map['tab_deposit.create_time'] = $map['create_time'];
unset($map['create_time']);
}
// if ($map['create_time']) {
// $map['tab_deposit.create_time'] = $map['create_time'];
// unset($map['create_time']);
// }
$map['tab_deposit.pay_source'] = 2;
$map['tab_pay_info.extend'] = '';
@ -532,6 +536,9 @@ class PayChannelController extends ThinkController
//将语句整合起来查询
$channelData = "select sum(pay_amount) as pay_amount,pay_way from ({$sql})t group by pay_way;";
// var_dump($channelData);die();
// $channelData = M()->table("({$channelData})a")->where()->select();
$channelData = M()->query($channelData);
return $channelData;

@ -969,7 +969,7 @@ class TimingController extends AdminController {
$i = 0;
do {
$date = date('Y-m', strtotime($start . ' + ' . $i . ' month'));
echo "{$date}:";
echo "{$date}:\n";
$i++;
$map['pay_time'] = $date;
@ -1138,6 +1138,11 @@ class TimingController extends AdminController {
foreach($data as $key => $value) {
// $sign = 0;
// if ($value['extend_commission']=='0.00') {
// $sign = 1;
// }
$market_percentage = json_decode($value['market_percentage'],true);
if ($market_percentage['time'] == 1) {
@ -1224,6 +1229,12 @@ class TimingController extends AdminController {
$update['extend_commission'] = $data[$key]['extend_commission'];
// if ($sign) {
// M("market_altogether","tab_")
// ->where(['pay_time'=>$data[$key]['pay_time'],'admin_id'=>$data[$key]['admin_id']])
// ->save($update);
// }
M("market_altogether","tab_")
->where(['pay_time'=>$data[$key]['pay_time'],'admin_id'=>$data[$key]['admin_id']])
->save($update);

@ -252,9 +252,6 @@
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<!-- <a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a> -->
</if>
{$_page|default=''}
</div>
<div style="width: 100vw;height: 100vh;padding: 0;position: absolute;top: 0;z-index: 9999;display: none;" id="creat_msg">

@ -259,7 +259,6 @@
format: 'yyyy-mm-dd',
language:"zh-CN",
minView: "month",
startDate:new Date(),
autoclose:true
}).change(function(){
var start = new Date($(this).val()).getTime();
@ -276,7 +275,6 @@
format: 'yyyy-mm-dd',
language:"zh-CN",
minView: "month",
startDate:new Date(),
autoclose:true
}).change(function(){
var end = new Date($(this).val()).getTime();

@ -261,7 +261,6 @@
format: 'yyyy-mm-dd',
language:"zh-CN",
minView: "month",
startDate:new Date(),
autoclose:true
}).change(function(){
var start = new Date($(this).val()).getTime();
@ -278,7 +277,6 @@
format: 'yyyy-mm-dd',
language:"zh-CN",
minView: "month",
startDate:new Date(),
autoclose:true
}).change(function(){
var end = new Date($(this).val()).getTime();

Loading…
Cancel
Save