|
|
|
@ -951,16 +951,34 @@ class TimingController extends AdminController {
|
|
|
|
|
|
|
|
|
|
$map['pay_time'] = date("Y-m",strtotime('-1 month'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['pay_time']) {
|
|
|
|
|
$map['pay_time'] = $_REQUEST['pay_time'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['pay_time'] == 'all') {
|
|
|
|
|
$end = date("Y-m",time());
|
|
|
|
|
$start = '2019-08';
|
|
|
|
|
} elseif($_REQUEST['pay_time']) {
|
|
|
|
|
$end = $_REQUEST['pay_time'];
|
|
|
|
|
$start = $_REQUEST['pay_time'];
|
|
|
|
|
} else {
|
|
|
|
|
$end = date("Y-m",strtotime('-1 month'));
|
|
|
|
|
$start = date("Y-m",strtotime('-1 month'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$i = 0;
|
|
|
|
|
do {
|
|
|
|
|
$date = date('Y-m', strtotime($start . ' + ' . $i . ' month'));
|
|
|
|
|
echo "{$date}:";
|
|
|
|
|
$i++;
|
|
|
|
|
|
|
|
|
|
$map['pay_time'] = $date;
|
|
|
|
|
|
|
|
|
|
//所有管理员插入数据
|
|
|
|
|
$this->insertAllUserBonus($map['pay_time']);
|
|
|
|
|
|
|
|
|
|
$month = date("m",strtotime($_REQUEST['pay_time']));
|
|
|
|
|
$yes = date("Y",strtotime($_REQUEST['pay_time']));
|
|
|
|
|
$month = date("m",strtotime($date));
|
|
|
|
|
$yes = date("Y",strtotime($date));
|
|
|
|
|
|
|
|
|
|
$all_data = M("settleup_marketorder","tab_")
|
|
|
|
|
->field("tab_settleup_marketorder.id,pay_time,promote_account,company_belong,tab_settleup_marketorder.real_name,develop_type,game_name,
|
|
|
|
@ -1079,7 +1097,7 @@ class TimingController extends AdminController {
|
|
|
|
|
$month = date("m",strtotime($value['pay_time']));
|
|
|
|
|
$yes = date("Y",strtotime($value['pay_time']));
|
|
|
|
|
|
|
|
|
|
$check_month = date("m",strtotime($_REQUEST['pay_time']));
|
|
|
|
|
$check_month = date("m",strtotime($date));
|
|
|
|
|
|
|
|
|
|
$insert['pay_time'] = $data[$key]['pay_time'];
|
|
|
|
|
$insert['admin_id'] = $data[$key]['admin_id'];
|
|
|
|
@ -1201,7 +1219,7 @@ class TimingController extends AdminController {
|
|
|
|
|
->where(['pay_time'=>['in',array_unique($where['month'])],'admin_id'=>$value['admin_id']])
|
|
|
|
|
->save(['type'=>2]);
|
|
|
|
|
}
|
|
|
|
|
$data[$key]['extend_commission'] +=$wait_amount[$value['admin_id'] . date("Y-m",strtotime("last month",strtotime($_REQUEST['pay_time'])))];
|
|
|
|
|
$data[$key]['extend_commission'] +=$wait_amount[$value['admin_id'] . date("Y-m",strtotime("last month",strtotime($date)))];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$update['extend_commission'] = $data[$key]['extend_commission'];
|
|
|
|
@ -1212,6 +1230,12 @@ class TimingController extends AdminController {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} while ($date < date('Y-m', strtotime("{$end} -1 month")));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo date("Y-m-d H:i:s")."----------------------月初发放市场专员应发份额----------------------\n";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|